2018-01-10 16:34:57 +00:00
|
|
|
|
NEW
|
2019-09-02 06:09:28 +00:00
|
|
|
|
AUTO 3,1
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2020-03-02 06:53:19 +00:00
|
|
|
|
DIR.Reset lda #$ff
|
2020-02-27 16:46:40 +00:00
|
|
|
|
>STA.G ASM.LI.ON
|
2020-03-02 06:53:19 +00:00
|
|
|
|
iny #ASM.LI.CON
|
|
|
|
|
sta (pData),y
|
2020-02-27 16:46:40 +00:00
|
|
|
|
iny #ASM.LI.MON
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sta (pData),y
|
2020-02-27 16:46:40 +00:00
|
|
|
|
iny #ASM.LI.XON
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sta (pData),y
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-25 07:28:30 +00:00
|
|
|
|
>STA.G MAC.StkPtr
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
rts
|
2015-12-04 16:33:33 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.AC clc
|
|
|
|
|
rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.AT sec
|
2020-02-28 16:30:16 +00:00
|
|
|
|
.HS 90 BCC
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.AS clc
|
|
|
|
|
lda #0
|
2022-09-11 19:11:32 +00:00
|
|
|
|
ror
|
2020-02-28 16:30:16 +00:00
|
|
|
|
sta DIR.Byte Save b7 of last char in string
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr SRC.GetNextChar
|
|
|
|
|
bcs .9
|
2020-08-17 13:03:39 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
cmp #'-'
|
|
|
|
|
bne .1
|
2020-08-17 13:03:39 +00:00
|
|
|
|
|
2020-02-28 16:30:16 +00:00
|
|
|
|
lda #$40 save b7 status of ALL chars
|
2018-03-28 15:23:32 +00:00
|
|
|
|
tsb DIR.Byte
|
2020-08-17 13:03:39 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr SRC.GetNextChar
|
|
|
|
|
bcs .9
|
2020-08-17 13:03:39 +00:00
|
|
|
|
|
2020-02-28 16:30:16 +00:00
|
|
|
|
.1 sta DIR.Word Save delimiter....
|
|
|
|
|
sta DIR.Word+1 Save also in prev char..
|
2020-08-17 13:03:39 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.2 jsr SRC.GetNextChar
|
|
|
|
|
bcs .8
|
2020-08-17 13:03:39 +00:00
|
|
|
|
|
2020-02-28 16:30:16 +00:00
|
|
|
|
cmp DIR.Word delimiter ?
|
2018-03-28 15:23:32 +00:00
|
|
|
|
beq .8
|
2020-08-17 13:03:39 +00:00
|
|
|
|
|
2020-02-28 16:30:16 +00:00
|
|
|
|
ldx DIR.Word+1 Get prev char
|
|
|
|
|
sta DIR.Word+1 replace it with new
|
2018-03-28 15:23:32 +00:00
|
|
|
|
txa
|
2020-02-28 16:30:16 +00:00
|
|
|
|
cmp DIR.Word is it the starting delimiter
|
|
|
|
|
beq .2 yes, skip
|
2020-08-17 13:03:39 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bit DIR.Byte
|
|
|
|
|
bvc .3
|
2020-08-17 13:03:39 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ora #$80
|
2020-08-17 13:03:39 +00:00
|
|
|
|
|
2020-02-28 16:30:16 +00:00
|
|
|
|
.3 jsr OUT.EmitByte no, emit prev char
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bcc .2
|
2020-08-17 13:03:39 +00:00
|
|
|
|
|
2019-03-25 07:04:40 +00:00
|
|
|
|
.9 lda #E.SYNTAX.ERROR
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2018-02-01 07:16:35 +00:00
|
|
|
|
|
2020-02-28 16:30:16 +00:00
|
|
|
|
.8 lda DIR.Word+1 Get prev char
|
|
|
|
|
cmp DIR.Word someone typed .AS "" ?
|
2018-03-28 15:23:32 +00:00
|
|
|
|
beq .88
|
2020-08-17 13:03:39 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bit DIR.Byte
|
|
|
|
|
bpl .81
|
2020-08-17 13:03:39 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
eor #$80
|
2018-02-01 07:16:35 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.81 jmp OUT.EmitByte
|
2018-02-01 16:30:18 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.88 clc
|
2020-08-17 13:03:39 +00:00
|
|
|
|
DIR.AS.RTS rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.AZ jsr DIR.AS
|
2020-08-17 13:03:39 +00:00
|
|
|
|
bcs DIR.AS.RTS
|
2018-03-28 15:23:32 +00:00
|
|
|
|
lda #0
|
|
|
|
|
jmp OUT.EmitByte
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2022-09-11 19:11:32 +00:00
|
|
|
|
DIR.PS jsr SRC.GetNextChar
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
sta DIR.Word Save delimiter....
|
|
|
|
|
|
|
|
|
|
ldx #$ff
|
|
|
|
|
ldy #1 skip delimiter
|
|
|
|
|
|
|
|
|
|
.1 inx
|
|
|
|
|
lda (ZPLinePtr),y
|
|
|
|
|
beq .9
|
|
|
|
|
|
|
|
|
|
cmp #$0D
|
|
|
|
|
beq .9
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
cmp DIR.Word
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
jsr OUT.EmitByte emit length
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
.2 jsr SRC.GetNextChar
|
|
|
|
|
jsr OUT.EmitByte
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
jsr SRC.GetNextChar skip delimiter
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 lda #E.SYNTAX.ERROR
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
*---------------------------------------
|
|
|
|
|
DIR.CS jsr SRC.GetNextChar
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
stz DIR.Byte
|
|
|
|
|
|
|
|
|
|
cmp #'-'
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
ror DIR.Byte save b7 status of ALL chars
|
|
|
|
|
|
|
|
|
|
jsr SRC.GetNextChar
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
.1 sta DIR.Word Save delimiter....
|
|
|
|
|
|
|
|
|
|
.2 jsr SRC.GetNextChar
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
cmp DIR.Word delimiter ?
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
cmp #'\'
|
|
|
|
|
bne .7
|
|
|
|
|
|
|
|
|
|
jsr SRC.GetNextChar
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
ldx #DIR.EscChars.L-1
|
|
|
|
|
|
|
|
|
|
.3 cmp DIR.EscChars,x
|
|
|
|
|
beq .4
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
bpl .3
|
|
|
|
|
|
|
|
|
|
bmi .9
|
|
|
|
|
|
|
|
|
|
.4 lda DIR.EscCodes,x
|
|
|
|
|
|
|
|
|
|
.7 ora DIR.Byte
|
|
|
|
|
|
|
|
|
|
jsr OUT.EmitByte
|
|
|
|
|
bcc .2
|
|
|
|
|
|
|
|
|
|
.9 lda #E.SYNTAX.ERROR
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
DIR.CZ.RTS rts
|
|
|
|
|
*---------------------------------------
|
|
|
|
|
DIR.CZ jsr DIR.CS
|
|
|
|
|
bcs DIR.CZ.RTS
|
|
|
|
|
lda #0
|
|
|
|
|
jmp OUT.EmitByte
|
|
|
|
|
*---------------------------------------
|
2019-03-29 16:21:30 +00:00
|
|
|
|
DIR.BS jsr SRC.GetNextCharNB
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bcs .98
|
2018-01-31 16:20:20 +00:00
|
|
|
|
|
2020-03-06 16:20:29 +00:00
|
|
|
|
jsr EXP.ResetAcc
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr EXP.Eval
|
|
|
|
|
bcs .9
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
lda SRC.ACC+3
|
|
|
|
|
ora SRC.ACC+2
|
|
|
|
|
bne .99
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
lda SRC.ACC
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta DIR.Word
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
lda SRC.ACC+1
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta DIR.Word+1
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
stz DIR.Byte
|
2020-03-09 16:24:08 +00:00
|
|
|
|
jsr SRC.GetChar
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bcs .1
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-26 16:34:13 +00:00
|
|
|
|
cmp #C.SPACE
|
2018-03-28 15:23:32 +00:00
|
|
|
|
beq .1
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
cmp #','
|
|
|
|
|
bne .98
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-03-06 16:20:29 +00:00
|
|
|
|
jsr EXP.ResetAcc
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr EXP.Eval
|
|
|
|
|
bcs .9
|
2020-03-06 16:20:29 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
lda SRC.ACC+3
|
|
|
|
|
ora SRC.ACC+2
|
|
|
|
|
ora SRC.ACC+1
|
|
|
|
|
bne .99
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
lda SRC.ACC
|
|
|
|
|
sta DIR.Byte
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.1 inc DIR.Word
|
|
|
|
|
bne .2
|
|
|
|
|
inc DIR.Word+1
|
|
|
|
|
beq .8
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.2 lda DIR.Byte
|
|
|
|
|
jsr OUT.EmitByte
|
|
|
|
|
bcc .1
|
|
|
|
|
rts
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
.9 rts
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2019-03-25 07:04:40 +00:00
|
|
|
|
.99 lda #E.RANGE
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2019-03-25 07:04:40 +00:00
|
|
|
|
.98 lda #E.SYNTAX.ERROR
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2019-03-29 16:21:30 +00:00
|
|
|
|
DIR.DA jsr SRC.GetNextCharNB
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bcs .98
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-03-06 16:20:29 +00:00
|
|
|
|
.1 jsr EXP.ResetAcc
|
|
|
|
|
|
|
|
|
|
jsr EXP.Eval
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bcs .9
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-03-03 06:50:47 +00:00
|
|
|
|
ldy #0
|
2020-03-06 16:20:29 +00:00
|
|
|
|
ldx SRC.ACC.SIZE
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.2 lda SRC.ACC,y
|
|
|
|
|
jsr OUT.EmitByte
|
|
|
|
|
bcs .9
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .2
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-03-03 06:50:47 +00:00
|
|
|
|
.3 jsr SRC.GetChar
|
|
|
|
|
bcs .8
|
|
|
|
|
|
2020-03-02 06:53:19 +00:00
|
|
|
|
cmp #C.SPACE
|
2018-03-28 15:23:32 +00:00
|
|
|
|
beq .8
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
cmp #','
|
|
|
|
|
bne .98
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr SRC.GetNextChar
|
|
|
|
|
bcc .1
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2019-03-25 07:04:40 +00:00
|
|
|
|
.98 lda #E.SYNTAX.ERROR
|
2020-03-03 06:50:47 +00:00
|
|
|
|
sec
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.9 rts
|
2020-03-03 06:50:47 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.DO >LDA.G ASM.DO.StackPtr
|
2020-08-17 13:03:39 +00:00
|
|
|
|
tay
|
2018-03-28 15:23:32 +00:00
|
|
|
|
inc
|
2018-04-06 15:10:02 +00:00
|
|
|
|
cmp #DO.MAXDEPTH
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bcs .98
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
tya
|
|
|
|
|
beq .1
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
* clc
|
|
|
|
|
adc #ASM.DO.Stack-1
|
|
|
|
|
tay
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
lda (pData),y Previous DO is false?
|
|
|
|
|
bne .1
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
>INC.G ASM.DO.StackPtr yes,stack FALSE
|
2020-02-24 13:33:28 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
* clc
|
|
|
|
|
adc #ASM.DO.Stack-1
|
|
|
|
|
tay
|
|
|
|
|
lda #0
|
|
|
|
|
bra .8
|
|
|
|
|
|
|
|
|
|
.1 jsr SRC.GetNextCharNB
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bcs .99
|
2020-02-24 13:33:28 +00:00
|
|
|
|
|
2020-03-06 16:20:29 +00:00
|
|
|
|
jsr EXP.ResetAcc
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr EXP.Eval
|
|
|
|
|
bcs .99
|
2020-02-24 13:33:28 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>INC.G ASM.DO.StackPtr
|
2020-08-17 13:03:39 +00:00
|
|
|
|
* clc
|
2018-03-28 15:23:32 +00:00
|
|
|
|
adc #ASM.DO.Stack-1
|
|
|
|
|
tay
|
|
|
|
|
lda SRC.ACC
|
|
|
|
|
ora SRC.ACC+1
|
|
|
|
|
ora SRC.ACC+2
|
|
|
|
|
ora SRC.ACC+3
|
2020-08-17 13:03:39 +00:00
|
|
|
|
beq .8
|
2018-03-28 15:23:32 +00:00
|
|
|
|
lda #$ff
|
2019-10-03 06:25:27 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
.8 sta (pData),y
|
2020-02-24 13:33:28 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2020-02-24 13:33:28 +00:00
|
|
|
|
|
2019-03-25 07:04:40 +00:00
|
|
|
|
.98 lda #E.TOO.MANY.DO
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sec
|
|
|
|
|
.99 rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.EL >LDA.G ASM.DO.StackPtr
|
|
|
|
|
beq .9
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
tax
|
|
|
|
|
dec
|
|
|
|
|
beq .1 no previous DO context
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #ASM.DO.Stack-1
|
|
|
|
|
tay
|
|
|
|
|
lda (pData),y
|
|
|
|
|
beq .8 previous is FALSE
|
2020-02-24 13:33:28 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
.1 txa
|
2018-03-28 15:23:32 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #ASM.DO.Stack-1
|
|
|
|
|
tay
|
|
|
|
|
lda (pData),y
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta (pData),y
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
.8 clc
|
2018-03-28 15:23:32 +00:00
|
|
|
|
rts
|
2020-02-24 13:33:28 +00:00
|
|
|
|
|
2019-03-25 07:04:40 +00:00
|
|
|
|
.9 lda #E.ELSE.WITHOUT.DO
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2019-03-25 07:04:40 +00:00
|
|
|
|
DIR.EM lda #E.MACRO.INV.DEF
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2019-10-03 06:25:27 +00:00
|
|
|
|
*---------------------------------------
|
2020-03-09 06:58:48 +00:00
|
|
|
|
DIR.DU >LDA.G ASM.DU.ON
|
|
|
|
|
bmi DIR.EP.ILLEGAL
|
|
|
|
|
|
|
|
|
|
lda #$80
|
|
|
|
|
sta (pData),y
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-03-09 06:58:48 +00:00
|
|
|
|
ldy #ASM.PC.DU
|
|
|
|
|
jmp DIR.SavePC
|
|
|
|
|
*---------------------------------------
|
|
|
|
|
DIR.PH >LDA.G ASM.PH.ON
|
|
|
|
|
bmi DIR.EP.ILLEGAL
|
|
|
|
|
|
|
|
|
|
lda #$80
|
|
|
|
|
sta (pData),y
|
|
|
|
|
ldy #ASM.PC.PH
|
|
|
|
|
jsr DIR.SavePC
|
|
|
|
|
|
|
|
|
|
jmp DIR.OR
|
|
|
|
|
*---------------------------------------
|
|
|
|
|
DIR.ED >LDA.G ASM.DU.ON
|
|
|
|
|
bpl DIR.EP.ILLEGAL
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
ldy #ASM.PC.DU
|
|
|
|
|
jmp DIR.RestorePC
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2018-04-06 15:10:02 +00:00
|
|
|
|
DIR.EP >LDA.G ASM.PH.ON
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bpl .9
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
lda #0
|
|
|
|
|
sta (pData),y
|
2018-04-06 15:10:02 +00:00
|
|
|
|
ldy #ASM.PC.PH
|
2020-03-09 06:58:48 +00:00
|
|
|
|
jmp DIR.RestorePC
|
|
|
|
|
.9
|
|
|
|
|
DIR.EP.ILLEGAL lda #E.ILLEGAL.DIR
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sec
|
2020-08-17 13:03:39 +00:00
|
|
|
|
DIR.EP.RTS rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2018-04-06 15:10:02 +00:00
|
|
|
|
DIR.SE sec
|
|
|
|
|
.HS 90 BCC
|
2018-03-28 15:23:32 +00:00
|
|
|
|
*---------------------------------------
|
2019-03-21 16:37:02 +00:00
|
|
|
|
DIR.EQ clc
|
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
lda #$ff
|
|
|
|
|
>STA.G OUT.bEquate
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-03-02 16:49:47 +00:00
|
|
|
|
>LDA.G SYM.BufPtr
|
2020-08-17 13:03:39 +00:00
|
|
|
|
beq DIR.EP.ILLEGAL not in global symbol context
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2020-03-02 16:49:47 +00:00
|
|
|
|
eor #SYMG
|
|
|
|
|
beq .1
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
bcs DIR.EP.ILLEGAL .SE not allowed in local/private
|
|
|
|
|
bcc .10 .EQ in local, skip F update
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
.1 ror A = 0 : CS = SYMG.F.RW
|
2020-03-06 06:56:36 +00:00
|
|
|
|
|
|
|
|
|
ora #SYMG.F.EQU
|
2020-03-06 16:20:29 +00:00
|
|
|
|
sta SRC.ACC.F
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-03-02 16:49:47 +00:00
|
|
|
|
.10 jsr SRC.GetNextCharNB
|
2020-03-06 16:20:29 +00:00
|
|
|
|
bcs .9
|
2018-01-12 16:05:04 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
jsr EXP.ResetAccV keep F
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-26 16:34:13 +00:00
|
|
|
|
jsr EXP.Eval
|
2020-08-17 13:03:39 +00:00
|
|
|
|
bcs DIR.EP.RTS
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-03-06 16:20:29 +00:00
|
|
|
|
>LDA.G SYM.BufPtr
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
2020-02-26 16:34:13 +00:00
|
|
|
|
cmp #SYMG
|
|
|
|
|
beq .12
|
2020-02-28 16:30:16 +00:00
|
|
|
|
|
2020-02-26 16:34:13 +00:00
|
|
|
|
tay
|
|
|
|
|
ldx #3 we are in local/private
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-26 16:34:13 +00:00
|
|
|
|
.11 lda SRC.ACC,x update value
|
|
|
|
|
dey
|
|
|
|
|
sta (ZPSymbolBuf),y
|
|
|
|
|
dex
|
|
|
|
|
bpl .11
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-26 16:34:13 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
.12 ldy #SYMG-1
|
|
|
|
|
|
|
|
|
|
.13 lda SRC.ACC.F,y
|
|
|
|
|
sta (ZPSymbolBuf),y
|
|
|
|
|
dey
|
|
|
|
|
bpl .13
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-03-06 16:20:29 +00:00
|
|
|
|
>LDA.G ASM.PASS
|
|
|
|
|
bne .2
|
2019-03-22 16:47:33 +00:00
|
|
|
|
|
2020-03-06 16:20:29 +00:00
|
|
|
|
jmp SYM.StoreGlobal
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-03-06 16:20:29 +00:00
|
|
|
|
.2 jmp SYM.UpdateGlobal
|
2018-01-12 16:05:04 +00:00
|
|
|
|
|
2020-08-17 13:03:39 +00:00
|
|
|
|
.9 lda #E.SYNTAX.ERROR
|
|
|
|
|
sec
|
|
|
|
|
rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2020-02-25 07:28:30 +00:00
|
|
|
|
DIR.FI >LDA.G ASM.DO.StackPtr
|
2020-08-17 13:03:39 +00:00
|
|
|
|
beq DIR.EP.ILLEGAL
|
2020-02-24 13:33:28 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
dec
|
|
|
|
|
sta (pData),y
|
2020-02-24 13:33:28 +00:00
|
|
|
|
|
2020-02-25 07:28:30 +00:00
|
|
|
|
clc
|
2018-03-28 15:23:32 +00:00
|
|
|
|
rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2019-03-29 16:21:30 +00:00
|
|
|
|
DIR.HS jsr SRC.GetNextCharNB
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bcs .99
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr SRC.IsDigit16
|
|
|
|
|
bcs .99
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-28 07:21:46 +00:00
|
|
|
|
.1 sta DIR.Byte
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr SRC.GetNextChar
|
|
|
|
|
bcc .2
|
2019-10-03 06:25:27 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jmp OUT.EmitByte
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.2 jsr SRC.IsDigit16
|
|
|
|
|
bcc .3
|
2020-03-03 06:50:47 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
cmp #','
|
|
|
|
|
beq .22
|
2018-02-02 15:55:20 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
cmp #'.'
|
|
|
|
|
bne .99
|
|
|
|
|
|
2020-03-03 16:44:52 +00:00
|
|
|
|
.22 lda DIR.Byte
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr OUT.EmitByte
|
|
|
|
|
bcc .5
|
|
|
|
|
rts
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.3 pha
|
2020-03-03 16:44:52 +00:00
|
|
|
|
lda DIR.Byte
|
2018-03-28 15:23:32 +00:00
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
2020-02-28 07:21:46 +00:00
|
|
|
|
sta DIR.Byte
|
2018-03-28 15:23:32 +00:00
|
|
|
|
pla
|
2020-02-28 07:21:46 +00:00
|
|
|
|
ora DIR.Byte
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.4 jsr OUT.EmitByte
|
|
|
|
|
bcs .9
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr SRC.GetNextChar
|
|
|
|
|
bcs .8
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-03-02 06:53:19 +00:00
|
|
|
|
cmp #C.SPACE
|
2018-03-28 15:23:32 +00:00
|
|
|
|
beq .8
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr SRC.IsDigit16
|
|
|
|
|
bcc .1
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
cmp #','
|
|
|
|
|
beq .5
|
2018-01-31 16:20:20 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
cmp #'.'
|
|
|
|
|
bne .99
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.5 jsr SRC.GetNextChar
|
|
|
|
|
bcs .99
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr SRC.IsDigit16
|
|
|
|
|
bcc .1
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2019-03-25 07:04:40 +00:00
|
|
|
|
.99 lda #E.SYNTAX.ERROR
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sec
|
2022-09-11 19:11:32 +00:00
|
|
|
|
.9 rts
|
2020-03-03 06:50:47 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2019-03-29 16:21:30 +00:00
|
|
|
|
DIR.IN jsr SRC.GetNextCharNB
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bcs .9
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>LDYA ZPLinePtr
|
2019-04-01 06:07:56 +00:00
|
|
|
|
jmp FIO.OpenFile
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2019-03-25 07:04:40 +00:00
|
|
|
|
.9 lda #E.SYNTAX.ERROR
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2015-10-06 16:14:48 +00:00
|
|
|
|
*---------------------------------------
|
2019-03-29 16:21:30 +00:00
|
|
|
|
DIR.LI jsr SRC.GetNextChar
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bcs .9
|
2018-01-11 16:34:09 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>LDYA L.T.LI
|
|
|
|
|
jsr SRC.GetKeyword
|
|
|
|
|
bcs .9
|
|
|
|
|
jsr .7
|
2018-02-01 16:30:18 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr SRC.GetChar
|
|
|
|
|
bcs .8
|
|
|
|
|
cmp #','
|
|
|
|
|
beq DIR.LI
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-03-02 06:53:19 +00:00
|
|
|
|
cmp #C.SPACE
|
2018-03-28 15:23:32 +00:00
|
|
|
|
beq .8
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2019-03-25 07:04:40 +00:00
|
|
|
|
.9 lda #E.SYNTAX.ERROR
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2020-03-02 06:53:19 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.7 jmp (J.LI,x)
|
2018-02-01 16:30:18 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.LI.ON ldy #ASM.LI.ON
|
2022-09-11 19:11:32 +00:00
|
|
|
|
sec
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bra DIR.LI.APPLY
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.LI.OFF ldy #ASM.LI.ON
|
2022-09-11 19:11:32 +00:00
|
|
|
|
clc
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bra DIR.LI.APPLY
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.LI.CON ldy #ASM.LI.CON
|
2022-09-11 19:11:32 +00:00
|
|
|
|
sec
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bra DIR.LI.APPLY
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.LI.COFF ldy #ASM.LI.CON
|
|
|
|
|
clc
|
|
|
|
|
bra DIR.LI.APPLY
|
|
|
|
|
|
|
|
|
|
DIR.LI.MON ldy #ASM.LI.MON
|
2022-09-11 19:11:32 +00:00
|
|
|
|
sec
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bra DIR.LI.APPLY
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.LI.MOFF ldy #ASM.LI.MON
|
2022-09-11 19:11:32 +00:00
|
|
|
|
clc
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bra DIR.LI.APPLY
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.LI.XON ldy #ASM.LI.XON
|
2022-09-11 19:11:32 +00:00
|
|
|
|
sec
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bra DIR.LI.APPLY
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.LI.XOFF ldy #ASM.LI.XON
|
2022-09-11 19:11:32 +00:00
|
|
|
|
clc
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.LI.APPLY lda #0
|
|
|
|
|
ror
|
2015-11-20 16:31:14 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sta (pData),y
|
|
|
|
|
rts
|
2015-10-06 16:14:48 +00:00
|
|
|
|
*---------------------------------------
|
2018-04-06 15:10:02 +00:00
|
|
|
|
DIR.MA >LDA.G ASM.MA.ON
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bmi .9
|
2015-10-28 16:55:12 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>LDA.G ASM.PASS If Pass#2, ignore
|
|
|
|
|
bne .8
|
2015-10-28 16:55:12 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr SRC.GetNextCharNB
|
|
|
|
|
beq DIR.OP.SYNERR
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
|
|
|
|
>PUSHB.G MAC.hList
|
2019-03-18 16:48:16 +00:00
|
|
|
|
>PUSHW ZPLinePtr
|
|
|
|
|
>SYSCALL SListNewKey
|
2018-04-06 15:10:02 +00:00
|
|
|
|
bcs .99
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2019-03-29 16:21:30 +00:00
|
|
|
|
>STYA.G MAC.ID
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.8 lda #$ff
|
2018-04-06 15:10:02 +00:00
|
|
|
|
>STA.G ASM.MA.ON
|
2018-03-28 15:23:32 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2019-03-25 07:04:40 +00:00
|
|
|
|
.9 lda #E.MACRO.INV.DEF
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sec
|
2018-04-06 15:10:02 +00:00
|
|
|
|
.99 rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.OP jsr SRC.GetNextCharNB
|
|
|
|
|
bcs DIR.OP.SYNERR
|
|
|
|
|
>LDYA ZPLinePtr
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-23 20:01:48 +00:00
|
|
|
|
jmp FIO.LOAD.CPU
|
2020-02-25 16:42:22 +00:00
|
|
|
|
|
2019-03-25 07:04:40 +00:00
|
|
|
|
DIR.OP.SYNERR lda #E.SYNTAX.ERROR
|
2018-03-28 15:23:32 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2020-02-28 16:30:16 +00:00
|
|
|
|
DIR.OR jsr SRC.GetNextCharNB
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bcs DIR.OP.SYNERR
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-03-06 16:20:29 +00:00
|
|
|
|
jsr EXP.ResetAcc
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr EXP.Eval
|
|
|
|
|
bcs .9
|
2020-02-26 16:34:13 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ldx #0
|
2020-02-27 16:46:40 +00:00
|
|
|
|
ldy #ASM.PC
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.1 lda SRC.ACC,x
|
|
|
|
|
sta (pData),y
|
|
|
|
|
iny
|
2020-02-27 16:46:40 +00:00
|
|
|
|
inx
|
2018-03-28 15:23:32 +00:00
|
|
|
|
cpx #4
|
|
|
|
|
bne .1
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-27 16:46:40 +00:00
|
|
|
|
>LDA.G ASM.DU.ON
|
|
|
|
|
bmi .8
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-27 16:46:40 +00:00
|
|
|
|
>LDA.G ASM.PH.ON
|
|
|
|
|
bmi .8
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-27 16:46:40 +00:00
|
|
|
|
lda SRC.ACC
|
|
|
|
|
>STA.G DST.AUXTYPE
|
|
|
|
|
lda SRC.ACC+1
|
|
|
|
|
iny
|
|
|
|
|
sta (pData),y
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-27 16:46:40 +00:00
|
|
|
|
.8 clc
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.9 rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2020-03-09 06:58:48 +00:00
|
|
|
|
DIR.EN
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2020-03-09 06:58:48 +00:00
|
|
|
|
DIR.PG
|
|
|
|
|
*---------------------------------------
|
|
|
|
|
DIR.TI
|
|
|
|
|
*---------------------------------------
|
|
|
|
|
DIR.US
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2020-02-27 16:46:40 +00:00
|
|
|
|
DIR.TA
|
|
|
|
|
|
|
|
|
|
DIR.TA.8 clc
|
|
|
|
|
DIR.TA.RTS rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2020-02-26 16:34:13 +00:00
|
|
|
|
DIR.TF >LDA.G ASM.PASS If Pass#1, ignore
|
2020-02-27 16:46:40 +00:00
|
|
|
|
beq DIR.TA.8
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-26 16:34:13 +00:00
|
|
|
|
>LDA.G ArgDstFile
|
|
|
|
|
beq .1
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-26 16:34:13 +00:00
|
|
|
|
>SYSCALL ArgV
|
|
|
|
|
bra .2
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-26 16:34:13 +00:00
|
|
|
|
.1 jsr SRC.GetNextCharNB
|
|
|
|
|
bcs DIR.OP.SYNERR
|
|
|
|
|
|
|
|
|
|
>LDYA ZPLinePtr
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-28 16:30:16 +00:00
|
|
|
|
.2 >SYSCALL StrDup
|
2020-02-27 16:46:40 +00:00
|
|
|
|
bcs DIR.TA.RTS
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
stx ZPPtr2
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-27 16:46:40 +00:00
|
|
|
|
lda #S.FI.T.BIN
|
|
|
|
|
sta ZPPtr2+1
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-27 16:46:40 +00:00
|
|
|
|
ldy #$ff
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-27 16:46:40 +00:00
|
|
|
|
.3 iny
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
beq .7
|
|
|
|
|
cmp #','
|
|
|
|
|
bne .3
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-27 16:46:40 +00:00
|
|
|
|
lda #0
|
|
|
|
|
sta (ZPPtr1),y
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-27 16:46:40 +00:00
|
|
|
|
iny
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
cmp #'T'
|
|
|
|
|
beq .4
|
|
|
|
|
|
|
|
|
|
.30 lda #E.SYNTAX.ERROR
|
|
|
|
|
bra .9
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-27 16:46:40 +00:00
|
|
|
|
.4 ldx #0
|
|
|
|
|
|
|
|
|
|
.5 iny
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
cmp DIR.SYS,x including \0
|
|
|
|
|
bne .30
|
|
|
|
|
inx
|
|
|
|
|
cpx #4
|
|
|
|
|
bne .5
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-27 16:46:40 +00:00
|
|
|
|
lda #S.FI.T.SYS
|
|
|
|
|
sta ZPPtr2+1
|
|
|
|
|
|
|
|
|
|
.7 >PUSHW ZPPtr1
|
2021-07-24 20:42:23 +00:00
|
|
|
|
>PUSHWZ Allocate
|
2020-02-26 16:34:13 +00:00
|
|
|
|
>SYSCALL RealPath
|
|
|
|
|
bcs .9
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-26 16:34:13 +00:00
|
|
|
|
txa
|
|
|
|
|
>STA.G DST.hFILENAME
|
2020-02-28 16:30:16 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
2020-02-26 16:34:13 +00:00
|
|
|
|
>PUSHYA
|
|
|
|
|
>PUSHBI O.WRONLY+O.CREATE
|
2020-02-27 16:46:40 +00:00
|
|
|
|
>PUSHB ZPPtr2+1 Type
|
|
|
|
|
>PUSHW.G DST.AUXTYPE
|
2020-02-26 16:34:13 +00:00
|
|
|
|
>SYSCALL FOpen
|
|
|
|
|
bcs .9
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-26 16:34:13 +00:00
|
|
|
|
>STA.G DST.hREFNUM
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-27 16:46:40 +00:00
|
|
|
|
clc
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-27 16:46:40 +00:00
|
|
|
|
.9 php
|
|
|
|
|
pha
|
|
|
|
|
lda ZPPtr2
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2020-02-27 16:46:40 +00:00
|
|
|
|
pla
|
|
|
|
|
plp
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2020-02-27 16:46:40 +00:00
|
|
|
|
rts
|
2015-10-04 20:55:51 +00:00
|
|
|
|
*---------------------------------------
|
2019-03-21 16:37:02 +00:00
|
|
|
|
DIR.SavePC phy
|
|
|
|
|
plx
|
2018-04-06 15:10:02 +00:00
|
|
|
|
ldy #ASM.PC+3
|
2020-02-27 16:46:40 +00:00
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
.1 lda (pData),y
|
|
|
|
|
pha
|
|
|
|
|
dey
|
2019-03-21 16:37:02 +00:00
|
|
|
|
cpy #ASM.PC-1
|
|
|
|
|
bne .1
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2019-03-21 16:37:02 +00:00
|
|
|
|
phx
|
2018-04-06 15:10:02 +00:00
|
|
|
|
ply
|
|
|
|
|
ldx #3
|
2020-02-27 16:46:40 +00:00
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
.2 pla
|
|
|
|
|
sta (pData),y
|
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
|
|
|
|
|
2020-03-09 06:58:48 +00:00
|
|
|
|
clc
|
2018-04-06 15:10:02 +00:00
|
|
|
|
rts
|
|
|
|
|
*---------------------------------------
|
|
|
|
|
DIR.RestorePC ldx #3
|
2020-02-27 16:46:40 +00:00
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
.1 lda (pData),y
|
|
|
|
|
pha
|
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
2020-02-27 16:46:40 +00:00
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
ldy #ASM.PC+3
|
|
|
|
|
ldx #3
|
2022-09-11 19:11:32 +00:00
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
.2 pla
|
|
|
|
|
sta (pData),y
|
|
|
|
|
dey
|
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
2020-02-27 16:46:40 +00:00
|
|
|
|
|
2020-03-09 06:58:48 +00:00
|
|
|
|
clc because of JMP to it
|
2018-04-06 15:10:02 +00:00
|
|
|
|
rts
|
|
|
|
|
*---------------------------------------
|
2015-10-04 20:55:51 +00:00
|
|
|
|
MAN
|
2020-08-17 13:03:39 +00:00
|
|
|
|
SAVE usr/src/bin/asm.s.dir
|
|
|
|
|
LOAD usr/src/bin/asm.s
|
2015-10-04 20:55:51 +00:00
|
|
|
|
ASM
|