diff --git a/NOTES.txt b/NOTES.txt index 0e60aa3..46c1159 100644 --- a/NOTES.txt +++ b/NOTES.txt @@ -1,8 +1,8 @@ -Name Year 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 -Commodore BASIC 2 1979 Y Y CBM CONFIG_2 -KBD BASIC 1980 Y N KBD -MicroTAN 1980 Y Y - \ No newline at end of file +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 +Commodore BASIC 2 1979 Y Y CBM CONFIG_2 +KBD BASIC 1980 Y N KBD +MicroTAN 1980 Y Y - diff --git a/apple_extra.s b/apple_extra.s index 5d86a14..d9e9287 100644 --- a/apple_extra.s +++ b/apple_extra.s @@ -89,7 +89,7 @@ INLINX: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0 -L29D0: +USR_FUNC: jsr L29DA lda FAC+3 sta FAC+5 diff --git a/defines_apple.s b/defines_apple.s index 60b3d09..7b25eaa 100644 --- a/defines_apple.s +++ b/defines_apple.s @@ -1,3 +1,5 @@ +; http://apple2.org.za/gswv/a2zine/GS.WorldView/Resources/GS.TECH.INFO/AppleSoft/ + CONFIG_11 := 1 CBM2_APPLE := 1 CONFIG_SAFE_NAMENOTFOUND := 1 @@ -6,7 +8,7 @@ CBM1_APPLE := 1 CBM_APPLE := 1 KIM_APPLE := 1 APPLE_MICROTAN := 1 -CONFIG_SCRTCH_ORDER := 1 +.define CONFIG_SCRTCH_ORDER 3 CONFIG_PRINT_CR := 1 ; print CR when line end reached CONFIG_IO_MSB := 1 ; all I/O has bit #7 set ; INPUTBUFFER > $0100 diff --git a/defines_cbm.s b/defines_cbm.s index b601978..8177803 100644 --- a/defines_cbm.s +++ b/defines_cbm.s @@ -28,6 +28,7 @@ CONFIG_DATAFLAG := 1 CONFIG_FILE := 1; support PRINT#, INPUT#, GET#, CMD CONFIG_NO_CR := 1; terminal doesn't need explicit CRs on line ends CONFIG_NO_LINE_EDITING := 1; support for "@", "_", BEL etc. +.define CONFIG_SCRTCH_ORDER 2 CRLF_1 := $0D CRLF_2 := $0A diff --git a/defines_kbd.s b/defines_kbd.s index d53c3ca..daa27bd 100644 --- a/defines_kbd.s +++ b/defines_kbd.s @@ -1,4 +1,4 @@ -CONFIG_SCRTCH_ORDER := 1 +.define CONFIG_SCRTCH_ORDER 3 CONFIG_SMALL := 1 CONFIG_2 := 1 CBM2_KBD := 1 diff --git a/defines_kim.s b/defines_kim.s index 8d04246..8ebb541 100644 --- a/defines_kim.s +++ b/defines_kim.s @@ -7,6 +7,7 @@ KIM_APPLE := 1 CONFIG_NULL := 1 CONFIG_PRINT_CR := 1 ; print CR when line end reached KIM_MICROTAN := 1 +.define CONFIG_SCRTCH_ORDER 2 CRLF_1 := $0D CRLF_2 := $0A diff --git a/defines_microtan.s b/defines_microtan.s index e94bbc5..a8ca0c9 100644 --- a/defines_microtan.s +++ b/defines_microtan.s @@ -13,6 +13,7 @@ CONFIG_2 := 1 CONFIG_NULL := 1 CONFIG_PRINT_CR := 1 ; print CR when line end reached +.define CONFIG_SCRTCH_ORDER 1 CRLF_1 := $0D CRLF_2 := $0A @@ -58,8 +59,8 @@ SPACE_FOR_GOSUB := $3E NULL_MAX := $F0 ; probably different in original version; the image I have seems to be modified; see PDF -RAMSTART2 := $AAAA -USR := $AAAA +RAMSTART2 := $0400 +USR := $0021 SAVE := $AAAA LOAD := $AAAA LE21C := $AAAA diff --git a/defines_osi.s b/defines_osi.s index 75f9d01..8ea5484 100644 --- a/defines_osi.s +++ b/defines_osi.s @@ -3,8 +3,7 @@ CONFIG_NULL := 1 CONFIG_PRINT_CR := 1 ; print CR when line end reached CONFIG_DATAFLAG := 1 -; minor: just code order -CONFIG_SCRTCH_ORDER := 1 +.define CONFIG_SCRTCH_ORDER 3 CRLF_1 := $0D CRLF_2 := $0A diff --git a/init.s b/init.s index c7888a1..bc2c9ee 100644 --- a/init.s +++ b/init.s @@ -20,21 +20,21 @@ COLD_START: lda $0353 sta $05 .else -.ifndef CONFIG_CBM_ALL + .ifndef CONFIG_CBM_ALL lda #QT_WRITTEN_BY jsr STROUT -.endif + .endif COLD_START2: -.ifndef CBM2 + .ifndef CBM2 ldx #$FF stx CURLIN+1 -.endif -.if INPUTBUFFER >= $0100 + .endif + .if INPUTBUFFER >= $0100 ldx #$FB -.endif + .endif txs -.ifndef CONFIG_CBM_ALL + .ifndef CONFIG_CBM_ALL lda #COLD_START2 sta Z00+1 @@ -49,59 +49,60 @@ COLD_START2: ldy #>GIVAYF sta GOGIVEAYF sty GOGIVEAYF+1 -.endif + .endif lda #$4C -.ifdef CONFIG_CBM_ALL + .ifdef CONFIG_CBM_ALL sta JMPADRS sta Z00 -.else + .else sta Z00 sta GOWARM sta JMPADRS -.endif -.ifdef APPLE_MICROTAN + .endif + .ifdef APPLE sta L000A -.endif -.ifdef CONFIG_SMALL + .endif + .if .def(CONFIG_SMALL) || .def(MICROTAN) sta USR - lda #$88 - ldy #$AE - sta $0B - sty $0C -.endif -.ifdef CONFIG_CBM_ALL - lda #IQERR -.endif -.ifdef APPLE - lda #L29D0 -.endif -.ifdef CBM_APPLE - sta USR+1 - sty USR+2 -.endif -.ifndef CONFIG_CBM_ALL -.ifdef APPLE + .endif + + .ifndef KIM + .ifdef APPLE + lda #USR_FUNC + .else + lda #IQERR + .endif + sta USR+1 + sty USR+2 + .endif + .ifndef CONFIG_CBM_ALL + .ifdef APPLE lda #$28 -.else + .else + .ifdef MICROTAN + lda #$50 + .else lda #$48 -.endif + .endif + .endif sta Z17 -.ifdef APPLE + .ifdef APPLE lda #$0E -.else + .else lda #$38 -.endif + .endif sta Z18 -.endif -.ifdef CONFIG_2 + .endif + .ifdef CBM2_KBD lda #$28 sta $0F lda #$1E sta $10 -.endif -.endif + .endif +.endif /* KBD */ + .ifdef CONFIG_SMALL .ifdef KBD ldx #GENERIC_CHRGET_END-GENERIC_CHRGET+4 @@ -179,8 +180,8 @@ L4098: .endif ldy #>RAMSTART2 .ifdef CONFIG_2 - sta $28 - sty $29 + sta TXTTAB + sty TXTTAB+1 .endif sta LINNUM sty LINNUM+1 @@ -321,15 +322,18 @@ L4183: tya sta (TXTTAB),y inc TXTTAB -.ifndef CONFIG_2 +.ifndef CBM2_KBD bne L4192 inc TXTTAB+1 L4192: +.endif +.if CONFIG_SCRTCH_ORDER = 1 + jsr SCRTCH .endif lda TXTTAB ldy TXTTAB+1 jsr REASON -.ifdef CONFIG_2 +.ifdef CBM2_KBD lda #QT_BASIC jsr STROUT @@ -346,7 +350,7 @@ L4192: lda #QT_BYTES_FREE jsr STROUT -.ifndef CONFIG_SCRTCH_ORDER +.if CONFIG_SCRTCH_ORDER = 2 jsr SCRTCH .endif .ifdef CONFIG_CBM_ALL @@ -356,8 +360,8 @@ L4192: ldy #>STROUT sta GOWARM+1 sty GOWARM+2 -.ifdef CONFIG_SCRTCH_ORDER - jsr SCRTCH +.if CONFIG_SCRTCH_ORDER = 3 + jsr SCRTCH .endif lda #RESTART @@ -365,7 +369,8 @@ L4192: sty Z00+2 jmp (Z00+1) .endif -.ifndef CBM_APPLE + +.if .def(KIM) || .def(OSI) QT_WANT: .byte "WANT SIN-COS-TAN-ATN" .byte $00 @@ -396,7 +401,7 @@ QT_BYTES_FREE: .ifndef CBM_APPLE .byte $0D,$0A,$0D,$0A .endif -.ifdef CONFIG_2 +.ifdef CBM2_KBD .byte $0D,$00 .endif .ifdef APPLE @@ -409,6 +414,9 @@ QT_BASIC: .ifdef KIM .byte "MOS TECH 6502 BASIC V1.1" .endif +.ifdef MICROTAN + .byte "MICROTAN BASIC" +.endif .ifdef CBM1 .byte $13 .byte "*** COMMODORE BASIC ***" @@ -424,7 +432,11 @@ QT_BASIC: .endif .ifndef CONFIG_CBM_ALL .byte $0D,$0A +.ifdef MICROTAN + .byte "(C) 1980 MICROSOFT" ; E1F2 28 43 29 20 31 39 38 30 (C) 1980 +.else .byte "COPYRIGHT 1977 BY MICROSOFT CO." +.endif .byte $0D,$0A,$00 .endif .endif /* KBD */