diff --git a/NOTES.txt b/NOTES.txt index d014413..bd7ae63 100644 --- a/NOTES.txt +++ b/NOTES.txt @@ -1,9 +1,9 @@ -Name Release MS Version ROM 9digit extensions comment -Commodore BASIC 1 1977 Y Y CBM -OSI BASIC 1977 1.0 REV 3.2 Y N - -AppleSoft I 1977 1.1 N Y Apple CONFIG_11 -KIM BASIC 1977 1.1 N Y - CONFIG_11A -AppleSoft II 1978 Y Y Apple CONFIG_2 -Commodore BASIC 2 1979 Y Y CBM CONFIG_2A -KBD BASIC 1980 Y N KBD CONFIG_2B -MicroTAN 1979 Y Y - +Name Release MS Version ROM 9digit INPUTBUFFER extensions comment +Commodore BASIC 1 1977 Y Y ZP CBM +OSI BASIC 1977 1.0 REV 3.2 Y N ZP - CONFIG_10A +AppleSoft I 1977 1.1 N Y $0200 Apple CONFIG_11 +KIM BASIC 1977 1.1 N Y ZP - CONFIG_11A +AppleSoft II 1978 Y Y $0200 Apple CONFIG_2 +Commodore BASIC 2 1979 Y Y $0200 CBM CONFIG_2A +KBD BASIC 1980 Y N $0700 KBD CONFIG_2B +MicroTAN 1979 Y Y ZP - CONFIG_2C diff --git a/array.s b/array.s index 274b07f..439b7ec 100644 --- a/array.s +++ b/array.s @@ -21,8 +21,8 @@ L2FAF: NEG32768: .byte $90,$80,$00,$00 -.ifdef MICROTAN - .byte 0 +.ifdef CONFIG_2C + .byte $00; bugfix: short number .endif ; ---------------------------------------------------------------------------- diff --git a/defines_apple.s b/defines_apple.s index 29f5826..2eb5084 100644 --- a/defines_apple.s +++ b/defines_apple.s @@ -1,6 +1,7 @@ ; http://apple2.org.za/gswv/a2zine/GS.WorldView/Resources/GS.TECH.INFO/AppleSoft/ ; configuration +CONFIG_10A := 1 CONFIG_11 := 1 CONFIG_IO_MSB := 1 ; all I/O has bit #7 set CONFIG_PRINT_CR := 1 ; print CR when line end reached diff --git a/defines_cbm.s b/defines_cbm.s index 23cae25..824bce6 100644 --- a/defines_cbm.s +++ b/defines_cbm.s @@ -11,10 +11,10 @@ CONFIG_SCRTCH_ORDER := 2 CONFIG_BUG_GET_ERROR := 1; treat GET error like READ error CONFIG_CBM1_PATCHES := 1 ; ** don't turn off! ** CONFIG_DATAFLAG := 1 -CONFIG_INPUTBUFFER_ORDER := 1 ; ldx/ldy or ldy/ldx CONFIG_PRINTNULLS := 1; whether PRINTNULLS does anything CONFIG_SPC_IS_CRSR_RIGHT := 1; always print CRSR RIGHT for SPC() (otherwise only for screen output) .else +CONFIG_10A := 1 CONFIG_11 := 1 CONFIG_11A := 1 CONFIG_2 := 1 diff --git a/defines_kbd.s b/defines_kbd.s index 07ad39b..7b78ea4 100644 --- a/defines_kbd.s +++ b/defines_kbd.s @@ -1,4 +1,5 @@ ; configuration +CONFIG_10A := 1 CONFIG_11 := 1 CONFIG_11A := 1 CONFIG_2 := 1 diff --git a/defines_kim.s b/defines_kim.s index f9c7dd7..7318515 100644 --- a/defines_kim.s +++ b/defines_kim.s @@ -1,4 +1,5 @@ ; configuration +CONFIG_10A := 1 CONFIG_11 := 1 CONFIG_11A := 1 diff --git a/defines_microtan.s b/defines_microtan.s index 3024748..438ae18 100644 --- a/defines_microtan.s +++ b/defines_microtan.s @@ -1,9 +1,11 @@ ; configuration +CONFIG_10A := 1 CONFIG_11 := 1 CONFIG_11A := 1 CONFIG_2 := 1 CONFIG_2A := 1 CONFIG_2B := 1 +CONFIG_2C := 1 CONFIG_NULL := 1 CONFIG_MONCOUT_DESTROYS_Y := 1 diff --git a/input.s b/input.s index 385921d..f1cca3e 100644 --- a/input.s +++ b/input.s @@ -236,19 +236,35 @@ PROCESS_INPUT_ITEM: and #$7F .endif sta INPUTBUFFER - .ifdef CONFIG_INPUTBUFFER_ORDER -; the order is about whether -; the beq/bne is taken or not +; BUG: The beq/bne L2AF8 below is supposed +; to be always taken. For this to happen, +; the last load must be a 0 for beq +; and != 0 for bne. The original Microsoft +; code had ldx/ldy/bne here, which was only +; correct for a non-ZP INPUTBUFFER. Commodore +; fixed it in CBMBASIC V1 by swapping the +; ldx and the ldy. It was broken on OSI and +; KIM, and okay on APPLE and CBM2, because +; these used a non-ZP INPUTBUFFER. +; Microsoft fixed this somewhere after KIM +; and before MICROTAN, by using beq instead +; of bne in the ZP case. + .ifdef CBM1 ldy #>(INPUTBUFFER-1) ldx #<(INPUTBUFFER-1) .else ldx #<(INPUTBUFFER-1) ldy #>(INPUTBUFFER-1) .endif - .ifdef MICROTAN - beq L2AF8 + .ifndef CONFIG_NO_INPUTBUFFER_ZP + .ifdef CONFIG_2 + __BEQ = 1 + .endif + .endif + .ifdef __BEQ + beq L2AF8 ; always .else - bne L2AF8 + bne L2AF8 ; always .endif L2AF0: .endif