Mercurial > hg > Members > kono > os9 > sbc09
diff os9/mc09/mclibos9.c @ 106:6566b9f47f4a
asm macro fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 29 Dec 2018 18:29:06 +0900 |
parents | 6eef99bb4771 |
children | 014002970940 |
line wrap: on
line diff
--- a/os9/mc09/mclibos9.c Sat Dec 29 12:25:26 2018 +0900 +++ b/os9/mc09/mclibos9.c Sat Dec 29 18:29:06 2018 +0900 @@ -116,7 +116,6 @@ if ( i >= NFILES) return NULL; if ( (fcbp = malloc(FCBSIZE)) == NULL ) return NULL; if ( _setname(name,fcbp) == 0 ) return NULL; - 0; #asm pshs x,y,u ldx -4,u @@ -126,13 +125,14 @@ os9 I$Open bcc _LC0001 ldx -4,u - clrb + tfr a,b + clra std ,x bra _LC0002 _LC0001 ldx -4,u clra - stD 2,x err code + std 2,x err code ldd #-1 std ,x _LC0002 @@ -154,7 +154,6 @@ if ( i >= NFILES) return NULL; if ( (fcbp = malloc(FCBSIZE)) == NULL ) return NULL; if ( _setname(name,fcbp) == 0 ) return NULL; - 0; #asm pshs x,y,u ldx -4,u @@ -164,7 +163,8 @@ os9 I$Create bcc _LC0003 ldx -4,u - clrb + tfr a,b + clra std ,x bra _LC0004 _LC0003 @@ -190,11 +190,10 @@ if ( i >= NFILES ) return EOF; _fcbtbl[i] = NULL; if ( (fcbp == STDIN) || (fcbp == STDOUT) || (fcbp == STDERR) ) return 0; - 0; #asm pshs x,y,u ldx -4,u - lda ,x + lda 1,x os9 I$Close puls x,y,u #endasm @@ -234,9 +233,7 @@ { int c; #asm - pshs x,y,u - ldd ,u c - PSHS A,B + pshs d,x,y,u ldx 2,u lda 1,x file descriptor leax 1,S @@ -256,12 +253,10 @@ { int ret; #asm - pshs x,y,u - ldd ,u c - PSHS A,B - ldx 2,u + pshs d,x,y,u + ldx 4,u lda 1,x file descriptor - leax 1,S + leax 3,u ldy #1 os9 I$Write puls d,x,y,u