mirror of
https://github.com/mist64/msbasic.git
synced 2024-12-12 03:29:52 +00:00
zeropage work
This commit is contained in:
parent
bc6f5d0380
commit
0ad8532f5b
@ -10,7 +10,8 @@ CONFIG_SCRTCH_ORDER := 3
|
||||
CRLF_1 := CR
|
||||
CRLF_2 := $80
|
||||
|
||||
ZP_START = $55
|
||||
ZP_START1 = $0D
|
||||
ZP_START = $3D
|
||||
|
||||
JMPADRS = DSCLEN + 1
|
||||
LOWTRX = LOWTR
|
||||
@ -21,16 +22,18 @@ GOAYINT := $0006
|
||||
GOGIVEAYF := $0008
|
||||
|
||||
USR := $000A
|
||||
CHARAC := $000D
|
||||
ENDCHR := $000E
|
||||
EOLPNTR := $000F
|
||||
DIMFLG := $0010
|
||||
VALTYP := $0011
|
||||
DATAFLG := $0013
|
||||
SUBFLG := $0014
|
||||
INPUTFLG := $0015
|
||||
CPRMASK := $0016
|
||||
Z14 := $0017 ; Ctrl+O flag
|
||||
|
||||
;CHARAC := $000D
|
||||
;ENDCHR := $000E
|
||||
;EOLPNTR := $000F
|
||||
;DIMFLG := $0010
|
||||
;VALTYP := $0011
|
||||
;DATAFLG := $0013
|
||||
;SUBFLG := $0014
|
||||
;INPUTFLG := $0015
|
||||
;CPRMASK := $0016
|
||||
;Z14 := $0017 ; Ctrl+O flag
|
||||
|
||||
POSX := $0050
|
||||
Z17 := $0051
|
||||
Z18 := $0052
|
||||
|
@ -31,7 +31,8 @@ CRLF_1 := CR
|
||||
CRLF_2 := LF
|
||||
|
||||
.ifdef CBM1
|
||||
ZP_START = $65
|
||||
ZP_START1 = $5A
|
||||
ZP_START = $00
|
||||
|
||||
JMPADRS = DSCLEN + 1
|
||||
LOWTRX = LOWTR
|
||||
@ -47,38 +48,41 @@ LINNUM := $0008
|
||||
TXPSV := $0008
|
||||
INPUTBUFFER := $000A
|
||||
|
||||
CHARAC := $005A
|
||||
ENDCHR := $005B
|
||||
EOLPNTR := $005C
|
||||
DIMFLG := $005D
|
||||
VALTYP := $005E
|
||||
DATAFLG := $0060
|
||||
SUBFLG := $0061
|
||||
INPUTFLG := $0062
|
||||
CPRMASK := $0063
|
||||
Z14 := $0064 ; Ctrl+O flag
|
||||
;CHARAC := $005A
|
||||
;ENDCHR := $005B
|
||||
;EOLPNTR := $005C
|
||||
;DIMFLG := $005D
|
||||
;VALTYP := $005E
|
||||
;DATAFLG := $0060
|
||||
;SUBFLG := $0061
|
||||
;INPUTFLG := $0062
|
||||
;CPRMASK := $0063
|
||||
;Z14 := $0064 ; Ctrl+O flag
|
||||
|
||||
Z96 := $020C
|
||||
|
||||
NULL_MAX := $0A
|
||||
.else
|
||||
|
||||
ZP_START = $13
|
||||
ZP_START1 = $03
|
||||
ZP_START = $05
|
||||
|
||||
JMPADRS = DSCLEN + 1
|
||||
LOWTRX = LOWTR
|
||||
|
||||
USR := $0000
|
||||
GORESTART := $0000
|
||||
CHARAC := $005A-82-5
|
||||
ENDCHR := $005B-82-5
|
||||
EOLPNTR := $005C-82-5
|
||||
DIMFLG := $005D-82-5
|
||||
VALTYP := $005E-82-5
|
||||
DATAFLG := $0060-82-5
|
||||
SUBFLG := $0061-82-5
|
||||
INPUTFLG := $0062-82-5
|
||||
CPRMASK := $0063-82-5
|
||||
Z14 := $0064-82-5 ; Ctrl+O flag
|
||||
|
||||
;CHARAC := $005A-82-5
|
||||
;ENDCHR := $005B-82-5
|
||||
;EOLPNTR := $005C-82-5
|
||||
;DIMFLG := $005D-82-5
|
||||
;VALTYP := $005E-82-5
|
||||
;DATAFLG := $0060-82-5
|
||||
;SUBFLG := $0061-82-5
|
||||
;INPUTFLG := $0062-82-5
|
||||
;CPRMASK := $0063-82-5
|
||||
;Z14 := $0064-82-5 ; Ctrl+O flag
|
||||
|
||||
Z03 := $000E;3 ; same
|
||||
LINNUM := $0011;0008
|
||||
|
@ -14,7 +14,8 @@ CONFIG_SMALL := 1
|
||||
CRLF_1 := LF
|
||||
CRLF_2 := CR
|
||||
|
||||
ZP_START = $15
|
||||
ZP_START1 = $6
|
||||
ZP_START = $05
|
||||
|
||||
|
||||
POSX := $0010
|
||||
@ -24,16 +25,17 @@ LINNUM := $0013;11
|
||||
TXPSV := $0049
|
||||
INPUTBUFFER := $0700
|
||||
INPUTBUFFERX := $0700
|
||||
CHARAC := $0006;5B
|
||||
ENDCHR := $0007;5C
|
||||
EOLPNTR := $0008;5D
|
||||
DIMFLG := $0009;5E
|
||||
VALTYP := $000A;5F
|
||||
DATAFLG := $000B;60
|
||||
SUBFLG := $000C;61
|
||||
INPUTFLG := $000D;62
|
||||
CPRMASK := $000E;63
|
||||
Z14 := $000F;64 ; Ctrl+O flag
|
||||
|
||||
;CHARAC := $0006;5B
|
||||
;ENDCHR := $0007;5C
|
||||
;EOLPNTR := $0008;5D
|
||||
;DIMFLG := $0009;5E
|
||||
;VALTYP := $000A;5F
|
||||
;DATAFLG := $000B;60
|
||||
;SUBFLG := $000C;61
|
||||
;INPUTFLG := $000D;62
|
||||
;CPRMASK := $000E;63
|
||||
;Z14 := $000F;64 ; Ctrl+O flag
|
||||
|
||||
JMPADRS := $0093;A1
|
||||
LOWTRX := $0094;AA ; $AB also EXPSGN?
|
||||
|
@ -11,27 +11,28 @@ CONFIG_SCRTCH_ORDER := 2
|
||||
CRLF_1 := CR
|
||||
CRLF_2 := LF
|
||||
|
||||
ZP_START = $63
|
||||
ZP_START1 = $0A
|
||||
ZP_START = $4E
|
||||
|
||||
JMPADRS = DSCLEN + 1
|
||||
LOWTRX = LOWTR
|
||||
|
||||
GORESTART := $0000
|
||||
L0001 := $0001
|
||||
GOSTROUT := $0003
|
||||
GOAYINT := $0006
|
||||
GOGIVEAYF := $0008
|
||||
|
||||
CHARAC := $000A
|
||||
ENDCHR := $000B
|
||||
EOLPNTR := $000C
|
||||
DIMFLG := $000D
|
||||
VALTYP := $000E
|
||||
DATAFLG := $0010
|
||||
SUBFLG := $0011
|
||||
INPUTFLG := $0012
|
||||
CPRMASK := $0013
|
||||
Z14 := $0014 ; Ctrl+O flag
|
||||
;CHARAC := $000A
|
||||
;ENDCHR := $000B
|
||||
;EOLPNTR := $000C
|
||||
;DIMFLG := $000D
|
||||
;VALTYP := $000E
|
||||
;DATAFLG := $0010
|
||||
;SUBFLG := $0011
|
||||
;INPUTFLG := $0012
|
||||
;CPRMASK := $0013
|
||||
;Z14 := $0014 ; Ctrl+O flag
|
||||
|
||||
Z15 := $0015
|
||||
POSX := $0016
|
||||
Z17 := $0017
|
||||
|
@ -1,43 +1,49 @@
|
||||
CONFIG_11 := 1
|
||||
CONFIG_11A := 1
|
||||
CONFIG_SAFE_NAMENOTFOUND := 1
|
||||
CONFIG_PEEK_SAVE_LINNUM := 1
|
||||
CONFIG_ROR_WORKAROUND := 1
|
||||
CONFIG_MONCOUT_DESTROYS_Y := 1
|
||||
|
||||
CONFIG_2 := 1
|
||||
CONFIG_2A := 1
|
||||
CONFIG_2B := 1
|
||||
|
||||
CONFIG_NULL := 1
|
||||
CONFIG_MONCOUT_DESTROYS_Y := 1
|
||||
CONFIG_PEEK_SAVE_LINNUM := 1
|
||||
CONFIG_PRINT_CR := 1 ; print CR when line end reached
|
||||
CONFIG_ROR_WORKAROUND := 1
|
||||
CONFIG_SAFE_NAMENOTFOUND := 1
|
||||
CONFIG_SCRTCH_ORDER := 1
|
||||
|
||||
CRLF_1 := CR
|
||||
CRLF_2 := LF
|
||||
|
||||
ZP_START = $85
|
||||
ZP_START1 = $24
|
||||
ZP_START = $56
|
||||
|
||||
JMPADRS = DSCLEN + 1
|
||||
LOWTRX = LOWTR
|
||||
|
||||
GORESTART := $0017
|
||||
L0001 := $0001
|
||||
L0002 := $0002
|
||||
GOSTROUT := $001A
|
||||
GOAYINT := $001D
|
||||
GOGIVEAYF := $001F
|
||||
|
||||
CHARAC := $000A+$1A
|
||||
ENDCHR := $000B+$1A
|
||||
EOLPNTR := $000C+$1A
|
||||
DIMFLG := $000D+$1A
|
||||
VALTYP := $000E+$1A
|
||||
DATAFLG := $0010+$1A
|
||||
SUBFLG := $0011+$1A
|
||||
INPUTFLG := $0012+$1A
|
||||
CPRMASK := $0013+$1A
|
||||
Z14 := $0014+$1A ; Ctrl+O flag
|
||||
;.segment "ZEROPAGE"
|
||||
;.org $21
|
||||
;USR:
|
||||
;.res 1
|
||||
;.segment "CODE"
|
||||
USR := $0021
|
||||
|
||||
;CHARAC := $000A+$1A
|
||||
;ENDCHR := $000B+$1A
|
||||
;EOLPNTR := $000C+$1A
|
||||
;DIMFLG := $000D+$1A
|
||||
;VALTYP := $000E+$1A
|
||||
;DATAFLG := $0010+$1A
|
||||
;SUBFLG := $0011+$1A
|
||||
;INPUTFLG := $0012+$1A
|
||||
;CPRMASK := $0013+$1A
|
||||
;Z14 := $0014+$1A ; Ctrl+O flag
|
||||
|
||||
Z15 := $0015+$1A
|
||||
POSX := $0016+$1A
|
||||
Z17 := $0017+$1A
|
||||
@ -55,11 +61,7 @@ STACK_TOP := $FE
|
||||
SPACE_FOR_GOSUB := $3E
|
||||
NULL_MAX := $F0
|
||||
|
||||
|
||||
RAMSTART2 := $0400
|
||||
USR := $0021
|
||||
|
||||
L000A := $0A
|
||||
|
||||
LF000 := $F000
|
||||
LF003 := $F003
|
||||
|
@ -1,21 +1,19 @@
|
||||
CONFIG_SMALL := 1
|
||||
CONFIG_DATAFLAG := 1
|
||||
CONFIG_NULL := 1
|
||||
CONFIG_PRINT_CR := 1 ; print CR when line end reached
|
||||
CONFIG_DATAFLAG := 1
|
||||
|
||||
CONFIG_SCRTCH_ORDER := 3
|
||||
CONFIG_SMALL := 1
|
||||
|
||||
CRLF_1 := CR
|
||||
CRLF_2 := LF
|
||||
|
||||
ZP_START = $65
|
||||
ZP_START1 = $5B
|
||||
ZP_START = $00
|
||||
|
||||
JMPADRS = DSCLEN + 1
|
||||
LOWTRX = LOWTR
|
||||
|
||||
GORESTART := $0000
|
||||
L0001 := $0001
|
||||
L0002 := $0002
|
||||
GOSTROUT := $0003
|
||||
GOAYINT := $0006
|
||||
GOGIVEAYF := $0008
|
||||
@ -29,16 +27,17 @@ LINNUM := $0011
|
||||
TXPSV := $0011
|
||||
INPUTBUFFER := $0013
|
||||
INPUTBUFFERX := $0000
|
||||
CHARAC := $005B
|
||||
ENDCHR := $005C
|
||||
EOLPNTR := $005D
|
||||
DIMFLG := $005E
|
||||
VALTYP := $005F
|
||||
DATAFLG := $0060
|
||||
SUBFLG := $0061
|
||||
INPUTFLG := $0062
|
||||
CPRMASK := $0063
|
||||
Z14 := $0064 ; Ctrl+O flag
|
||||
|
||||
;CHARAC := $005B
|
||||
;ENDCHR := $005C
|
||||
;EOLPNTR := $005D
|
||||
;DIMFLG := $005E
|
||||
;VALTYP := $005F
|
||||
;DATAFLG := $0060
|
||||
;SUBFLG := $0061
|
||||
;INPUTFLG := $0062
|
||||
;CPRMASK := $0063
|
||||
;Z14 := $0064 ; Ctrl+O flag
|
||||
|
||||
L0207 := $0207
|
||||
L020A := $020A
|
||||
|
@ -37,16 +37,16 @@ LOAD:
|
||||
sta $17F9
|
||||
lda #<L27A6
|
||||
ldy #>L27A6
|
||||
sta L0001
|
||||
sty L0001+1
|
||||
sta GORESTART+1
|
||||
sty GORESTART+2
|
||||
jmp L1873
|
||||
L27A6:
|
||||
ldx #$FF
|
||||
txs
|
||||
lda #<RESTART
|
||||
ldy #>RESTART
|
||||
sta L0001
|
||||
sty L0001+1
|
||||
sta GORESTART+1
|
||||
sty GORESTART+2
|
||||
lda #<QT_LOADED
|
||||
ldy #>QT_LOADED
|
||||
jsr STROUT
|
||||
|
28
zeropage.s
28
zeropage.s
@ -1,6 +1,34 @@
|
||||
.zeropage
|
||||
|
||||
.res ZP_START1
|
||||
|
||||
CHARAC:
|
||||
.res 1
|
||||
ENDCHR:
|
||||
.res 1
|
||||
EOLPNTR:
|
||||
.res 1
|
||||
DIMFLG:
|
||||
.res 1
|
||||
VALTYP:
|
||||
.ifdef CONFIG_SMALL
|
||||
.res 1
|
||||
.else
|
||||
.res 2
|
||||
.endif
|
||||
DATAFLG:
|
||||
.res 1
|
||||
SUBFLG:
|
||||
.res 1
|
||||
INPUTFLG:
|
||||
.res 1
|
||||
CPRMASK:
|
||||
.res 1
|
||||
Z14:
|
||||
.res 1
|
||||
|
||||
.res ZP_START
|
||||
|
||||
TEMPPT:
|
||||
.res 1
|
||||
LASTPT:
|
||||
|
Loading…
Reference in New Issue
Block a user