Mercurial > hg > Members > kono > os9 > sbc09
changeset 90:ec33be78865e
add basic to os9 level2
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 21 Aug 2018 17:54:26 +0900 |
parents | 4149bcd915e0 |
children | 1de7b2760b9d |
files | src/os9/level2/cmds/Makefile src/os9/level2/cmds/fixbasic.pl |
diffstat | 2 files changed, 53 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/os9/level2/cmds/Makefile Mon Aug 20 11:29:20 2018 +0900 +++ b/src/os9/level2/cmds/Makefile Tue Aug 21 17:54:26 2018 +0900 @@ -5,7 +5,7 @@ OBJ1 = asm attr calldbg cmp config copy cputype date debug del deldir devs dir dir_cb dirsort dump echo edit \ error free help ident irqs link list load login makdir pxd pwd procs prompt shellplus sleep tee touch tsmon unlink \ - game09 sbc09 + game09 sbc09 kernel09.s basic.s all : $(OBJ2) $(OBJ1) @@ -20,6 +20,18 @@ sbc09 : $(A09) -l $@.lst -o $@ $@.asm + +# sbc09 cmds/kernel09.s +kernel09.s : ../../../../examples_forth/kernel09 + cp ../../../../examples_forth/kernel09 kernel09.s + +# sbc09 cmds/basic.s +basic.asm : ../../../../basic/basic.asm + perl fixbasic.pl ../../../../basic/basic.asm > basic.asm + +basic.s : basic.asm + $(A09) -l $@.lst -s $@ basic.asm + mdir : $(A09) -l $@.lst -o $@ $(SRC2)/$@.asm mfree :
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/os9/level2/cmds/fixbasic.pl Tue Aug 21 17:54:26 2018 +0900 @@ -0,0 +1,40 @@ +#!/usr/bin/perl +# + +while(<>) { + next if (/^ACIA/ .. /^TDRE/) ; + next if (/^TSTBRK/ .. /^ END/) ; + print; +} + + +print <<"EOFEOF" +****************************** +****************************** +TSTBRK bsr BRKEEE + bcc GETC05 +GETCHR bsr INEEE + CMPA \#ETX ; 3 + BNE GETC05 + JMP BREAK +INTEEE +GETC05 RTS +PUTCHR INC ZONE + JMP OUTEEE +****************************** +****************************** +INEEE PSHS D + JSR 0 + STB ,S + PULS D,PC +OUTEEE PSHS D + TFR A,B + JSR 3 + PULS D,PC +BRKEEE PSHS D + JSR \$12 + PULS D,PC +****************************** +****************************** + END +EOFEOF