diff --git a/TODO.txt b/TODO.txt index 970a804..eecb8cd 100644 --- a/TODO.txt +++ b/TODO.txt @@ -2,7 +2,6 @@ * use linker magic to compile files separately * convert messy init code into completely different files without ifdefs (not much in common!) -* generate keyword and pointer list together * generalize CHRGOT definition * rename all labels that point to RTS to RTSn * add AppleSoft comments \ No newline at end of file diff --git a/defines_apple.s b/defines_apple.s index aff675a..6cf112e 100644 --- a/defines_apple.s +++ b/defines_apple.s @@ -46,7 +46,6 @@ MONCOUT := $FDED STACK_TOP := $F8 SPACE_FOR_GOSUB := $36 -RAMSTART3 := $2A00 RAMSTART2 := $2A00 LF689 := $F689 diff --git a/defines_cbm.s b/defines_cbm.s index 1d26f31..de71eed 100644 --- a/defines_cbm.s +++ b/defines_cbm.s @@ -97,7 +97,6 @@ STACK_TOP := $FA NULL_MAX := $0A RAMSTART2 := $0400 -RAMSTART3 := $0400 OPEN := $FFC0 diff --git a/defines_kbd.s b/defines_kbd.s index bafb3b4..b2640ea 100644 --- a/defines_kbd.s +++ b/defines_kbd.s @@ -53,7 +53,6 @@ SAVE := $FFF7 STACK_TOP := $FE SPACE_FOR_GOSUB := $49 -RAMSTART3 := $0300 CONST_MEMSIZ := $3FFF RAMSTART2 := $0300 diff --git a/defines_osi.s b/defines_osi.s index aded8f7..e71b2ff 100644 --- a/defines_osi.s +++ b/defines_osi.s @@ -50,5 +50,4 @@ STACK_TOP := $FC SPACE_FOR_GOSUB := $33 NULL_MAX := $0A -RAMSTART3 := $0300 RAMSTART2 := $0300 \ No newline at end of file diff --git a/msbasic.s b/msbasic.s index aca4d24..9062594 100644 --- a/msbasic.s +++ b/msbasic.s @@ -24,10 +24,8 @@ KBD := 1 .ifdef CONFIG_SMALL BYTES_FP := 4 -BYTES_PER_VARIABLE := 6 .else BYTES_FP := 5 -BYTES_PER_VARIABLE := 7 .endif .ifdef APPLE @@ -35,9 +33,8 @@ BYTES_PER_ELEMENT := 6 ; ??? .else BYTES_PER_ELEMENT := BYTES_FP .endif - +BYTES_PER_VARIABLE := BYTES_FP+2 MANTISSA_BYTES := BYTES_FP-1 - BYTES_PER_FRAME := 2*BYTES_FP+8 FOR_STACK1 := 2*BYTES_FP+5 FOR_STACK2 := BYTES_FP+4 @@ -6598,9 +6595,10 @@ POLY_ATN: RAMSTART1: GENERIC_CHRGET: inc TXTPTR - bne L4047 + bne GENERIC_CHRGOT inc TXTPTR+1 -L4047: +GENERIC_CHRGOT: +GENERIC_TXTPTR = GENERIC_CHRGOT + 1 lda $EA60 .ifdef KBD jsr LF430 @@ -6900,8 +6898,8 @@ L4129: L4136: .endif .ifndef KIM - ldx #RAMSTART3 + ldx #RAMSTART2 .else lda #QT_WANT diff --git a/zeropage.s b/zeropage.s index f15512e..6f4cc90 100644 --- a/zeropage.s +++ b/zeropage.s @@ -110,11 +110,10 @@ FACEXTENSION: STRNG2: .res 2 CHRGET: + .res 7 .res 6 -CHRGOT: - .res 1 -TXTPTR: - .res 6 +CHRGOT = GENERIC_CHRGOT-GENERIC_CHRGET + CHRGET +TXTPTR = <(GENERIC_TXTPTR-GENERIC_CHRGET + CHRGET) .ifndef CONFIG_SMALL L00CF: .res 11