mirror of
https://github.com/mist64/msbasic.git
synced 2024-12-21 17:30:09 +00:00
cleanup
This commit is contained in:
parent
309b714632
commit
24a4657e04
@ -40,18 +40,15 @@ TXPSV := $0053
|
|||||||
INPUTBUFFER := $0200
|
INPUTBUFFER := $0200
|
||||||
INPUTBUFFERX := $0200
|
INPUTBUFFERX := $0200
|
||||||
|
|
||||||
L1800 := $1800
|
|
||||||
L1873 := $1873
|
|
||||||
MONRDKEY := $FD0C
|
MONRDKEY := $FD0C
|
||||||
MONCOUT := $FDED
|
MONCOUT := $FDED
|
||||||
|
|
||||||
STACK_TOP := $F8
|
STACK_TOP := $F8
|
||||||
SPACE_FOR_GOSUB := $36
|
SPACE_FOR_GOSUB := $36
|
||||||
NUM_TOKENS := $1C
|
|
||||||
MAX_EXPON = 10
|
|
||||||
|
|
||||||
RAMSTART3 := $2A00
|
RAMSTART3 := $2A00
|
||||||
RAMSTART2 := $2A00
|
RAMSTART2 := $2A00
|
||||||
|
|
||||||
LF689 := $F689
|
LF689 := $F689
|
||||||
LF800 := $F800
|
LF800 := $F800
|
||||||
LF819 := $F819
|
LF819 := $F819
|
||||||
@ -64,19 +61,7 @@ LFD6A := $FD6A
|
|||||||
LFECD := $FECD
|
LFECD := $FECD
|
||||||
LFEFD := $FEFD
|
LFEFD := $FEFD
|
||||||
|
|
||||||
L0D28 := $AAAA
|
|
||||||
L000A := $000A
|
|
||||||
L123C := $AAAA
|
|
||||||
L2AAA := $AAAA
|
|
||||||
L2A52 := $AAAA
|
|
||||||
L2AA3 := $AAAA
|
|
||||||
L1008 := $AAAA
|
|
||||||
L2A6D := $AAAA
|
|
||||||
L2A68 := $AAAA
|
|
||||||
L0008 := $08
|
L0008 := $08
|
||||||
L0006 := $06
|
L0006 := $06
|
||||||
L1F20 := $AAAA
|
L000A := $0A
|
||||||
L00A4 := $A4
|
L00A4 := $A4
|
||||||
L1751 := $AAAA
|
|
||||||
L2198 := $AAAA
|
|
||||||
L13D7 := $AAAA
|
|
||||||
|
@ -94,13 +94,7 @@ STACK_TOP := $FC
|
|||||||
SPACE_FOR_GOSUB := $3E
|
SPACE_FOR_GOSUB := $3E
|
||||||
STACK_TOP := $FA
|
STACK_TOP := $FA
|
||||||
.endif
|
.endif
|
||||||
NUM_TOKENS := $23
|
|
||||||
NULL_MAX := $0A
|
NULL_MAX := $0A
|
||||||
.ifdef CBM1
|
|
||||||
MAX_EXPON = 12
|
|
||||||
.else
|
|
||||||
MAX_EXPON = 10
|
|
||||||
.endif
|
|
||||||
|
|
||||||
RAMSTART2 := $0400
|
RAMSTART2 := $0400
|
||||||
RAMSTART3 := $0400
|
RAMSTART3 := $0400
|
||||||
|
@ -52,9 +52,6 @@ SAVE := $FFF7
|
|||||||
|
|
||||||
STACK_TOP := $FE
|
STACK_TOP := $FE
|
||||||
SPACE_FOR_GOSUB := $49
|
SPACE_FOR_GOSUB := $49
|
||||||
NUM_TOKENS := $1D
|
|
||||||
NULL_MAX := $0A
|
|
||||||
MAX_EXPON = 10
|
|
||||||
|
|
||||||
RAMSTART3 := $0300
|
RAMSTART3 := $0300
|
||||||
CONST_MEMSIZ := $3FFF
|
CONST_MEMSIZ := $3FFF
|
||||||
|
@ -45,7 +45,5 @@ MONCOUT := $1EA0
|
|||||||
|
|
||||||
STACK_TOP := $FC
|
STACK_TOP := $FC
|
||||||
SPACE_FOR_GOSUB := $36
|
SPACE_FOR_GOSUB := $36
|
||||||
NUM_TOKENS := $1D
|
|
||||||
NULL_MAX := $F2 ; probably different in original version; the image I have seems to be modified; see PDF
|
NULL_MAX := $F2 ; probably different in original version; the image I have seems to be modified; see PDF
|
||||||
MAX_EXPON = 10
|
|
||||||
|
|
||||||
|
@ -40,7 +40,6 @@ RNDSEED := $00D4
|
|||||||
|
|
||||||
L0207 := $0207
|
L0207 := $0207
|
||||||
L020A := $020A
|
L020A := $020A
|
||||||
L2A13 := $2A0A
|
|
||||||
MONRDKEY := $FFEB
|
MONRDKEY := $FFEB
|
||||||
MONCOUT := $FFEE
|
MONCOUT := $FFEE
|
||||||
MONISCNTC := $FFF1
|
MONISCNTC := $FFF1
|
||||||
@ -49,9 +48,7 @@ SAVE := $FFF7
|
|||||||
|
|
||||||
STACK_TOP := $FC
|
STACK_TOP := $FC
|
||||||
SPACE_FOR_GOSUB := $33
|
SPACE_FOR_GOSUB := $33
|
||||||
NUM_TOKENS := $1C
|
|
||||||
NULL_MAX := $0A
|
NULL_MAX := $0A
|
||||||
MAX_EXPON = 10
|
|
||||||
|
|
||||||
RAMSTART3 := $0300
|
RAMSTART3 := $0300
|
||||||
RAMSTART2 := $0300
|
RAMSTART2 := $0300
|
6
macros.s
6
macros.s
@ -52,6 +52,12 @@ DUMMY_START:
|
|||||||
keyword key, token
|
keyword key, token
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
|
.macro count_tokens
|
||||||
|
.segment "DUMMY"
|
||||||
|
NUM_TOKENS := <(*-DUMMY_START)
|
||||||
|
.endmacro
|
||||||
|
|
||||||
|
|
||||||
;---------------------------------------------
|
;---------------------------------------------
|
||||||
; set the MSB of every byte of a string
|
; set the MSB of every byte of a string
|
||||||
.macro asc80 str
|
.macro asc80 str
|
||||||
|
45
msbasic.s
45
msbasic.s
@ -4,38 +4,36 @@
|
|||||||
|
|
||||||
.if .def(cbmbasic1)
|
.if .def(cbmbasic1)
|
||||||
CBM1 := 1
|
CBM1 := 1
|
||||||
.include "defines_cbm.s" ; 6
|
.include "defines_cbm.s"
|
||||||
.elseif .def(osi)
|
.elseif .def(osi)
|
||||||
OSI := 1
|
OSI := 1
|
||||||
.include "defines_osi.s"; 2
|
.include "defines_osi.s"
|
||||||
.elseif .def(applesoft)
|
.elseif .def(applesoft)
|
||||||
APPLE := 1
|
APPLE := 1
|
||||||
.include "defines_apple.s"; 10
|
.include "defines_apple.s"
|
||||||
.elseif .def(kb9)
|
.elseif .def(kb9)
|
||||||
KIM := 1
|
KIM := 1
|
||||||
.include "defines_kim.s" ; 7
|
.include "defines_kim.s"
|
||||||
.elseif .def(cbmbasic2)
|
.elseif .def(cbmbasic2)
|
||||||
CBM2 := 1
|
CBM2 := 1
|
||||||
.include "defines_cbm.s" ; 11
|
.include "defines_cbm.s"
|
||||||
.elseif .def(kbdbasic)
|
.elseif .def(kbdbasic)
|
||||||
KBD := 1
|
KBD := 1
|
||||||
.include "defines_kbd.s" ; 10
|
.include "defines_kbd.s"
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.ifdef CONFIG_SMALL
|
.ifdef CONFIG_SMALL
|
||||||
BYTES_FP := 4
|
BYTES_FP := 4
|
||||||
BYTES_PER_ELEMENT := 4
|
|
||||||
BYTES_PER_VARIABLE := 6
|
BYTES_PER_VARIABLE := 6
|
||||||
.else
|
.else
|
||||||
BYTES_FP := 5
|
BYTES_FP := 5
|
||||||
.ifdef APPLE
|
|
||||||
BYTES_PER_ELEMENT := 6 ; ??? should be 5 on Apple
|
|
||||||
.else
|
|
||||||
BYTES_PER_ELEMENT := 5
|
|
||||||
.endif
|
|
||||||
BYTES_PER_VARIABLE := 7
|
BYTES_PER_VARIABLE := 7
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.ifdef APPLE
|
||||||
|
BYTES_PER_ELEMENT := 6 ; ???
|
||||||
|
.else
|
||||||
|
BYTES_PER_ELEMENT := BYTES_FP
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
MANTISSA_BYTES := BYTES_FP-1
|
MANTISSA_BYTES := BYTES_FP-1
|
||||||
@ -44,6 +42,13 @@ BYTES_PER_FRAME := 2*BYTES_FP+8
|
|||||||
FOR_STACK1 := 2*BYTES_FP+5
|
FOR_STACK1 := 2*BYTES_FP+5
|
||||||
FOR_STACK2 := BYTES_FP+4
|
FOR_STACK2 := BYTES_FP+4
|
||||||
|
|
||||||
|
.ifdef CBM1
|
||||||
|
MAX_EXPON = 12
|
||||||
|
.else
|
||||||
|
MAX_EXPON = 10
|
||||||
|
.endif
|
||||||
|
|
||||||
|
|
||||||
.include "macros.s"
|
.include "macros.s"
|
||||||
.include "zeropage.s"
|
.include "zeropage.s"
|
||||||
|
|
||||||
@ -135,6 +140,8 @@ STACK := $0100
|
|||||||
.endif
|
.endif
|
||||||
keyword_rts "NEW", NEW
|
keyword_rts "NEW", NEW
|
||||||
|
|
||||||
|
count_tokens
|
||||||
|
|
||||||
keyword "TAB(", TOKEN_TAB
|
keyword "TAB(", TOKEN_TAB
|
||||||
keyword "TO", TOKEN_TO
|
keyword "TO", TOKEN_TO
|
||||||
keyword "FN", TOKEN_FN
|
keyword "FN", TOKEN_FN
|
||||||
@ -7703,13 +7710,13 @@ L29E0:
|
|||||||
jmp LFB40
|
jmp LFB40
|
||||||
.byte 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
|
||||||
L29F0:
|
L29F0:
|
||||||
pha ; 29F0 48 H
|
pha
|
||||||
ldx #$01 ; 29F1 A2 01 ..
|
ldx #$01
|
||||||
inc $B9 ; 29F3 E6 B9 ..
|
inc $B9
|
||||||
bne L29F9 ; 29F5 D0 02 ..
|
bne L29F9
|
||||||
inc $BA ; 29F7 E6 BA ..
|
inc $BA
|
||||||
L29F9:
|
L29F9:
|
||||||
jmp L291E ; 29F9 4C 1E 29 L.)
|
jmp L291E
|
||||||
.byte $00,$00,$00,$00,$41,$53,$21,$D2
|
.byte $00,$00,$00,$00,$41,$53,$21,$D2
|
||||||
.byte $02,$FA,$00
|
.byte $02,$FA,$00
|
||||||
lda $12
|
lda $12
|
||||||
|
Loading…
Reference in New Issue
Block a user