2022-03-06 22:28:52 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
*--------------------------------------
|
2022-04-07 17:19:48 +00:00
|
|
|
|
BS.GetSysBuf lda #$04
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
BS.GetSysBufA sta XBBB5
|
2022-04-07 17:19:48 +00:00
|
|
|
|
jsr BS.KW.FRE
|
2022-04-27 19:24:41 +00:00
|
|
|
|
bcs .99
|
2022-04-07 17:19:48 +00:00
|
|
|
|
|
|
|
|
|
lda AS.STRINGSTART+1
|
|
|
|
|
sbc AS.ARRAYEND+1
|
|
|
|
|
cmp XBBB5
|
|
|
|
|
lda #BS.E.NOBUFFER
|
2022-04-27 19:24:41 +00:00
|
|
|
|
bcc .98
|
2022-04-07 17:19:48 +00:00
|
|
|
|
|
|
|
|
|
lda AS.STRINGSTART+1
|
|
|
|
|
sta ZP.PCH
|
|
|
|
|
sbc XBBB5
|
|
|
|
|
sta ZP.A1H
|
|
|
|
|
sta AS.STRINGSTART+1
|
|
|
|
|
|
|
|
|
|
lda AS.STRINGSTART
|
|
|
|
|
sta ZP.PCL
|
|
|
|
|
sta ZP.A1L
|
|
|
|
|
|
|
|
|
|
lda AS.HIMEM
|
|
|
|
|
sbc ZP.PCL
|
|
|
|
|
sta BS.ReqMem
|
|
|
|
|
|
|
|
|
|
lda AS.HIMEM+1
|
|
|
|
|
sbc ZP.PCH
|
|
|
|
|
sta BS.ReqMem+1
|
|
|
|
|
|
|
|
|
|
jsr BS.MoveMemDown
|
|
|
|
|
|
|
|
|
|
lda #$00
|
|
|
|
|
sec
|
|
|
|
|
sbc XBBB5
|
|
|
|
|
sta XBBE2
|
|
|
|
|
jsr LA3A3
|
|
|
|
|
lda AS.HIMEM+1
|
|
|
|
|
sta XBBB7
|
|
|
|
|
sec
|
|
|
|
|
sbc XBBB5
|
|
|
|
|
sta AS.HIMEM+1
|
|
|
|
|
clc
|
|
|
|
|
adc #$04
|
|
|
|
|
sta BS.BUFPAGE
|
|
|
|
|
rts
|
|
|
|
|
|
2022-04-27 19:24:41 +00:00
|
|
|
|
.98 sec
|
|
|
|
|
.99 rts
|
2022-04-07 17:19:48 +00:00
|
|
|
|
|
|
|
|
|
XBBB5 .BS 1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.FreeSysBuf jsr BS.KW.FRE
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bcs .9
|
2022-04-07 17:19:48 +00:00
|
|
|
|
|
|
|
|
|
lda AS.HIMEM+1
|
|
|
|
|
sbc #$00
|
|
|
|
|
sta ZP.PCH
|
|
|
|
|
adc #$03
|
|
|
|
|
sta ZP.A1H
|
|
|
|
|
|
|
|
|
|
lda AS.STRINGSTART
|
|
|
|
|
sta ZP.PCL
|
|
|
|
|
sta ZP.A1L
|
|
|
|
|
|
|
|
|
|
lda AS.HIMEM
|
|
|
|
|
sec
|
|
|
|
|
sbc AS.STRINGSTART
|
|
|
|
|
sta BS.ReqMem
|
|
|
|
|
|
|
|
|
|
lda AS.HIMEM+1
|
|
|
|
|
sbc AS.STRINGSTART+1
|
|
|
|
|
sta BS.ReqMem+1
|
|
|
|
|
|
|
|
|
|
jsr BS.MoveMemUp
|
|
|
|
|
|
|
|
|
|
lda #$04
|
|
|
|
|
sta XBBE2
|
|
|
|
|
clc
|
|
|
|
|
adc AS.HIMEM+1
|
|
|
|
|
sta AS.HIMEM+1
|
|
|
|
|
jsr LA3A3
|
|
|
|
|
|
|
|
|
|
lda BS.BUFPAGE
|
|
|
|
|
cmp AS.HIMEM+1
|
2022-05-25 18:46:02 +00:00
|
|
|
|
beq .8
|
2022-04-07 17:19:48 +00:00
|
|
|
|
|
|
|
|
|
pha
|
|
|
|
|
ldx GP.OPENCNT
|
2022-05-25 18:46:02 +00:00
|
|
|
|
beq .2
|
2022-04-07 17:19:48 +00:00
|
|
|
|
|
|
|
|
|
lda AS.HIMEM+1
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.1 cmp BS.BUFPAGEs-1,x
|
2022-04-07 17:19:48 +00:00
|
|
|
|
beq LA29E
|
|
|
|
|
|
|
|
|
|
dex
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bne .1
|
2022-04-07 17:19:48 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.2 pla
|
2022-04-07 17:19:48 +00:00
|
|
|
|
sec
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.9 rts
|
2022-04-07 17:19:48 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-04-07 17:19:48 +00:00
|
|
|
|
LA29E pla
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.SetFileBuf sta GP.SBUFADR+1
|
|
|
|
|
sta BS.BUFPAGEs-1,x
|
|
|
|
|
|
|
|
|
|
stz GP.SBUFADR
|
|
|
|
|
lda BS.REFNUMs,x
|
|
|
|
|
sta GP.MLIMRKEOFBUF.REFNUM
|
2024-01-07 12:44:01 +00:00
|
|
|
|
lda #MLI.SETBUF
|
2022-04-07 17:19:48 +00:00
|
|
|
|
jmp GP.GOSYSTEM
|
|
|
|
|
*--------------------------------------
|
2022-05-25 18:46:02 +00:00
|
|
|
|
BS.GETBUFR jsr BS.GetSysBufA
|
|
|
|
|
bcs LA2F6.9
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
pha
|
|
|
|
|
sbc #$03
|
|
|
|
|
sta XBBB8
|
|
|
|
|
pla
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.1 sta GP.SBUFADR+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx GP.OPENCNT
|
2022-05-25 18:46:02 +00:00
|
|
|
|
beq .4
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda XBBB7
|
2022-03-06 22:28:52 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #$04
|
|
|
|
|
sta XBBB7
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.2 cmp BS.BUFPAGEs-1,x
|
|
|
|
|
bne .3
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.SBUFADR+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr LA356
|
2022-04-03 11:55:03 +00:00
|
|
|
|
jsr BS.SetFileBuf
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.SBUFADR+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
adc #$04
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bcc .1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.3 dex
|
|
|
|
|
bne .2
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.4 lda GP.SBUFADR+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bit GP.EXECACTV
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bpl LA2F6.8
|
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LA2F6 ldx #$08
|
|
|
|
|
jsr LA356
|
2022-04-03 11:55:03 +00:00
|
|
|
|
jsr BS.SetFileBuf
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.SBUFADR+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
adc #$04
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
LA2F6.8 clc
|
|
|
|
|
LA2F6.9 rts
|
2022-03-24 20:24:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-13 12:52:24 +00:00
|
|
|
|
BS.FREEBUFR lda GP.OPENCNT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
adc AS.HIMEM+1
|
|
|
|
|
sta XBBB7
|
2022-04-03 11:55:03 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.HIMEM+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta XBBB8
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.RSHIMEM
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cmp AS.HIMEM+1
|
2022-05-25 18:46:02 +00:00
|
|
|
|
beq .8
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
sta AS.HIMEM+1
|
|
|
|
|
bit GP.EXECACTV
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bpl .1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
jsr LA2F6
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bcc .3
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.1 lda XBBB7
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx GP.OPENCNT
|
2022-05-25 18:46:02 +00:00
|
|
|
|
beq .5
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.2 cmp BS.BUFPAGEs-1,x
|
|
|
|
|
bne .4
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.HIMEM+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr LA356
|
2022-04-03 11:55:03 +00:00
|
|
|
|
jsr BS.SetFileBuf
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda XBBB7
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc #$04
|
|
|
|
|
sta XBBB7
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.3 lda AS.HIMEM+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
sbc #$04
|
|
|
|
|
sta AS.HIMEM+1
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bcs .1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.4 dex
|
|
|
|
|
bne .2
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.5 jsr BS.KW.FRE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LA356 pha
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda XBBB8
|
2022-04-03 11:55:03 +00:00
|
|
|
|
jsr BS.SetFileBuf
|
2022-03-06 22:28:52 +00:00
|
|
|
|
pla
|
|
|
|
|
rts
|
2022-03-24 20:24:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-04-07 17:19:48 +00:00
|
|
|
|
BS.MoveMemDown ldy #$00
|
|
|
|
|
cpy BS.ReqMem+1
|
2022-03-24 20:24:26 +00:00
|
|
|
|
beq .2
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
.1 lda (ZP.PCL),y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta (ZP.A1L),y
|
|
|
|
|
iny
|
2022-03-24 20:24:26 +00:00
|
|
|
|
bne .1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
inc ZP.PCH
|
|
|
|
|
inc ZP.A1H
|
2022-04-07 17:19:48 +00:00
|
|
|
|
dec BS.ReqMem+1
|
2022-03-24 20:24:26 +00:00
|
|
|
|
bne .1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-04-07 17:19:48 +00:00
|
|
|
|
.2 cpy BS.ReqMem
|
2022-03-24 20:24:26 +00:00
|
|
|
|
beq .8
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda (ZP.PCL),y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta (ZP.A1L),y
|
|
|
|
|
iny
|
2022-03-24 20:24:26 +00:00
|
|
|
|
bne .2
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
.8 rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-04-07 17:19:48 +00:00
|
|
|
|
BS.MoveMemUp ldy BS.ReqMem
|
2022-03-06 22:28:52 +00:00
|
|
|
|
XA386 beq LA38F SELF MODIFIED
|
|
|
|
|
|
|
|
|
|
LA388 jsr LA39A
|
2022-05-25 18:46:02 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
dec ZP.A1H
|
|
|
|
|
dec ZP.PCH
|
|
|
|
|
|
2022-04-07 17:19:48 +00:00
|
|
|
|
LA38F cpy BS.ReqMem+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA3A2
|
|
|
|
|
|
2022-04-07 17:19:48 +00:00
|
|
|
|
dec BS.ReqMem+1
|
2022-03-24 20:24:26 +00:00
|
|
|
|
bra LA388
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LA39A dey
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda (ZP.PCL),y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta (ZP.A1L),y
|
|
|
|
|
tya
|
|
|
|
|
bne LA39A
|
|
|
|
|
|
|
|
|
|
LA3A2 rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LA3A3 lda AS.VARSTART+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta ZP.A2H
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.VARSTART
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx AS.ARRAYSTART+1
|
|
|
|
|
clc
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bcc .2
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.1 clc
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda ZP.A2L
|
2022-03-06 22:28:52 +00:00
|
|
|
|
adc #$07
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.2 sta ZP.A2L
|
|
|
|
|
bcc .3
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
inc ZP.A2H
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.3 eor AS.ARRAYSTART
|
|
|
|
|
bne .4
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
cpx ZP.A2H
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.4 clc
|
|
|
|
|
beq .5
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
ldy #$00
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda (ZP.A2L),y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
iny
|
|
|
|
|
eor (ZP.A2L),y
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bpl .1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda (ZP.A2L),y
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bpl .1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
jsr LA3FD
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bra .1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.5 lda ZP.A2L
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta XBBDC
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.6 clc
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr LA160
|
|
|
|
|
bcs LA410
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.7 ldy #$00
|
2022-03-06 22:28:52 +00:00
|
|
|
|
clc
|
|
|
|
|
jsr LA3FD
|
|
|
|
|
clc
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$03
|
2022-03-06 22:28:52 +00:00
|
|
|
|
adc ZP.A2L
|
|
|
|
|
sta ZP.A2L
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bcc .8
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
inc ZP.A2H
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.8 cmp XBBDC
|
|
|
|
|
bne .7
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
cpx ZP.A2H
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bne .7
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
beq .6
|
2022-04-19 18:24:34 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LA3FD lda (ZP.A2L),y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA410
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
iny
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.VARSTART+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cmp (ZP.A2L),y
|
|
|
|
|
bcs LA410
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda (ZP.A2L),y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
adc XBBE2
|
|
|
|
|
sta (ZP.A2L),y
|
|
|
|
|
|
|
|
|
|
LA410 rts
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
2022-05-25 18:46:02 +00:00
|
|
|
|
LA411 jsr BS.FRE0
|
|
|
|
|
bcs .9
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.ARRAYEND
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
sbc AS.VARSTART
|
|
|
|
|
sta BS.BAS.HDR
|
2022-04-07 17:19:48 +00:00
|
|
|
|
sta BS.ReqMem
|
2022-03-27 12:59:32 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.ARRAYEND+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc AS.VARSTART+1
|
|
|
|
|
sta BS.BAS.HDR+1
|
2022-04-07 17:19:48 +00:00
|
|
|
|
sta BS.ReqMem+1
|
2022-03-27 12:59:32 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.ARRAYSTART
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc AS.VARSTART
|
|
|
|
|
sta BS.BAS.HDR+2
|
2022-03-27 12:59:32 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.ARRAYSTART+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc AS.VARSTART+1
|
|
|
|
|
sta BS.BAS.HDR+3
|
2022-03-27 12:59:32 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.STRINGSTART
|
2022-04-07 17:19:48 +00:00
|
|
|
|
sbc BS.ReqMem
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta ZP.A1L
|
2022-03-27 12:59:32 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.STRINGSTART+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc #$00
|
|
|
|
|
sta ZP.A1H
|
2022-03-27 12:59:32 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.ARRAYEND
|
2022-04-07 17:19:48 +00:00
|
|
|
|
sbc BS.ReqMem
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta ZP.PCL
|
2022-03-27 12:59:32 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.ARRAYEND+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc #$00
|
|
|
|
|
sta ZP.PCH
|
2022-03-27 12:59:32 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$03
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta XA386+1
|
2022-04-07 17:19:48 +00:00
|
|
|
|
|
|
|
|
|
jsr BS.MoveMemUp
|
2022-03-24 20:24:26 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$07
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta XA386+1
|
2022-04-07 17:19:48 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda ZP.A1L
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta XBBE9
|
2022-04-07 17:19:48 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
inc ZP.A1H
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda ZP.A1H
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta XBBEA
|
2022-03-27 12:59:32 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.HIMEM
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
sbc ZP.A1L
|
|
|
|
|
sta XBBEB
|
2022-03-27 12:59:32 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.HIMEM+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta BS.BAS.HDR+4
|
|
|
|
|
sbc ZP.A1H
|
|
|
|
|
sta XBBEC
|
2022-03-27 12:59:32 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
clc
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.9 rts
|
2022-04-01 19:43:16 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LA480 lda BS.BAS.HDR
|
2022-04-07 17:19:48 +00:00
|
|
|
|
sta BS.ReqMem
|
2022-03-06 22:28:52 +00:00
|
|
|
|
clc
|
|
|
|
|
adc AS.VARSTART
|
|
|
|
|
sta AS.ARRAYEND
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda BS.BAS.HDR+1
|
2022-04-07 17:19:48 +00:00
|
|
|
|
sta BS.ReqMem+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
adc AS.VARSTART+1
|
|
|
|
|
sta AS.ARRAYEND+1
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.VARSTART
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta ZP.A1L
|
|
|
|
|
adc BS.BAS.HDR+2
|
|
|
|
|
sta AS.ARRAYSTART
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.VARSTART+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta ZP.A1H
|
|
|
|
|
adc BS.BAS.HDR+3
|
|
|
|
|
sta AS.ARRAYSTART+1
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda XBBE9
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta ZP.PCL
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda XBBEA
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta ZP.PCH
|
2022-03-24 20:24:26 +00:00
|
|
|
|
|
2022-04-07 17:19:48 +00:00
|
|
|
|
jsr BS.MoveMemDown
|
|
|
|
|
|
|
|
|
|
lda BS.ReqMem
|
2022-03-06 22:28:52 +00:00
|
|
|
|
clc
|
|
|
|
|
adc ZP.PCL
|
|
|
|
|
sta AS.STRINGSTART
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda ZP.PCH
|
2022-03-06 22:28:52 +00:00
|
|
|
|
adc #$00
|
|
|
|
|
sta AS.STRINGSTART+1
|
|
|
|
|
sec
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.HIMEM+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc BS.BAS.HDR+4
|
2022-05-25 18:46:02 +00:00
|
|
|
|
beq .8
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
sta XBBE2
|
|
|
|
|
jsr LA3A3
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.8 clc
|
2022-03-06 22:28:52 +00:00
|
|
|
|
rts
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.LINEBUFCLR80 lda #$A0
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx #$4F
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.1 sta IO.LINEBUF+1,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
dex
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bpl .1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
rts
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
2024-01-07 12:44:01 +00:00
|
|
|
|
BS.DOSCMD stz BS.bFreeBuf
|
|
|
|
|
|
|
|
|
|
lda #$FF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.XCNUM
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$20
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta BS.GetCharSep
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$08
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta BS.GetCharMax
|
|
|
|
|
jsr BS.GetKWInCmdBuf
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda BS.CMDBUF
|
|
|
|
|
cmp #'A'
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LA6A5
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
eor #'-'
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA6A5
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LA6A2 jmp BS.SYNERR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
LA6A5 jsr BS.IsIntCmd
|
2024-01-05 16:33:57 +00:00
|
|
|
|
bcc .1
|
|
|
|
|
|
|
|
|
|
jsr BS.IsExtCmd
|
2024-01-07 12:44:01 +00:00
|
|
|
|
bcc .1
|
2024-01-05 16:33:57 +00:00
|
|
|
|
|
2024-01-07 12:44:01 +00:00
|
|
|
|
rts
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2024-01-05 16:33:57 +00:00
|
|
|
|
.1 lda GP.STATE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LA6BA
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.EXECACTV
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LA6BA
|
|
|
|
|
|
|
|
|
|
jsr MON.CLREOL
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr MON.CROUT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LA6BA stz GP.FoundBITS
|
|
|
|
|
stz GP.FoundBITS+1
|
|
|
|
|
stz BS.CMDBUF
|
|
|
|
|
stz MLI.PATHBUF
|
2022-05-25 18:46:02 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.VDEFSLT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.ParamS
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.VDEFDRV
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.ParamD
|
2022-05-25 18:46:02 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.HIMEM+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
sta BS.BUFPAGE
|
2022-03-27 21:05:28 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx GP.XLEN
|
|
|
|
|
inx
|
|
|
|
|
inx
|
|
|
|
|
stx BS.GetCharMax
|
2022-03-27 21:05:28 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.AllowedBITS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA744
|
|
|
|
|
|
|
|
|
|
asl
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bmi LA747 CMDBITS0.SLOT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
jsr BS.GetKWInCmdBuf
|
|
|
|
|
php
|
|
|
|
|
pha
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.AllowedBITS
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bpl LA6F8 CMDBITS0.PFIX
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2024-01-07 12:44:01 +00:00
|
|
|
|
lda #MLI.GETPREFIX
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr GP.GOSYSTEM
|
|
|
|
|
|
|
|
|
|
LA6F8 pla
|
|
|
|
|
plp
|
|
|
|
|
beq LA744
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
cmp #','
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LA703
|
|
|
|
|
jmp LA795
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LA703 cmp #'/'
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA70B
|
2022-05-25 18:46:02 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
cmp #'.' .. or ../
|
|
|
|
|
beq LA70B
|
2022-05-25 18:46:02 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
cmp #'A'
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcc LA73D
|
|
|
|
|
|
|
|
|
|
LA70B dex
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$82
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta BS.GetCharSep
|
|
|
|
|
lsr
|
|
|
|
|
sta BS.GetCharMax
|
2022-03-24 20:24:26 +00:00
|
|
|
|
|
|
|
|
|
* ldy #$00
|
|
|
|
|
|
|
|
|
|
jsr BS.GetKWInCmdBufAtX
|
2022-03-06 22:28:52 +00:00
|
|
|
|
dey
|
|
|
|
|
sty BS.CMDBUF.LEN
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #CMDBITS0.FN1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.FoundBITS
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
phx
|
|
|
|
|
jsr BS.Expand2PATHBUF
|
|
|
|
|
plx
|
|
|
|
|
bcs LA73A
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
dex
|
2022-04-03 11:55:03 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr BS.GetCharSpaceSep
|
|
|
|
|
bne LA73A
|
|
|
|
|
|
|
|
|
|
bcc LA7A6
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.AllowedBITS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
lsr
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bcs LA770 CMDBITS0.FN1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LA73A jmp BS.SYNERR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LA73D lda GP.XCNUM
|
2022-03-24 20:24:26 +00:00
|
|
|
|
cmp #$06 RUN ????
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LA73A
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LA744 bra LA7A6
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LA747 jsr BS.GetKWInCmdBuf
|
|
|
|
|
beq LA73A
|
|
|
|
|
|
|
|
|
|
cmp #$41
|
|
|
|
|
beq LA79A
|
|
|
|
|
|
|
|
|
|
jsr BS.TMPBUF3Reset
|
2022-03-13 12:52:24 +00:00
|
|
|
|
stz XBC08
|
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldy #$13
|
|
|
|
|
sty XBC09
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
|
|
|
|
ldy #CMDBITS0.SLOT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sty GP.FoundBITS
|
2022-03-13 12:52:24 +00:00
|
|
|
|
|
2022-04-03 11:55:03 +00:00
|
|
|
|
stx BS.ToAUXSaveX
|
|
|
|
|
ldx #BSX.GetDecNum.X
|
|
|
|
|
jsr BS.ToAUX
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LA76F
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamINPR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cmp #$08
|
|
|
|
|
bcc LA79F
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LA76C lda #BS.E.RANGE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
LA76F rts
|
|
|
|
|
|
|
|
|
|
LA770 lsr
|
|
|
|
|
bcc LA795
|
|
|
|
|
|
|
|
|
|
jsr BS.GetCharSpaceSep
|
|
|
|
|
beq LA73A
|
|
|
|
|
|
|
|
|
|
dex
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$82
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta BS.GetCharSep
|
|
|
|
|
ldy #$01
|
|
|
|
|
jsr BS.GetPathInPathBuf
|
|
|
|
|
dey
|
|
|
|
|
dey
|
|
|
|
|
sty MLI.PATHBUF
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda #CMDBITS0.FN1+CMDBITS0.FN2
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.FoundBITS
|
|
|
|
|
dex
|
|
|
|
|
jsr BS.GetCharSpaceSep
|
|
|
|
|
bne LA73A
|
|
|
|
|
|
|
|
|
|
bcc LA7A6
|
2022-03-24 20:24:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LA795 jsr BS.GetCharSpaceSep
|
|
|
|
|
beq LA73A
|
|
|
|
|
|
2022-04-03 11:55:03 +00:00
|
|
|
|
LA79A stx BS.ToAUXSaveX
|
|
|
|
|
ldx #BSX.CheckOpt.X
|
|
|
|
|
jsr BS.ToAUX
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LA76F
|
|
|
|
|
|
|
|
|
|
LA79F jsr BS.GetCharSpaceSep
|
|
|
|
|
bne LA73A
|
|
|
|
|
|
|
|
|
|
bcs LA795
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LA7A6 lda GP.ParamS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA76C
|
|
|
|
|
|
|
|
|
|
cmp #$08
|
|
|
|
|
bcs LA76C
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamD
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA76C
|
|
|
|
|
|
|
|
|
|
cmp #$03
|
|
|
|
|
bcs LA76C
|
2024-01-05 16:33:57 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.AllowedBITS
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS0.RRUN+CMDBITS0.FN1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
lsr
|
|
|
|
|
beq LA7C9
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.STATE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LA7C9
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
lda #BS.E.NODIRECT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
LA7C9 bcc LA80B
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.AllowedBITS+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.SD
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA80B
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
lsr
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bcs LA7E1 CMDBITS0.FN1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.AllowedBITS
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS0.PFIX+CMDBITS0.FNOPT
|
2022-03-24 20:24:26 +00:00
|
|
|
|
beq BS.SYNERR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
bpl LA80B
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LA7E1 lda BS.CMDBUF
|
2022-03-24 20:24:26 +00:00
|
|
|
|
eor #'/'
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA7ED
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda MLI.PFIXPTR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA806
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LA7ED lda GP.FoundBITS+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.SD
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA80B
|
|
|
|
|
|
|
|
|
|
bcs LA806
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
stz BS.CMDBUF.LEN
|
|
|
|
|
stz BS.CMDBUF
|
2022-05-25 18:46:02 +00:00
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda #CMDBITS0.FN1
|
2022-03-15 19:33:19 +00:00
|
|
|
|
tsb GP.FoundBITS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LA806 jsr BS.GetVolAtSxDy
|
|
|
|
|
bcs LA849
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LA80B lda GP.XCNUM
|
2022-03-27 12:59:32 +00:00
|
|
|
|
beq .8
|
2022-03-13 12:52:24 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
cmp #25 PREFIX
|
|
|
|
|
beq .8
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
cmp #34 CD
|
|
|
|
|
beq .8
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.AllowedBITS+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.SD
|
2022-03-27 12:59:32 +00:00
|
|
|
|
beq .8
|
2022-05-25 18:46:02 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
lsr
|
|
|
|
|
bcc LA844
|
|
|
|
|
|
|
|
|
|
jsr BS.GetFileInfo
|
|
|
|
|
bcc LA844
|
|
|
|
|
|
|
|
|
|
cmp #$07
|
|
|
|
|
bne LA849
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.AllowedBITS
|
2022-05-25 18:46:02 +00:00
|
|
|
|
and #CMDBITS0.CRFLG
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LA844
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
lda #BS.E.PATHNFND6
|
2022-03-06 22:28:52 +00:00
|
|
|
|
rts
|
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
.8 clc
|
2024-01-07 12:44:01 +00:00
|
|
|
|
LA844 jsr .1
|
|
|
|
|
|
|
|
|
|
bit BS.bFreeBuf
|
|
|
|
|
bpl .8
|
|
|
|
|
|
|
|
|
|
php
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
jsr GP.FREEBUFR
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
plp
|
|
|
|
|
.8 rts
|
|
|
|
|
|
|
|
|
|
.1 jmp (BS.KW.JMPADDR)
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.SYNERR lda #BS.E.SYNTAX
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LA849 sec
|
|
|
|
|
rts
|
2024-01-07 12:44:01 +00:00
|
|
|
|
|
|
|
|
|
BS.bFreeBuf .BS 1
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.GetVolAtSxDy lda GP.ParamS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
pha
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamD
|
2022-03-06 22:28:52 +00:00
|
|
|
|
eor #$01
|
|
|
|
|
lsr
|
|
|
|
|
pla
|
|
|
|
|
ror
|
|
|
|
|
sta GP.MLIMRKEOFBUF.REFNUM
|
2022-03-13 12:52:24 +00:00
|
|
|
|
|
|
|
|
|
ldx #$01
|
|
|
|
|
ldy #$02
|
|
|
|
|
jsr BS.SetSBUFADRXY
|
|
|
|
|
|
2024-01-07 12:44:01 +00:00
|
|
|
|
lda #MLI.ONLINE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr GP.GOSYSTEM
|
|
|
|
|
bcs LA849
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamD
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.VDEFDRV
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.VDEFSLT
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda BS.CMDBUF
|
2022-03-24 20:24:26 +00:00
|
|
|
|
eor #'/'
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA8F4
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda IO.LINEBUF+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
and #$0F
|
|
|
|
|
adc #$02
|
|
|
|
|
sta IO.LINEBUF+1
|
|
|
|
|
adc BS.CMDBUF.LEN
|
|
|
|
|
cmp #$40
|
|
|
|
|
tax
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda #BS.E.SYNTAX
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LA8F5
|
|
|
|
|
|
|
|
|
|
ldy BS.CMDBUF.LEN
|
|
|
|
|
stx BS.CMDBUF.LEN
|
|
|
|
|
|
|
|
|
|
LA89D dex
|
|
|
|
|
dey
|
|
|
|
|
bmi LA8AA
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda BS.CMDBUF,y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta BS.CMDBUF,x
|
2022-03-24 20:24:26 +00:00
|
|
|
|
bra LA89D
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LA8AA lda #'/'
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta BS.CMDBUF
|
|
|
|
|
|
|
|
|
|
LA8AF sta BS.CMDBUF,x
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda IO.LINEBUF,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
dex
|
|
|
|
|
bne LA8AF
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.XCNUM
|
2022-04-03 21:25:00 +00:00
|
|
|
|
cmp #$0B OPEN
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA8F4
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
cmp #$16 DELETE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA8F4
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
cmp #$08 EXEC
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LA8F4
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda MLI.PATHBUF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
tay
|
|
|
|
|
clc
|
|
|
|
|
adc IO.LINEBUF+1
|
|
|
|
|
cmp #$40
|
|
|
|
|
tax
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda #BS.E.SYNTAX
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LA8F5
|
|
|
|
|
|
|
|
|
|
stx MLI.PATHBUF
|
|
|
|
|
|
|
|
|
|
LA8D9 dex
|
|
|
|
|
dey
|
|
|
|
|
bmi LA8E6
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda MLI.PATHBUF+1,y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta MLI.PATHBUF+1,x
|
2022-03-24 20:24:26 +00:00
|
|
|
|
bra LA8D9
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LA8E6 lda #'/'
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta MLI.PATHBUF+1
|
|
|
|
|
|
|
|
|
|
LA8EB sta MLI.PATHBUF+1,x
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda IO.LINEBUF,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
dex
|
|
|
|
|
bne LA8EB
|
|
|
|
|
|
|
|
|
|
LA8F4 clc
|
|
|
|
|
|
|
|
|
|
LA8F5 rts
|
2022-04-01 19:43:16 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
BS.GetPathInPathBuf
|
2022-03-13 12:52:24 +00:00
|
|
|
|
jsr BS.GetChar UC
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta MLI.PATHBUF,y
|
|
|
|
|
iny
|
2022-03-24 20:24:26 +00:00
|
|
|
|
cmp #','
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LAA45
|
|
|
|
|
|
|
|
|
|
cmp #$20
|
|
|
|
|
beq LAA45
|
|
|
|
|
|
|
|
|
|
cmp #$0D
|
|
|
|
|
beq LAA56
|
|
|
|
|
|
|
|
|
|
cpy BS.GetCharMax
|
|
|
|
|
bcc BS.GetPathInPathBuf
|
|
|
|
|
|
|
|
|
|
ora #$00
|
|
|
|
|
rts
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
BS.GetKWInCmdBuf
|
|
|
|
|
ldx #$00
|
2022-03-24 20:24:26 +00:00
|
|
|
|
|
|
|
|
|
BS.GetKWInCmdBufAtX
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldy #$00
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LAA2D jsr BS.GetChar UC
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta BS.CMDBUF,y
|
|
|
|
|
iny
|
2022-03-13 12:52:24 +00:00
|
|
|
|
cmp #','
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LAA45
|
|
|
|
|
|
|
|
|
|
cmp #$20
|
|
|
|
|
beq LAA45
|
|
|
|
|
|
|
|
|
|
cmp #$0D
|
|
|
|
|
beq LAA56
|
|
|
|
|
|
|
|
|
|
cpy BS.GetCharMax
|
|
|
|
|
bcc LAA2D
|
|
|
|
|
|
|
|
|
|
LAA45 ora #$00
|
|
|
|
|
rts
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
BS.GetCharSpaceSep
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$20
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta BS.GetCharSep
|
2022-03-13 12:52:24 +00:00
|
|
|
|
jsr BS.GetChar UC
|
|
|
|
|
cmp #','
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LAA57
|
|
|
|
|
|
|
|
|
|
cmp #$0D
|
|
|
|
|
|
|
|
|
|
LAA56 clc
|
|
|
|
|
LAA57 rts
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.GetChar lda IO.LINEBUF,x
|
|
|
|
|
and #$7F
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
inx
|
|
|
|
|
cmp BS.GetCharSep
|
|
|
|
|
beq BS.GetChar
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
BS.TMPBUF3x2 asl BS.TMPBUF4
|
|
|
|
|
rol BS.TMPBUF4+1
|
|
|
|
|
rol BS.TMPBUF4+2
|
2022-04-03 21:25:00 +00:00
|
|
|
|
BS.TMPBUF3x2.RTS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
rts
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-27 12:59:32 +00:00
|
|
|
|
BS.IsIntCmd ldx #BSX.IsIntCmd.X
|
|
|
|
|
jsr BS.ToAUX
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
bcc BS.TMPBUF3x2.RTS
|
2022-03-24 20:24:26 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
dec GP.XCNUM $ff
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
jmp GP.EXTRNCMD
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.TMPBUF3Reset stz BS.TMPBUF4
|
|
|
|
|
stz BS.TMPBUF4+1
|
|
|
|
|
stz BS.TMPBUF4+2
|
2022-03-06 22:28:52 +00:00
|
|
|
|
rts
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.KW.DASH lda GP.FITYPE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cmp #$FC
|
2022-03-13 12:52:24 +00:00
|
|
|
|
beq BS.KW.RUN
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
cmp #$06
|
|
|
|
|
beq LABA3
|
|
|
|
|
|
|
|
|
|
cmp #$04
|
|
|
|
|
bne LAB63
|
|
|
|
|
|
|
|
|
|
jmp BS.KW.EXEC
|
|
|
|
|
|
|
|
|
|
LAB63 cmp #$FF
|
|
|
|
|
beq LAB6F
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cmp #$B3
|
|
|
|
|
beq LAB6F
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
lda #BS.E.MISMATCH
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
LAB6F pha
|
2022-04-27 19:24:41 +00:00
|
|
|
|
jsr BS.CloseAll
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr LB36B
|
2022-05-25 18:46:02 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
stz GP.ParamA
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
stz MLI.MEMTABL+20
|
|
|
|
|
stz MLI.MEMTABL+21
|
|
|
|
|
stz MLI.MEMTABL+22
|
2022-05-25 18:46:02 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$01
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta MLI.MEMTABL+23
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$20
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.ParamA+1
|
|
|
|
|
pla
|
|
|
|
|
cmp #$FF
|
|
|
|
|
bne LABA6
|
|
|
|
|
|
|
|
|
|
sta GP.ParamT
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda #CMDBITS1.A
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.FoundBITS+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda #CMDBITS0.T+CMDBITS0.FN1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.FoundBITS
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LABA3 jmp BS.KW.BRUN
|
|
|
|
|
|
|
|
|
|
LABA6 sec
|
|
|
|
|
jsr MON.IIGSID
|
|
|
|
|
bcs LABA3
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
jmp BS.QUIT.IIgs
|
2022-03-24 20:24:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.KW.CHAIN jsr LA411
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.HIMEM+1
|
2022-05-25 18:46:02 +00:00
|
|
|
|
pha
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx XBBEA
|
|
|
|
|
dex
|
|
|
|
|
stx AS.HIMEM+1
|
2022-04-27 19:24:41 +00:00
|
|
|
|
jsr BS.LoadBAS
|
2022-05-25 18:46:02 +00:00
|
|
|
|
plx
|
2022-03-06 22:28:52 +00:00
|
|
|
|
stx AS.HIMEM+1
|
2022-04-27 19:24:41 +00:00
|
|
|
|
bcs BS.LoadBAS0.RTS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
jsr AS.CLEAR1
|
|
|
|
|
jsr LA480
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$00
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LABE6
|
2022-03-24 20:24:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-13 12:52:24 +00:00
|
|
|
|
BS.KW.RUN stz GP.IFILACTV
|
|
|
|
|
stz AS.ERRNUM
|
|
|
|
|
|
|
|
|
|
lda GP.FoundBITS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
lsr
|
|
|
|
|
bcc LABF4
|
|
|
|
|
|
2022-04-27 19:24:41 +00:00
|
|
|
|
jsr BS.LoadBAS0
|
|
|
|
|
bcs BS.LoadBAS0.RTS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
jsr AS.CLEAR1
|
|
|
|
|
|
|
|
|
|
LABE6 sta AS.ERRFLG
|
2022-04-27 19:24:41 +00:00
|
|
|
|
jsr BS.SetRunLineNum
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr BS.SaveCSWKSW
|
|
|
|
|
jsr LABF4
|
|
|
|
|
jmp AS.NEXTSTMT
|
2022-04-27 19:24:41 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LABF4 jsr AS.NORMAL
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$A3
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta X9F65
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$FF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.XCNUM
|
|
|
|
|
sta ZP.PROMPT
|
|
|
|
|
ldx #$04
|
|
|
|
|
jsr BS.SetState
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jmp BS.SYNERR
|
|
|
|
|
*--------------------------------------
|
2022-04-27 19:24:41 +00:00
|
|
|
|
BS.KW.LOAD jsr BS.LoadBAS0
|
|
|
|
|
bcs BS.LoadBAS0.RTS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
BS.ENTRY jsr AS.CLEAR1
|
|
|
|
|
jsr BS.SetState0
|
2022-05-25 18:46:02 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
stz ZP.CH
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jmp AS.RESTART1
|
2022-04-27 19:24:41 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.LoadBAS0 jsr BS.CloseAll
|
|
|
|
|
BS.LoadBAS0.RTS bcs BS.LoadBAS.RTS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-04-27 19:24:41 +00:00
|
|
|
|
BS.LoadBAS lda #$01
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx #$FC
|
|
|
|
|
jsr BS.CheckFTypeXAccessA
|
2022-04-27 19:24:41 +00:00
|
|
|
|
bcs BS.LoadBAS.RTS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.MLIGetEOF
|
2022-04-27 19:24:41 +00:00
|
|
|
|
bcs BS.LoadBAS.RTS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.PGRMSTART
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR
|
|
|
|
|
adc GP.SBUFADR
|
|
|
|
|
sta GP.ParamA
|
2022-04-27 19:24:41 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.PGRMSTART+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR+1
|
|
|
|
|
adc GP.SBUFADR+1
|
|
|
|
|
sta GP.ParamA+1
|
2022-04-27 19:24:41 +00:00
|
|
|
|
bcs .1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
cmp AS.HIMEM+1
|
|
|
|
|
|
2022-04-27 19:24:41 +00:00
|
|
|
|
.1 lda #BS.E.TOOLARGE
|
|
|
|
|
bcs BS.LoadBAS.RTS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
ldx GP.SBUFADR
|
|
|
|
|
ldy GP.SBUFADR+1
|
|
|
|
|
jsr BS.ReadXYBytes
|
2022-04-27 19:24:41 +00:00
|
|
|
|
bcs BS.LoadBAS.RTS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-15 19:33:19 +00:00
|
|
|
|
jsr BS.MLIClose
|
2022-04-27 19:24:41 +00:00
|
|
|
|
bcs BS.LoadBAS.RTS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
jsr LAC80
|
|
|
|
|
ldx GP.ParamA+1
|
|
|
|
|
ldy GP.ParamA
|
2022-04-27 19:24:41 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
stx AS.PGRMEND+1
|
|
|
|
|
sty AS.PGRMEND
|
|
|
|
|
|
2022-04-27 19:24:41 +00:00
|
|
|
|
sty AS.ARRAYSTART
|
|
|
|
|
sty AS.VARSTART
|
|
|
|
|
sty AS.ARRAYEND
|
|
|
|
|
stx AS.ARRAYSTART+1
|
|
|
|
|
stx AS.VARSTART+1
|
|
|
|
|
stx AS.ARRAYEND+1
|
|
|
|
|
|
|
|
|
|
BS.LoadBAS.RTS rts
|
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LAC80 sec
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.PGRMSTART
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc GP.FIAUXTYPE
|
|
|
|
|
sta ZP.A1L
|
2022-04-27 19:24:41 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.PGRMSTART+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc GP.FIAUXTYPE+1
|
|
|
|
|
sta ZP.A1H
|
|
|
|
|
ora ZP.A1L
|
|
|
|
|
clc
|
|
|
|
|
beq LACD9
|
|
|
|
|
|
|
|
|
|
ldx AS.PGRMSTART
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.PGRMSTART+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LAC98 stx ZP.PCL
|
|
|
|
|
sta ZP.PCH
|
|
|
|
|
ldy #$01
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda (ZP.PCL),y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
dey
|
|
|
|
|
ora (ZP.PCL),y
|
|
|
|
|
beq LACD9
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda (ZP.PCL),y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
adc ZP.A1L
|
|
|
|
|
tax
|
|
|
|
|
sta (ZP.PCL),y
|
|
|
|
|
iny
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda (ZP.PCL),y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
adc ZP.A1H
|
|
|
|
|
sta (ZP.PCL),y
|
|
|
|
|
clc
|
|
|
|
|
bcc LAC98
|
|
|
|
|
|
2022-04-27 19:24:41 +00:00
|
|
|
|
BS.SetRunLineNum
|
|
|
|
|
lda GP.FoundBITS+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.LINE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
clc
|
|
|
|
|
beq LACD9
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamAT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta AS.LINNUM
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamAT+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta AS.LINNUM+1
|
|
|
|
|
jsr AS.FINDLINE
|
|
|
|
|
clc
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.LOWTR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
adc #$FF
|
|
|
|
|
sta AS.TXTPTR
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.LOWTR+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
adc #$FF
|
|
|
|
|
sta AS.TXTPTR+1
|
|
|
|
|
clc
|
|
|
|
|
LACD9 rts
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.KW.SAVE bcc LACFE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$FC
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.ParamT
|
|
|
|
|
sta GP.FITYPE
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$C3
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.FIACCESS
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.PGRMSTART
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.CRAUXTYPE
|
|
|
|
|
sta GP.FIAUXTYPE
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.PGRMSTART+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.CRAUXTYPE+1
|
|
|
|
|
sta GP.FIAUXTYPE+1
|
|
|
|
|
jsr BS.CreateFileOrDir
|
|
|
|
|
bcs LAD47
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LACFE lda #$02
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx #$FC
|
|
|
|
|
jsr BS.CheckFTypeXAccessA
|
|
|
|
|
bcs LAD47
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.PGRMEND
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
sbc AS.PGRMSTART
|
|
|
|
|
tax
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.PGRMEND+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc AS.PGRMSTART+1
|
|
|
|
|
tay
|
2022-03-13 12:52:24 +00:00
|
|
|
|
|
|
|
|
|
jsr BS.SetSBUFADRXY0
|
|
|
|
|
|
|
|
|
|
lda AS.PGRMSTART
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.PGRMSTART+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR+1
|
|
|
|
|
jsr BS.WriteXYBytes
|
|
|
|
|
bcs LAD47
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.MLISetEOF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LAD47
|
|
|
|
|
|
2022-03-15 19:33:19 +00:00
|
|
|
|
jsr BS.MLIClose
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LAD47
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.PGRMSTART+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx AS.PGRMSTART
|
|
|
|
|
cmp GP.FIAUXTYPE+1
|
|
|
|
|
bne LAD48
|
|
|
|
|
|
|
|
|
|
cpx GP.FIAUXTYPE
|
|
|
|
|
clc
|
|
|
|
|
bne LAD48
|
|
|
|
|
|
|
|
|
|
LAD47 rts
|
|
|
|
|
|
|
|
|
|
LAD48 stx GP.FIAUXTYPE
|
|
|
|
|
sta GP.FIAUXTYPE+1
|
|
|
|
|
jmp BS.SetFileInfoNoDate
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.KW.CREATE stz GP.CRAUXTYPE
|
|
|
|
|
stz GP.CRAUXTYPE+1
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS
|
|
|
|
|
and #CMDBITS0.T
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne BS.CreateFileOrDir
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$0F
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.ParamT
|
|
|
|
|
BS.CreateFileOrDir
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.EXECACTV
|
2022-03-06 22:28:52 +00:00
|
|
|
|
asl
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$00
|
2022-03-06 22:28:52 +00:00
|
|
|
|
adc GP.OPENCNT
|
|
|
|
|
cmp #$08
|
|
|
|
|
bcs LAD8D
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.CRTYPE
|
|
|
|
|
ldx #$C3
|
|
|
|
|
ldy #$01
|
|
|
|
|
cmp #$0F
|
|
|
|
|
bne LAD82
|
|
|
|
|
|
|
|
|
|
ldy #$0D
|
|
|
|
|
|
|
|
|
|
LAD82 stx GP.CRACCESS
|
|
|
|
|
sty GP.CRSTTYPE
|
2024-01-07 12:44:01 +00:00
|
|
|
|
lda #MLI.CREATE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jmp GP.GOSYSTEM
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LAD8D lda #BS.E.NOBUFFER
|
2022-03-06 22:28:52 +00:00
|
|
|
|
rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-13 12:52:24 +00:00
|
|
|
|
BS.KW.RENAME lda GP.FoundBITS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
lsr
|
|
|
|
|
lsr
|
2024-01-07 12:44:01 +00:00
|
|
|
|
lda #MLI.RENAME
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LAD9E
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jmp BS.SYNERR
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2024-01-07 12:44:01 +00:00
|
|
|
|
BS.KW.DELETE lda #MLI.DESTROY
|
2022-03-24 20:24:26 +00:00
|
|
|
|
.HS 2C BIT ABS
|
2024-01-07 12:44:01 +00:00
|
|
|
|
BS.SETPREFIX lda #MLI.SETPREFIX
|
2022-05-25 18:46:02 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LAD9E jmp GP.GOSYSTEM
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
BS.KW.LOCK jsr BS.GetFileInfo
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FIACCESS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
and #$3C
|
|
|
|
|
ora #$01
|
2022-03-15 19:33:19 +00:00
|
|
|
|
bra BS.KW.UNLOCK1
|
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
BS.KW.UNLOCK jsr BS.GetFileInfo
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$C3
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ora GP.FIACCESS
|
|
|
|
|
|
2022-03-15 19:33:19 +00:00
|
|
|
|
BS.KW.UNLOCK1 sta GP.FIACCESS
|
|
|
|
|
jmp BS.SetFileInfo
|
|
|
|
|
*--------------------------------------
|
2022-03-13 12:52:24 +00:00
|
|
|
|
BS.KW.PREFIX lda GP.FoundBITS+1
|
2022-03-24 20:24:26 +00:00
|
|
|
|
and #CMDBITS1.SD
|
|
|
|
|
|
|
|
|
|
bne BS.SETPREFIX
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
lsr
|
2022-03-24 20:24:26 +00:00
|
|
|
|
bcs BS.SETPREFIX
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.GETPREFIX lda ZP.PROMPT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LADF0
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr MON.CROUT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx #$00
|
|
|
|
|
|
|
|
|
|
LADD8 cpx BS.CMDBUF.LEN
|
|
|
|
|
beq LADE8
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda BS.CMDBUF,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ora #$80
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr MON.COUT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
inx
|
|
|
|
|
bne LADD8
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LADE8 jsr MON.CROUT
|
|
|
|
|
jsr MON.CROUT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
2022-03-15 19:33:19 +00:00
|
|
|
|
LADF0 sec
|
|
|
|
|
ror GP.PFXACTV
|
2022-03-06 22:28:52 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2024-01-05 21:56:46 +00:00
|
|
|
|
BS.IsExtCmd ldx #BSX.GetPath.X
|
|
|
|
|
jsr BS.ToAUX
|
|
|
|
|
|
|
|
|
|
ldx BS.CMDBUF.LEN
|
|
|
|
|
ldy #$ff
|
|
|
|
|
|
|
|
|
|
.1 iny
|
|
|
|
|
lda IO.LINEBUF,y
|
|
|
|
|
and #$7F
|
|
|
|
|
cmp #$0D
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
cmp #$20
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
sta BS.CMDBUF,x
|
|
|
|
|
inx
|
|
|
|
|
bra .1
|
|
|
|
|
|
|
|
|
|
.2 stx BS.CMDBUF.LEN
|
2024-01-07 12:44:01 +00:00
|
|
|
|
dey
|
|
|
|
|
sty GP.XLEN
|
2024-01-05 21:56:46 +00:00
|
|
|
|
|
|
|
|
|
jsr BS.GetFileInfo
|
2024-01-07 12:44:01 +00:00
|
|
|
|
bcs .99
|
2024-01-05 21:56:46 +00:00
|
|
|
|
|
2024-01-07 12:44:01 +00:00
|
|
|
|
stz GP.XCNUM
|
|
|
|
|
|
|
|
|
|
lda AS.HIMEM+1
|
|
|
|
|
sta BS.BUFPAGE
|
2024-01-05 21:56:46 +00:00
|
|
|
|
|
2024-01-07 12:44:01 +00:00
|
|
|
|
lda #$01 Read
|
|
|
|
|
ldx #$06 BIN
|
2024-01-05 21:56:46 +00:00
|
|
|
|
|
|
|
|
|
jsr BS.OpenTypeXAccessA
|
2024-01-07 12:44:01 +00:00
|
|
|
|
bcs .99
|
2024-01-05 21:56:46 +00:00
|
|
|
|
|
|
|
|
|
jsr BS.MLIGetEOF
|
2024-01-07 12:44:01 +00:00
|
|
|
|
php
|
|
|
|
|
pha
|
|
|
|
|
jsr BS.MLIClose
|
|
|
|
|
pla
|
|
|
|
|
plp
|
|
|
|
|
bcs .99
|
2024-01-05 21:56:46 +00:00
|
|
|
|
|
2024-01-07 12:44:01 +00:00
|
|
|
|
lda GP.SBUFADR+2 File LEN in GP.SBUFADR
|
|
|
|
|
beq .20
|
|
|
|
|
|
|
|
|
|
lda #BS.E.TOOLARGE
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.20 lda GP.SBUFADR+1
|
|
|
|
|
sta GP.MLIRW.COUNT+1
|
2024-01-05 21:56:46 +00:00
|
|
|
|
ldx GP.SBUFADR
|
2024-01-07 12:44:01 +00:00
|
|
|
|
stx GP.MLIRW.COUNT
|
|
|
|
|
beq .3
|
|
|
|
|
|
|
|
|
|
inc
|
2024-01-05 21:56:46 +00:00
|
|
|
|
|
2024-01-07 12:44:01 +00:00
|
|
|
|
.3 jsr GP.GETBUFR
|
|
|
|
|
bcs .99
|
|
|
|
|
|
|
|
|
|
dec BS.bFreeBuf
|
|
|
|
|
stz GP.MLIRW.DATAPTR
|
2024-01-05 21:56:46 +00:00
|
|
|
|
|
2024-01-07 12:44:01 +00:00
|
|
|
|
stz BS.KW.JMPADDR
|
2024-01-05 21:56:46 +00:00
|
|
|
|
|
2024-01-07 12:44:01 +00:00
|
|
|
|
lda GP.SBUFADR+1 Buffer Addr in GP.SBUFADR
|
|
|
|
|
sta GP.MLIRW.DATAPTR+1
|
2024-01-05 21:56:46 +00:00
|
|
|
|
|
2024-01-07 12:44:01 +00:00
|
|
|
|
sta BS.KW.JMPADDR+1
|
|
|
|
|
|
|
|
|
|
lda AS.HIMEM+1
|
|
|
|
|
sta BS.BUFPAGE
|
|
|
|
|
|
|
|
|
|
lda #$01 Read
|
|
|
|
|
ldx #$06 BIN
|
|
|
|
|
|
|
|
|
|
jsr BS.OpenTypeXAccessA
|
|
|
|
|
bcs .98
|
|
|
|
|
|
|
|
|
|
lda #MLI.READ
|
|
|
|
|
jsr GP.GOSYSTEM
|
|
|
|
|
bcs .98
|
|
|
|
|
|
|
|
|
|
jsr BS.MLIClose
|
|
|
|
|
bcs .98
|
|
|
|
|
|
|
|
|
|
ldx #BSX.Rel.X
|
|
|
|
|
|
|
|
|
|
jsr BS.ToAUX
|
|
|
|
|
bcc .99
|
|
|
|
|
|
|
|
|
|
.98 pha
|
|
|
|
|
|
|
|
|
|
jsr GP.FREEBUFR
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
|
|
|
|
|
.99 rts
|
2024-01-05 21:56:46 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/basic.fx/basic.s.b
|
|
|
|
|
LOAD usr/src/basic.fx/basic.s
|
|
|
|
|
ASM
|