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