diff --git a/make.sh b/make.sh old mode 100755 new mode 100644 index 2bfff4b..f542d65 --- a/make.sh +++ b/make.sh @@ -1,13 +1,12 @@ -# 1.0 +if [ ! -d tmp ]; then + mkdir tmp +fi + for i in cbmbasic1 cbmbasic2 kbdbasic osi kb9 applesoft microtan; do echo $i ca65 -D $i msbasic.s -o tmp/$i.o && -ld65 -C $i.cfg tmp/$i.o -o tmp/$i-new.bin -Ln tmp/$i.lbl && -xxd -g 1 orig/$i.bin > tmp/$i.bin.txt -xxd -g 1 tmp/$i-new.bin > tmp/$i-new.bin.txt -diff -u tmp/$i.bin.txt tmp/$i-new.bin.txt | head +ld65 -C $i.cfg tmp/$i.o -o tmp/$i.bin -Ln tmp/$i.lbl done -#da65 --info applesoft-temp.txt diff --git a/msbasic.s b/msbasic.s index cd0a04b..a6d12f8 100644 --- a/msbasic.s +++ b/msbasic.s @@ -43,13 +43,13 @@ ; CONFIG_NO_CR terminal doesn't need explicit CRs on line ends ; CONFIG_NO_LINE_EDITING disable support for Microsoft-style "@", "_", BEL etc. ; CONFIG_NO_POKE don't support PEEK, POKE and WAIT -; CONFIG_NO_READ_Y_IS_ZERO_HACK don't do a ver volatile trick that saves one byte +; CONFIG_NO_READ_Y_IS_ZERO_HACK don't do a very volatile trick that saves one byte ; CONFIG_NULL support for the NULL statement ; CONFIG_PEEK_SAVE_LINNUM preserve LINNUM on a PEEK ; CONFIG_PRINTNULLS whether PRINTNULLS does anything ; CONFIG_PRINT_CR print CR when line end reached ; CONFIG_RAM optimizations for RAM version of BASIC, only use on 1.x -; CONFIG_ROR_WORKAROUND use workaround for buggy 6502s from 1975/1976; doesn't work with CONFIG_SMALL! +; CONFIG_ROR_WORKAROUND use workaround for buggy 6502s from 1975/1976; not safe for CONFIG_SMALL! ; CONFIG_SAFE_NAMENOTFOUND check both bytes of the caller's address in NAMENOTFOUND ; CONFIG_SCRTCH_ORDER where in the init code to call SCRTCH ; CONFIG_SMALL use 6 digit FP instead of 9 digit, use 2 character error messages, don't have GET @@ -59,10 +59,11 @@ ; ; Credits: ; * main work by Michael Steil -; * function names and all uppercase taken from Bob Sander-Cederlof's excellent AppleSoft II disassembly: +; * function names and all uppercase comments taken from Bob Sander-Cederlof's excellent AppleSoft II disassembly: ; http://www.txbobsc.com/scsc/scdocumentor/ ; * Applesoft lite by Tom Greene http://cowgod.org/replica1/applesoft/ helped a lot, too. ; * Thanks to Joe Zbicak for help with Intellision Keyboard BASIC +; * This work is dedicated to the memory of my dear hacking pal Michael "acidity" Kollmann. .debuginfo + diff --git a/regress.sh b/regress.sh new file mode 100755 index 0000000..bbfcf00 --- /dev/null +++ b/regress.sh @@ -0,0 +1,17 @@ +if [ ! -d orig ]; then + echo Please first run make.sh on the original .s files, create + echo the directory \"orig\", and copy all .bin files from \"tmp\" + echo into \"orig\". + exit; +fi + +for i in cbmbasic1 cbmbasic2 kbdbasic osi kb9 applesoft microtan; do + +echo $i +ca65 -D $i msbasic.s -o tmp/$i.o && +ld65 -C $i.cfg tmp/$i.o -o tmp/$i-new.bin -Ln tmp/$i.lbl && +xxd -g 1 orig/$i.bin > tmp/$i.bin.txt +xxd -g 1 tmp/$i-new.bin > tmp/$i-new.bin.txt +diff -u tmp/$i.bin.txt tmp/$i-new.bin.txt | head + +done diff --git a/string.s b/string.s index f2219ad..499d4cd 100644 --- a/string.s +++ b/string.s @@ -190,7 +190,7 @@ FINDHIGHESTSTRING: ldy #$00 sty FNCNAM+1 .ifdef CONFIG_2 - sty FNCNAM + sty FNCNAM ; GC bugfix! .endif lda STREND ldx STREND+1 @@ -223,7 +223,7 @@ L335A: L335F: sta HIGHDS stx HIGHDS+1 - lda #$03 + lda #$03 ; OSI GC bugfix -> $04 ??? sta DSCLEN L3367: lda HIGHDS @@ -267,7 +267,7 @@ L3376: jsr LE7F3 ; XXX patch, call into screen editor .else .ifdef CONFIG_11 - ldy #$00 + ldy #$00 ; GC bugfix .endif asl a adc #$05 @@ -354,7 +354,7 @@ L33FA: ; ---------------------------------------------------------------------------- MOVE_HIGHEST_STRING_TO_TOP: .ifdef CONFIG_2 - lda FNCNAM+1 + lda FNCNAM+1 ; GC bugfix ora FNCNAM .else ldx FNCNAM+1