Mercurial > hg > Members > kono > os9 > sbc09
changeset 167:3f8bbec566b3
x
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 10 Apr 2019 22:48:30 +0900 |
parents | a813c5ae58d5 |
children | 2937e970aac6 |
files | TL1/TL1os9.asm src/Makefile src/d09.c |
diffstat | 3 files changed, 27 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/TL1/TL1os9.asm Wed Apr 10 12:09:08 2019 +0900 +++ b/TL1/TL1os9.asm Wed Apr 10 22:48:30 2019 +0900 @@ -89,16 +89,19 @@ ** OBJECT START ****** -C leas OBJECT,u -VARPTR lda INDN - lbsr close +C tst <runmod + beq c2 + lbra modend +c2 leas OBJECT,u +VARPTR lda INDN + lbsr close clra os9 stdin - sta INDN + sta INDN inca - sta OUTDN - LDX <PC - leay ,x -OBJMP JMP OBJECT,u + sta OUTDN + LDX <PC + leay ,x +OBJMP JMP OBJECT,u start LEAY OBJECT,u @@ -1428,9 +1431,7 @@ std ,y++ ldd #$0c0a std ,y++ - ldd #$000d - ldy <pc - leay $d,y + leay 9,y ldx ,s bsr mkmodnam tfr y,d @@ -1446,17 +1447,25 @@ puls x,y,u,pc mkmodnam pshs x,y,u - tfr x,u +m4 tfr x,u tst ,x lbeq ERROR * no file name + cmpa #' ' + bne m0 + leax 1,x + bra m4 m0 lda ,x+ - bne m3 + cmpa #' ' + ble m1 cmpa #'/' bne m0 + cmpa #':' + bne m0 tfr x,u bra m0 m1 lda ,u+ - beq m3 + cmpa #' ' + ble m3 cmpa #'.' beq m3 sta ,y+
--- a/src/Makefile Wed Apr 10 12:09:08 2019 +0900 +++ b/src/Makefile Wed Apr 10 22:48:30 2019 +0900 @@ -17,7 +17,8 @@ # -Dd_namlen=d_reclen CFLAGS=-g -O2 -DTERM_CONTROL -V09FLAGS= -DUSE_TERMIOS -DNOFMEMOPEN -DBIG_ENDIAN +# V09FLAGS= -DUSE_TERMIOS /*-DNOFMEMOPEN*/ -DBIG_ENDIAN +V09FLAGS= -DUSE_TERMIOS -DBIG_ENDIAN SIM_BIN=v09s v09st
--- a/src/d09.c Wed Apr 10 12:09:08 2019 +0900 +++ b/src/d09.c Wed Apr 10 22:48:30 2019 +0900 @@ -1457,7 +1457,7 @@ else disp = pc + 2 - (256 - offset + adoffset); fprintf(fp,"%0.2X %0.2X %s%s $%0.4X", - code, offset, suffix, op->name, disp); + code, offset, suffix, op->name, disp & 0xffff); return op->bytes; } @@ -1477,7 +1477,7 @@ else disp = pc + 3 - (65536 - offset) + adoffset; fprintf(fp,"%0.2X %0.2X %0.2X %s%s $%0.4X", - code, prog[pc+1], prog[pc+2], suffix, op->name, disp); + code, prog[pc+1], prog[pc+2], suffix, op->name, disp & 0xffff); return op->bytes; }