From 3306035d6277fdd76c4c679c2866c53f7f21b691 Mon Sep 17 00:00:00 2001 From: Michael Steil Date: Thu, 16 Oct 2008 09:28:49 +0000 Subject: [PATCH] cleanup --- NOTES.txt | 4 ++-- defines_cbm.s | 1 + defines_kbd.s | 3 ++- defines_microtan.s | 1 + eval.s | 3 ++- float.s | 3 ++- flow.s | 4 ++-- program.s | 12 +++++------- trig.s | 8 ++++++-- 9 files changed, 23 insertions(+), 16 deletions(-) diff --git a/NOTES.txt b/NOTES.txt index 3979b45..8437e4b 100644 --- a/NOTES.txt +++ b/NOTES.txt @@ -3,7 +3,7 @@ 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 -Commodore BASIC 2 1979 Y Y CBM CONFIG_2 -AppleSoft II 1978 Y Y Apple +AppleSoft II 1978 Y Y Apple CONFIG_2 +Commodore BASIC 2 1979 Y Y CBM CONFIG_2A KBD BASIC 1980 Y N KBD MicroTAN 1979 Y Y - diff --git a/defines_cbm.s b/defines_cbm.s index d710841..1d65c2d 100644 --- a/defines_cbm.s +++ b/defines_cbm.s @@ -14,6 +14,7 @@ CONFIG_CBM_ALL := 1 CONFIG_11 := 1 CONFIG_11A := 1 CONFIG_2 := 1 +CONFIG_2A := 1 CBM2_KBD := 1 ; 2 weird instances CBM2_MICROTAN := 1 CBM2_KIM := 1 diff --git a/defines_kbd.s b/defines_kbd.s index b05388f..54b74b0 100644 --- a/defines_kbd.s +++ b/defines_kbd.s @@ -1,10 +1,11 @@ .define CONFIG_SCRTCH_ORDER 3 CONFIG_SMALL := 1 -CONFIG_2 := 1 CBM2_KBD := 1 ; 2 weird instances KBD_MICROTAN := 1 CONFIG_11 := 1 CONFIG_11A := 1 +CONFIG_2 := 1 +CONFIG_2A := 1 CONFIG_SAFE_NAMENOTFOUND := 1 ; INPUTBUFFER > $0100 CONFIG_NO_POKE := 1 diff --git a/defines_microtan.s b/defines_microtan.s index f17ec83..f4f4697 100644 --- a/defines_microtan.s +++ b/defines_microtan.s @@ -8,6 +8,7 @@ CONFIG_MONCOUT_DESTROYS_Y := 1 APPLE_MICROTAN := 1 CONFIG_2 := 1 +CONFIG_2A := 1 CONFIG_NULL := 1 CONFIG_PRINT_CR := 1 ; print CR when line end reached diff --git a/eval.s b/eval.s index f4de477..df5792e 100644 --- a/eval.s +++ b/eval.s @@ -242,6 +242,7 @@ FRM_STACK2: sta INDEX .ifndef KBD_MICROTAN inc INDEX ; bug: assumes not on page boundary +; bug exists on AppleSoft II .endif pla sta INDEX+1 @@ -473,7 +474,7 @@ LCE3B: jmp LD353 LCE53: .endif -.ifdef KBD_MICROTAN ; also AppleSoft 2 +.ifdef KBD_MICROTAN ; also AppleSoft II ; bugfix? ldx #$00 stx STRNG1+1 diff --git a/float.s b/float.s index 83cf39d..25e80cb 100644 --- a/float.s +++ b/float.s @@ -170,7 +170,8 @@ L36C7: sty FACEXTENSION adc #$08 .ifdef KBD_MICROTAN -; bugfix? does not exist on AppleSoft 2 +; bugfix? +; fix does not exist on AppleSoft 2 cmp #(MANTISSA_BYTES+1)*8 .else cmp #MANTISSA_BYTES*8 diff --git a/flow.s b/flow.s index bc5a372..42c2f78 100644 --- a/flow.s +++ b/flow.s @@ -276,7 +276,7 @@ END2: ldy TXTPTR+1 .if (INPUTBUFFER >=$0100) && .def(CONFIG_2) ; BUG on AppleSoft I -; exists on AppleSoft II +; fix exists on AppleSoft II ; TXTPTR+1 will always be > 0 ldx CURLIN+1 inx @@ -459,7 +459,7 @@ POP: bne L281E lda #$FF .ifdef CONFIG_2 - sta FORPNT+1 ; bugfix, wrong in AppleSoft + sta FORPNT+1 ; bugfix, wrong in AppleSoft II .else sta FORPNT .endif diff --git a/program.s b/program.s index d1414eb..82f1d23 100644 --- a/program.s +++ b/program.s @@ -205,14 +205,14 @@ L23AD: .endif ; ---------------------------------------------------------------------------- PUT_NEW_LINE: -.ifdef CBM2_MICROTAN +.ifndef KBD + .ifdef CONFIG_2 jsr SETPTRS jsr LE33D lda INPUTBUFFER beq L2351 clc -.else - .ifndef KBD + .else lda INPUTBUFFER beq FIX_LINKS lda MEMSIZ @@ -333,11 +333,9 @@ LE39A: lda VARTAB+1,x adc $051C,y sta VARTAB+1,y -RET3: - rts .endif -.ifdef CBM2_MICROTAN +.ifdef CONFIG_2 RET3: rts .endif @@ -527,7 +525,7 @@ L2498: jsr GET_UPPER .else lda INPUTBUFFERX,x - .ifndef CBM2_MICROTAN + .ifndef CONFIG_2 cmp #$20 beq L2497 .endif diff --git a/trig.s b/trig.s index eae7633..788bf17 100644 --- a/trig.s +++ b/trig.s @@ -115,12 +115,16 @@ POLY_SIN: .byte $07,$FB,$F8,$87,$99,$68,$89,$01 .byte $87,$23,$35,$DF,$E1,$86,$A5,$5D .byte $E7,$28,$83,$49,$0F,$DA,$A2 - .ifdef CBM2_MICROTAN + .ifdef CBM1 +; no easter egg text on CBM1 + .elseif .def(CONFIG_2A) +; PET encoded easter egg text since CBM2 MICROSOFT: .byte $A1,$54,$46,$8F,$13,$8F,$52,$43 .byte $89,$CD - .elseif .def(CONFIG_CBM_ALL) .else +; ASCII encoded easter egg in between +; also AppleSoft II MICROSOFT: .byte $A6,$D3,$C1,$C8,$D4,$C8,$D5,$C4 .byte $CE,$CA