2022-03-06 22:28:52 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.KW.BSAVE bcc LAE2D
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.A+CMDBITS1.E+CMDBITS1.L
|
|
|
|
|
cmp #CMDBITS1.A+CMDBITS1.L
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
XAE00 bcc LAE31
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamA
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.CRAUXTYPE
|
|
|
|
|
sta GP.FIAUXTYPE
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamA+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.CRAUXTYPE+1
|
|
|
|
|
sta GP.FIAUXTYPE+1
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$06
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.ParamT
|
|
|
|
|
sta GP.FITYPE
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS0.T
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LAE31
|
|
|
|
|
|
|
|
|
|
jsr BS.CreateFileOrDir
|
|
|
|
|
bcs LAE33
|
|
|
|
|
|
|
|
|
|
jsr BS.GetFileInfo
|
|
|
|
|
bcs LAE33
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LAE2D lda #$02
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LAE44
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LAE31 lda #$06
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LAE33 sec
|
|
|
|
|
rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
BS.KW.BRUN jsr BS.KW.BLOAD
|
|
|
|
|
bcs LAE33
|
|
|
|
|
|
|
|
|
|
jsr LAE3F
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
LAE3F jmp (GP.MLIRW.DATAPTR)
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-13 12:52:24 +00:00
|
|
|
|
BS.KW.BLOAD lda #$01
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LAE44 ldx #$06
|
|
|
|
|
jsr BS.CheckFTypeXAccessA
|
|
|
|
|
bcs LAE33
|
|
|
|
|
|
|
|
|
|
ldx GP.ParamA
|
|
|
|
|
ldy GP.ParamA+1
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bmi LAE66
|
|
|
|
|
|
|
|
|
|
ldx GP.FIAUXTYPE
|
|
|
|
|
ldy GP.FIAUXTYPE+1
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS0.T
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LAEAB
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LAE66 stx GP.MLIRW.DATAPTR
|
|
|
|
|
sty GP.MLIRW.DATAPTR+1
|
|
|
|
|
bit GP.FoundBITS+1
|
|
|
|
|
bvs LAE80
|
|
|
|
|
|
|
|
|
|
pha
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FITYPE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cmp #$06
|
|
|
|
|
bne LAE7F
|
|
|
|
|
|
|
|
|
|
stx GP.FIAUXTYPE
|
|
|
|
|
sty GP.FIAUXTYPE+1
|
|
|
|
|
|
|
|
|
|
LAE7F pla
|
|
|
|
|
LAE80 ldx GP.ParamL
|
|
|
|
|
ldy GP.ParamL+1
|
|
|
|
|
and #$30
|
|
|
|
|
beq LAEAF
|
|
|
|
|
|
|
|
|
|
eor #$30
|
|
|
|
|
beq LAEAB
|
|
|
|
|
|
|
|
|
|
and #$10
|
|
|
|
|
beq LAEC5
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
sbc GP.ParamA
|
|
|
|
|
tax
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamE+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc GP.ParamA+1
|
|
|
|
|
tay
|
|
|
|
|
inx
|
|
|
|
|
bne LAEA5
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
LAEA5 bcs LAEC5
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
lda #BS.E.RANGE
|
|
|
|
|
.HS 2C BIT ABS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LAEAB lda #BS.E.INVOPT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LAEAF jsr BS.MLIGetEOF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LAEC3
|
|
|
|
|
|
|
|
|
|
ldx GP.SBUFADR
|
|
|
|
|
ldy GP.SBUFADR+1
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.SBUFADR+2
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LAEC5
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
lda #BS.E.TOOLARGE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LAEC3 sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
LAEC5 stx GP.MLIRW.COUNT
|
|
|
|
|
sty GP.MLIRW.COUNT+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.B
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LAEF7
|
|
|
|
|
|
|
|
|
|
ldx #$02
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LAED4 lda GP.ParamB,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.SBUFADR,x
|
|
|
|
|
dex
|
|
|
|
|
bpl LAED4
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LAEDD jsr BS.MLISetMark
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx GP.XCNUM
|
|
|
|
|
bcc LAEF7
|
|
|
|
|
|
|
|
|
|
cmp #$02
|
|
|
|
|
bne LAEC3
|
|
|
|
|
|
|
|
|
|
cpx #$0F
|
|
|
|
|
bne LAEC3
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.MLISetEOF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcc LAEDD
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
LAEF7 ldx GP.XCNUM
|
2022-03-15 19:33:19 +00:00
|
|
|
|
lda #MLI.C.READ
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cpx #$0F
|
|
|
|
|
bne LAF24
|
|
|
|
|
|
|
|
|
|
bit GP.FoundBITS+1
|
|
|
|
|
bvs LAF22
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.E+CMDBITS1.L
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LAF22
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
ldx GP.MLIRW.COUNT
|
|
|
|
|
ldy GP.MLIRW.COUNT+1
|
|
|
|
|
jsr BS.SetSBUFADRXY0
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.MLISetEOF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LAF22 lda #MLI.C.WRITE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LAF24 jsr GP.GOSYSTEM
|
|
|
|
|
bcs LAF38
|
2022-03-13 12:52:24 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bit GP.FoundBITS+1
|
|
|
|
|
bvs LAF35
|
|
|
|
|
|
|
|
|
|
cpx #$0F
|
|
|
|
|
bne LAF35
|
|
|
|
|
|
|
|
|
|
jsr BS.SetFileInfoNoDate
|
|
|
|
|
|
2022-03-15 19:33:19 +00:00
|
|
|
|
LAF35 jmp BS.MLIClose
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LAF38 rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.KW.STORE bcc LAF4E
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$FD
|
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
|
|
|
|
|
jsr BS.CreateFileOrDir
|
|
|
|
|
bcs LAF9C
|
|
|
|
|
|
|
|
|
|
LAF4E jsr LA411
|
|
|
|
|
bcs LAF9C
|
|
|
|
|
|
|
|
|
|
ldx #$FD
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$02
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr BS.CheckFTypeXAccessA
|
|
|
|
|
bcs LAF95
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.SetupRWBASHDR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr BS.WriteXYBytes
|
|
|
|
|
bcs LAF95
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda XBBE9
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR
|
|
|
|
|
sta GP.FIAUXTYPE
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda XBBEA
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR+1
|
|
|
|
|
sta GP.FIAUXTYPE+1
|
|
|
|
|
ldy XBBEC
|
|
|
|
|
ldx XBBEB
|
|
|
|
|
jsr BS.WriteXYBytes
|
|
|
|
|
bcs LAF95
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.MLIGetMark
|
2022-03-13 12:52:24 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.MLISetEOF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LAF95
|
|
|
|
|
|
|
|
|
|
jsr BS.SetFileInfoNoDate
|
|
|
|
|
bcs LAF95
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LAF92 jsr BS.MLIClose
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LAF95 php
|
|
|
|
|
pha
|
|
|
|
|
jsr LA480
|
|
|
|
|
pla
|
|
|
|
|
plp
|
|
|
|
|
LAF9C rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.SetupRWBASHDR
|
|
|
|
|
lda #BS.BAS.HDR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR
|
2022-03-24 20:24:26 +00:00
|
|
|
|
lda /BS.BAS.HDR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR+1
|
|
|
|
|
ldy #$00
|
|
|
|
|
ldx #$05
|
|
|
|
|
rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.KW.RESTORE ldx #$FD
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$01
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr BS.CheckFTypeXAccessA
|
|
|
|
|
bcs LAF9C
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.SetupRWBASHDR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr BS.ReadXYBytes
|
|
|
|
|
bcs LAF9C
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FIAUXTYPE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta XBBE9
|
|
|
|
|
sta GP.MLIRW.DATAPTR
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.HIMEM+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
sbc BS.BAS.HDR+4
|
|
|
|
|
clc
|
|
|
|
|
adc GP.FIAUXTYPE+1
|
|
|
|
|
sta GP.MLIRW.DATAPTR+1
|
|
|
|
|
sta XBBEA
|
|
|
|
|
cmp AS.PGRMEND+1
|
|
|
|
|
bcc LAFF3
|
|
|
|
|
|
|
|
|
|
beq LAFF3
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$00
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc XBBE9
|
|
|
|
|
tax
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.HIMEM+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc XBBEA
|
|
|
|
|
tay
|
|
|
|
|
jsr BS.ReadXYBytes
|
|
|
|
|
bcs LAF9C
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
bra LAF92
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LAFF3 lda #BS.E.TOOLARGE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.ReadXYBytes clc
|
|
|
|
|
.HS B0 BCS
|
|
|
|
|
BS.WriteXYBytes sec
|
2022-03-15 19:33:19 +00:00
|
|
|
|
sty GP.MLIRW.COUNT+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
stx GP.MLIRW.COUNT
|
2022-03-24 20:24:26 +00:00
|
|
|
|
bcc BS.MLIRead
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.MLIWrite lda #MLI.C.WRITE
|
|
|
|
|
.HS 2C BIT ABS
|
|
|
|
|
BS.MLIRead lda #MLI.C.READ
|
2022-03-15 19:33:19 +00:00
|
|
|
|
.HS 2C BIT ABS
|
|
|
|
|
BS.MLIClose lda #MLI.C.CLOSE
|
2022-03-24 20:24:26 +00:00
|
|
|
|
.HS 2C BIT ABS
|
|
|
|
|
BS.MLIGetEOF lda #MLI.C.GETEOF
|
|
|
|
|
.HS 2C BIT ABS
|
|
|
|
|
BS.MLISetEOF lda #MLI.C.SETEOF
|
|
|
|
|
.HS 2C BIT ABS
|
|
|
|
|
BS.MLIGetMark lda #MLI.C.GETMARK
|
|
|
|
|
.HS 2C BIT ABS
|
|
|
|
|
BS.MLISetMark lda #MLI.C.SETMARK
|
2022-03-15 19:33:19 +00:00
|
|
|
|
jmp GP.GOSYSTEM
|
|
|
|
|
*--------------------------------------
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.KW.PR lda #$00
|
|
|
|
|
tax
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LB018
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.KW.IN ldx #$02
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$08
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LB018 stx BS.GetCharSep
|
|
|
|
|
|
|
|
|
|
ora GP.ParamINPR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
asl
|
|
|
|
|
tax
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS0.SLOT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LB035
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bmi LB04A
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.OUTVECT0,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.ParamA
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.OUTVECT0+1,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.ParamA+1
|
|
|
|
|
|
|
|
|
|
LB035 jsr LB05C
|
|
|
|
|
bcs LB049
|
|
|
|
|
|
|
|
|
|
ldy BS.GetCharSep
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamA
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta ZP.CSW,y
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamA+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta ZP.CSW+1,y
|
|
|
|
|
LB049 rts
|
|
|
|
|
|
|
|
|
|
LB04A jsr LB05C
|
|
|
|
|
bcs LB05B
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamA+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.OUTVECT0+1,x
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamA
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.OUTVECT0,x
|
|
|
|
|
LB05B rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB05C lda GP.ParamA
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta ZP.PCL
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamA+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta ZP.PCH
|
|
|
|
|
ldy #$00
|
|
|
|
|
cmp #$C0
|
|
|
|
|
bcc LB081
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda $CFFF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sty ZP.A1L
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda (ZP.PCL),y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cmp #$FF
|
|
|
|
|
beq LB087
|
|
|
|
|
|
|
|
|
|
LB077 cmp (ZP.PCL),y
|
|
|
|
|
bne LB087
|
|
|
|
|
|
|
|
|
|
dec ZP.A1L
|
|
|
|
|
bne LB077
|
|
|
|
|
|
|
|
|
|
LB07F clc
|
|
|
|
|
rts
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB081 lda (ZP.PCL),y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cmp #$D8
|
|
|
|
|
beq LB07F
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LB087 lda #BS.E.NODEV
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
2022-04-27 19:24:41 +00:00
|
|
|
|
BS.KW.BYE jsr BS.CloseAll
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr LB36B
|
2022-03-27 12:59:32 +00:00
|
|
|
|
jsr BS.RAMReset
|
2022-03-24 20:24:26 +00:00
|
|
|
|
* lda #$65
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr MLI
|
|
|
|
|
.DA #MLI.C.QUIT
|
|
|
|
|
.DA GP.MLIRW
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-27 12:59:32 +00:00
|
|
|
|
BS.QUIT.IIgs jsr BS.RAMReset
|
|
|
|
|
jsr MLI
|
2022-03-06 22:28:52 +00:00
|
|
|
|
.DA #MLI.C.QUIT
|
2022-03-13 12:52:24 +00:00
|
|
|
|
.DA .1
|
|
|
|
|
|
|
|
|
|
.1 .DA #4
|
2022-03-06 22:28:52 +00:00
|
|
|
|
.DA #$EE
|
|
|
|
|
.DA MLI.PATHBUF
|
|
|
|
|
.DA #0
|
|
|
|
|
.DA 0
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-27 12:59:32 +00:00
|
|
|
|
BS.RAMReset bit GP.CISPARE1
|
|
|
|
|
bpl .8
|
|
|
|
|
|
|
|
|
|
php
|
|
|
|
|
sei
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
sta IO.SETWRITEAUX
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
lda #$FF
|
|
|
|
|
sta AUX.RAMSIG
|
2022-05-25 18:46:02 +00:00
|
|
|
|
dec $FE
|
2022-03-27 12:59:32 +00:00
|
|
|
|
sta AUX.RAMSIG+1 Set $E000-$FEFF as BLOCK FREE
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
sta IO.CLRWRITEAUX
|
|
|
|
|
|
|
|
|
|
plp
|
|
|
|
|
|
|
|
|
|
.8 rts
|
2022-04-03 21:25:00 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-13 12:52:24 +00:00
|
|
|
|
BS.KW.CAT lda #$27
|
|
|
|
|
.HS 2C BIT ABS
|
|
|
|
|
BS.KW.CATALOG lda #$4F
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
sta BS.CATWIDTH
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS0.T+CMDBITS0.FN1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
lsr
|
|
|
|
|
bne LB0BA
|
|
|
|
|
|
|
|
|
|
sta GP.ParamT
|
|
|
|
|
|
|
|
|
|
LB0BA bcs LB0C1
|
|
|
|
|
|
|
|
|
|
jsr BS.GetFileInfo
|
|
|
|
|
bcs LB127
|
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
LB0C1 jsr BS.OpenDir
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB127
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr MON.CROUT
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
|
|
|
|
jsr BS.Filename2LineBuf
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr BS.LINEBUFOUT
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr MON.CROUT
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr BS.LINEBUFCLR80
|
2022-03-27 12:59:32 +00:00
|
|
|
|
|
|
|
|
|
ldy #$10
|
|
|
|
|
ldx #BSX.GetMSGY.X
|
|
|
|
|
jsr BS.ToAUX
|
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr BS.LINEBUFOUT
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr MON.CROUT
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
* lda BS.CAT.FileCnt
|
|
|
|
|
* ora BS.CAT.FileCnt+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LB0E8 jsr LB241
|
|
|
|
|
bcs LB113
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LB0F7
|
|
|
|
|
|
|
|
|
|
cmp DIRENTBUF.TYPE
|
|
|
|
|
bne LB0FD
|
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
LB0F7 ldx #BSX.MkCatLine.X
|
|
|
|
|
jsr BS.ToAUX
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr BS.LINEBUFOUT
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB0FD lda IO.KBD
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cmp #$83
|
|
|
|
|
bne LB10E
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.STATE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LB113
|
|
|
|
|
|
|
|
|
|
bit IO.KSTROBE
|
|
|
|
|
bcs LB113
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB10E lda #$FF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LB0E8
|
|
|
|
|
|
2022-03-15 19:33:19 +00:00
|
|
|
|
LB113 jsr BS.MLIClose
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB127
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr MON.CROUT
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
|
|
|
|
jsr BS.MkCatLineF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB127
|
|
|
|
|
|
|
|
|
|
jsr BS.LINEBUFOUT
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr MON.CROUT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
LB127 rts
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
2022-04-01 19:43:16 +00:00
|
|
|
|
BS.Filename2LineBuf
|
|
|
|
|
jsr BS.LINEBUFCLR80
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx #$01
|
|
|
|
|
ldy DIRENTBUF.STNL
|
2022-03-24 20:24:26 +00:00
|
|
|
|
lda #"/"
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cpy #$F0
|
|
|
|
|
bcc LB13A
|
|
|
|
|
|
|
|
|
|
sta IO.LINEBUF,x
|
|
|
|
|
inx
|
|
|
|
|
|
|
|
|
|
LB13A tya
|
|
|
|
|
and #$0F
|
|
|
|
|
sta IO.LINEBUF
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldy #$05
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB142 lda DIRENTBUF,y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ora #$80
|
|
|
|
|
sta IO.LINEBUF,x
|
|
|
|
|
iny
|
|
|
|
|
inx
|
|
|
|
|
dec IO.LINEBUF
|
|
|
|
|
bne LB142
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$A2
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta IO.LINEBUF
|
|
|
|
|
rts
|
2022-04-01 19:43:16 +00:00
|
|
|
|
*--------------------------------------
|
2022-04-03 21:25:00 +00:00
|
|
|
|
BS.MkCatLineF jsr BS.SetSBUFADRCMDBUF
|
2022-03-13 12:52:24 +00:00
|
|
|
|
|
|
|
|
|
lda MLI.DEVNUM
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIMRKEOFBUF.REFNUM
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #MLI.C.ONLINE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr GP.GOSYSTEM
|
|
|
|
|
bcs LB127
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda BS.CMDBUF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
and #$0F
|
2022-04-01 19:43:16 +00:00
|
|
|
|
inc
|
|
|
|
|
sta BS.CMDBUF.LEN
|
2022-03-24 20:24:26 +00:00
|
|
|
|
lda #"/"
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta BS.CMDBUF
|
|
|
|
|
jsr BS.GetFileInfo
|
|
|
|
|
bcs LB127
|
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
ldx #BSX.MkCatLineF.X
|
|
|
|
|
jsr BS.ToAUX
|
2022-03-27 12:59:32 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
2022-04-01 19:43:16 +00:00
|
|
|
|
BS.OpenDir lda #$01
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx #$0F
|
|
|
|
|
ldy GP.STTYPE
|
|
|
|
|
cpy #$0F
|
|
|
|
|
bne LB1C8
|
|
|
|
|
|
|
|
|
|
stx GP.FITYPE
|
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
LB1C8 jsr BS.OpenTypeXAccessA
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB203
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
BS.ReadDirEnt lda #$59
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$02
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR+1
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$2B
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.COUNT
|
2022-03-13 12:52:24 +00:00
|
|
|
|
stz GP.MLIRW.COUNT+1
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.MLIRead
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB203
|
|
|
|
|
|
2022-04-27 19:24:41 +00:00
|
|
|
|
lda $27D
|
|
|
|
|
sta BS.CAT.EPB
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
lda $27C
|
2022-04-27 19:24:41 +00:00
|
|
|
|
sta BS.CAT.EL
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.COUNT
|
2022-04-27 19:24:41 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$01
|
2022-04-27 19:24:41 +00:00
|
|
|
|
sta BS.CAT.EICB
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
stz GP.SBUFADR+1
|
|
|
|
|
stz GP.SBUFADR+2
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LB203 rts
|
2022-04-01 19:43:16 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
BS.CheckFTypeXAccessA
|
|
|
|
|
pha
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS0.T
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LB20F
|
|
|
|
|
|
|
|
|
|
ldx GP.ParamT
|
|
|
|
|
|
|
|
|
|
LB20F pla
|
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
BS.OpenTypeXAccessA
|
|
|
|
|
cpx GP.FITYPE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LB239
|
|
|
|
|
|
|
|
|
|
and GP.FIACCESS
|
|
|
|
|
beq LB23D
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda BS.BUFPAGE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.OSYSBUF+1
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$0F
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta MLI.LEVEL
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #MLI.C.OPEN
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr GP.GOSYSTEM
|
|
|
|
|
bcs LB238
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.OREFNUM
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.REFNUM
|
|
|
|
|
sta GP.MLICF.REFNUM
|
|
|
|
|
sta GP.MLIMRKEOFBUF.REFNUM
|
|
|
|
|
|
|
|
|
|
LB238 rts
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LB239 lda #BS.E.MISMATCH
|
|
|
|
|
.HS 2C BIT ABS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LB23D lda #BS.E.LOCKED
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
LB241 lda GP.SBUFADR+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
and #$FE
|
|
|
|
|
sta GP.SBUFADR+1
|
2022-04-27 19:24:41 +00:00
|
|
|
|
ldy BS.CAT.EICB
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$00
|
2022-04-03 21:25:00 +00:00
|
|
|
|
cpy BS.CAT.EPB
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcc LB25D
|
|
|
|
|
|
|
|
|
|
tay
|
2022-04-27 19:24:41 +00:00
|
|
|
|
sty BS.CAT.EICB
|
2022-03-06 22:28:52 +00:00
|
|
|
|
inc GP.SBUFADR+1
|
|
|
|
|
|
|
|
|
|
LB25A inc GP.SBUFADR+1
|
|
|
|
|
|
|
|
|
|
LB25D dey
|
|
|
|
|
clc
|
|
|
|
|
bmi LB268
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
adc BS.CAT.EL
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcc LB25D
|
|
|
|
|
|
|
|
|
|
bcs LB25A
|
|
|
|
|
|
|
|
|
|
LB268 adc #$04
|
|
|
|
|
sta GP.SBUFADR
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.MLISetMark
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB28D
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.MLIRead
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB28D
|
|
|
|
|
|
2022-04-27 19:24:41 +00:00
|
|
|
|
inc BS.CAT.EICB
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda DIRENTBUF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
and #$F0
|
|
|
|
|
beq LB241
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-04-27 19:24:41 +00:00
|
|
|
|
* lda BS.CAT.FileCnt
|
|
|
|
|
* bne .1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-04-27 19:24:41 +00:00
|
|
|
|
* dec BS.CAT.FileCnt+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-04-27 19:24:41 +00:00
|
|
|
|
*.1 dec BS.CAT.FileCnt
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LB28D rts
|
2022-04-01 19:43:16 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.KW.EXTERNAL jmp (GP.XTRNADDR)
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
BS.KW.EXEC jsr BS.CheckFilename
|
|
|
|
|
bcs LB2C0
|
|
|
|
|
|
|
|
|
|
bit GP.EXECFILE
|
|
|
|
|
bpl LB2BC
|
|
|
|
|
|
|
|
|
|
sta GP.MLIMRKEOFBUF.REFNUM
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
jsr BS.ZeroSBUFADR
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.MLISetMark
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB2B5
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.MLIMRKEOFBUF.REFNUM
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LB333
|
|
|
|
|
|
|
|
|
|
LB2B5 pha
|
|
|
|
|
jsr LB36B
|
|
|
|
|
pla
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LB2BC lda #BS.E.FBUSTY
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
LB2C0 bit GP.EXECACTV
|
|
|
|
|
bpl LB2CA
|
|
|
|
|
|
|
|
|
|
jsr LB36B
|
|
|
|
|
bcs LB2D3
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB2CA lda GP.FITYPE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cmp #$04
|
|
|
|
|
beq LB2D5
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
lda #BS.E.MISMATCH
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LB2D3 sec
|
|
|
|
|
rts
|
|
|
|
|
|
2022-04-03 11:55:03 +00:00
|
|
|
|
LB2D5 jsr BS.GetSysBuf
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB2D3
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
stz GP.SBUFADR
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda BS.BUFPAGE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.SBUFADR+1
|
|
|
|
|
ldx GP.OPENCNT
|
|
|
|
|
beq LB30E
|
|
|
|
|
|
|
|
|
|
tay
|
|
|
|
|
txa
|
|
|
|
|
asl
|
|
|
|
|
asl
|
2022-04-03 21:25:00 +00:00
|
|
|
|
adc BS.BUFPAGE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
pha
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-04-07 17:19:48 +00:00
|
|
|
|
LB2F2 cmp BS.BUFPAGEs-1,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LB2FB
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
bne LB2F2
|
|
|
|
|
|
|
|
|
|
brk
|
|
|
|
|
|
|
|
|
|
LB2FB tya
|
2022-04-07 17:19:48 +00:00
|
|
|
|
sta BS.BUFPAGEs-1,x
|
2022-03-27 21:05:28 +00:00
|
|
|
|
lda BS.REFNUMs,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIMRKEOFBUF.REFNUM
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #MLI.C.SETBUF
|
|
|
|
|
jsr GP.GOSYSTEM
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcc LB30D
|
|
|
|
|
|
|
|
|
|
brk
|
|
|
|
|
|
|
|
|
|
LB30D pla
|
2022-04-07 17:19:48 +00:00
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
LB30E sta BS.BUFPAGE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.OSYSBUF+1
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
stz MLI.LEVEL
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #MLI.C.OPEN
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr GP.GOSYSTEM
|
|
|
|
|
bcc LB327
|
|
|
|
|
|
|
|
|
|
pha
|
2022-04-07 17:19:48 +00:00
|
|
|
|
jsr BS.FreeSysBuf
|
2022-03-06 22:28:52 +00:00
|
|
|
|
pla
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
LB327 ldx GP.OSYSBUF+1
|
2022-03-27 21:05:28 +00:00
|
|
|
|
stx BS.REFNUMs
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.OREFNUM
|
2022-04-03 21:25:00 +00:00
|
|
|
|
sta BS.REFNUM
|
2022-03-13 12:52:24 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LB333 sta GP.MLIRW.REFNUM
|
|
|
|
|
sta GP.MLIMRKEOFBUF.REFNUM
|
|
|
|
|
sta GP.NEWLREF
|
2022-04-03 11:55:03 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx GP.FIAUXTYPE
|
|
|
|
|
stx GP.ParamL
|
|
|
|
|
ldx GP.FIAUXTYPE+1
|
|
|
|
|
stx GP.ParamL+1
|
2022-04-03 11:55:03 +00:00
|
|
|
|
jsr BS.AddOpenFile
|
2022-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$7F
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.NLINEMASK
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #MLI.C.NEWLINE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr GP.GOSYSTEM
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.F+CMDBITS1.R
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LB364
|
|
|
|
|
|
|
|
|
|
jsr LB592
|
|
|
|
|
bcc LB364
|
|
|
|
|
|
|
|
|
|
jmp LB2B5
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB364 lda #$FF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.EXECACTV
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB36B lda GP.EXECACTV
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bpl .8
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
sta GP.EXECFILE
|
|
|
|
|
ldx #$08
|
2022-03-27 21:05:28 +00:00
|
|
|
|
lda BS.REFNUMs,x
|
2022-04-27 19:24:41 +00:00
|
|
|
|
jsr BS.CloseA
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.8 rts
|
2022-03-24 20:24:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.KW.VERIFY bcs LB3B7
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.R
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bne .8
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
ldy #0
|
|
|
|
|
jsr BS.GetMSGY
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr MON.CROUT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
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
|
|
|
|
* lda #$00
|
2022-05-25 18:46:02 +00:00
|
|
|
|
* beq LB39F BS.KW.FLUSH.1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-13 12:52:24 +00:00
|
|
|
|
BS.KW.FLUSH lda GP.FoundBITS
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.R
|
2022-05-25 18:46:02 +00:00
|
|
|
|
beq .1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
jsr BS.CheckFilename
|
2022-05-25 18:46:02 +00:00
|
|
|
|
bcs .9
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.1 sta GP.MLICF.REFNUM
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #MLI.C.FLUSH
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr GP.GOSYSTEM
|
|
|
|
|
|
2022-05-25 18:46:02 +00:00
|
|
|
|
.9 rts
|
2022-03-24 20:24:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.KW.OPEN php
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr BS.CheckFilename
|
|
|
|
|
bcs LB3BB
|
|
|
|
|
|
|
|
|
|
plp
|
2022-03-24 20:24:26 +00:00
|
|
|
|
lda #BS.E.FBUSTY
|
|
|
|
|
.HS 2C BIT ABS
|
|
|
|
|
LB3B3 lda #BS.E.MISMATCH
|
|
|
|
|
.HS 2C BIT ABS
|
|
|
|
|
LB3B7 lda #BS.E.PATHNFND6
|
2022-04-01 19:43:16 +00:00
|
|
|
|
sec
|
|
|
|
|
LB3B9 rts
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LB3BB plp
|
|
|
|
|
ldx #$00
|
|
|
|
|
ldy #$00
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS+1
|
2022-04-03 11:55:03 +00:00
|
|
|
|
and #CMDBITS1.L
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LB3CD
|
|
|
|
|
|
|
|
|
|
stx GP.ParamL+1
|
|
|
|
|
sty GP.ParamL
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB3CD lda GP.FoundBITS
|
2022-04-03 11:55:03 +00:00
|
|
|
|
and #CMDBITS0.T
|
|
|
|
|
eor #CMDBITS0.T
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LB3DB
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$04
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.ParamT
|
|
|
|
|
|
|
|
|
|
LB3DB bcc LB3FE
|
|
|
|
|
|
|
|
|
|
beq LB3B7
|
|
|
|
|
|
|
|
|
|
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-04-01 19:43:16 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ldx GP.ParamL+1
|
|
|
|
|
ldy GP.ParamL
|
|
|
|
|
stx GP.CRAUXTYPE+1
|
|
|
|
|
stx GP.FIAUXTYPE+1
|
|
|
|
|
sty GP.CRAUXTYPE
|
|
|
|
|
sty GP.FIAUXTYPE
|
|
|
|
|
jsr BS.CreateFileOrDir
|
|
|
|
|
bcs LB3B9
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB3FE lda GP.FITYPE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cmp GP.ParamT
|
|
|
|
|
bne LB3B3
|
|
|
|
|
|
|
|
|
|
cmp #$04
|
|
|
|
|
bne LB41D
|
|
|
|
|
|
|
|
|
|
ldx GP.FIAUXTYPE+1
|
|
|
|
|
ldy GP.FIAUXTYPE
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS+1
|
2022-04-03 11:55:03 +00:00
|
|
|
|
and #CMDBITS1.L
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LB41D
|
|
|
|
|
|
|
|
|
|
stx GP.ParamL+1
|
|
|
|
|
sty GP.ParamL
|
|
|
|
|
|
2022-04-03 11:55:03 +00:00
|
|
|
|
LB41D jsr BS.GetSysBuf
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB3B9
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda BS.BUFPAGE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.OSYSBUF+1
|
2022-04-07 17:19:48 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$07
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta MLI.LEVEL
|
2022-04-07 17:19:48 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #MLI.C.OPEN
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr GP.GOSYSTEM
|
|
|
|
|
bcc LB43B
|
|
|
|
|
|
|
|
|
|
pha
|
2022-04-07 17:19:48 +00:00
|
|
|
|
jsr BS.FreeSysBuf
|
2022-03-06 22:28:52 +00:00
|
|
|
|
pla
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB43B lda GP.FITYPE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cmp #$0F
|
|
|
|
|
beq LB443
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB443 lda #$00
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ror
|
|
|
|
|
sta GP.DIRFLG
|
|
|
|
|
ldx GP.OPENCNT
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda BS.BUFPAGE
|
2022-04-07 17:19:48 +00:00
|
|
|
|
sta BS.BUFPAGEs,x
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.OREFNUM
|
2022-03-27 21:05:28 +00:00
|
|
|
|
sta BS.REFNUMs+1,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
inc GP.OPENCNT
|
2022-04-01 19:43:16 +00:00
|
|
|
|
*--------------------------------------
|
2022-04-03 11:55:03 +00:00
|
|
|
|
BS.AddOpenFile asl
|
2022-03-06 22:28:52 +00:00
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
tax
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda MLI.PATHBUF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ora GP.DIRFLG
|
2022-04-03 21:25:00 +00:00
|
|
|
|
sta BS.OpenFiles,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
and #$7F
|
|
|
|
|
tay
|
|
|
|
|
cmp #$1E
|
|
|
|
|
bcc LB473
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$1D
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LB473 sta ZP.PCL
|
2022-04-03 11:55:03 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamL
|
2022-04-03 21:25:00 +00:00
|
|
|
|
sta BS.OpenFiles+1,x
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamL+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
sta BS.OpenFiles+2,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LB481 inx
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda MLI.PATHBUF,y
|
2022-04-03 21:25:00 +00:00
|
|
|
|
sta BS.OpenFiles+2,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
dey
|
|
|
|
|
dec ZP.PCL
|
|
|
|
|
bne LB481
|
|
|
|
|
|
2022-04-19 18:24:34 +00:00
|
|
|
|
clc
|
2022-03-06 22:28:52 +00:00
|
|
|
|
rts
|
2022-03-27 12:59:32 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
BS.CheckFilename
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS
|
2022-04-03 11:55:03 +00:00
|
|
|
|
and #CMDBITS0.FN1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LB49A
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
lda #BS.E.SYNTAX
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
LB49A ldx GP.OPENCNT
|
|
|
|
|
beq LB4B8
|
|
|
|
|
|
|
|
|
|
stx GP.EXECFILE
|
|
|
|
|
|
|
|
|
|
LB4A2 stx ZP.PCH
|
2022-03-27 21:05:28 +00:00
|
|
|
|
lda BS.REFNUMs,x
|
2022-04-03 11:55:03 +00:00
|
|
|
|
jsr BS.FindOpenFile
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LB4B3
|
|
|
|
|
|
|
|
|
|
ldx ZP.PCH
|
|
|
|
|
|
2022-03-27 21:05:28 +00:00
|
|
|
|
LB4AE lda BS.REFNUMs,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LB4B1 clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
LB4B3 ldx ZP.PCH
|
|
|
|
|
dex
|
|
|
|
|
bne LB4A2
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB4B8 lda GP.EXECACTV
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bpl LB4CE
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda BS.REFNUM
|
2022-04-03 11:55:03 +00:00
|
|
|
|
jsr BS.FindOpenFile
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LB4CE
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$FF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.EXECFILE
|
|
|
|
|
ldx #$08
|
|
|
|
|
bne LB4AE
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LB4CE lda #BS.E.FNOTOPEN
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2022-03-27 21:05:28 +00:00
|
|
|
|
*--------------------------------------
|
2022-04-03 11:55:03 +00:00
|
|
|
|
BS.FindOpenFile asl
|
2022-03-06 22:28:52 +00:00
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
tax
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda BS.OpenFiles,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.DIRFLG
|
|
|
|
|
and #$7F
|
|
|
|
|
cmp MLI.PATHBUF
|
|
|
|
|
bne LB508
|
|
|
|
|
|
|
|
|
|
tay
|
|
|
|
|
cmp #$1E
|
|
|
|
|
bcc LB4EC
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$1D
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LB4EC sta ZP.PCL
|
2022-04-03 11:55:03 +00:00
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda BS.OpenFiles+1,x
|
|
|
|
|
sta BS.RecordSize
|
|
|
|
|
lda BS.OpenFiles+2,x
|
|
|
|
|
sta BS.RecordSize+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LB4FA inx
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda MLI.PATHBUF,y
|
2022-04-03 21:25:00 +00:00
|
|
|
|
cmp BS.OpenFiles+2,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LB508
|
|
|
|
|
|
|
|
|
|
dey
|
|
|
|
|
dec ZP.PCL
|
|
|
|
|
bne LB4FA
|
|
|
|
|
|
|
|
|
|
LB508 rts
|
2022-03-24 20:24:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.KW.CLOSE lda GP.FoundBITS
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS0.FN1
|
2022-04-27 19:24:41 +00:00
|
|
|
|
beq BS.CloseAll
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
jsr BS.CheckFilename
|
|
|
|
|
bcs LB4B1
|
|
|
|
|
|
2022-04-27 19:24:41 +00:00
|
|
|
|
BS.CloseA sta GP.MLICF.REFNUM
|
2022-04-07 17:19:48 +00:00
|
|
|
|
lda BS.BUFPAGEs-1,x
|
2022-04-03 21:25:00 +00:00
|
|
|
|
sta BS.BUFPAGE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bit GP.EXECFILE
|
|
|
|
|
bmi LB53F
|
|
|
|
|
|
|
|
|
|
ldy GP.OPENCNT
|
|
|
|
|
pha
|
2022-04-07 17:19:48 +00:00
|
|
|
|
lda BS.BUFPAGEs-1,y
|
|
|
|
|
sta BS.BUFPAGEs-1,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
pla
|
2022-04-07 17:19:48 +00:00
|
|
|
|
sta BS.BUFPAGEs-1,y
|
2022-03-27 21:05:28 +00:00
|
|
|
|
lda BS.REFNUMs,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
pha
|
2022-03-27 21:05:28 +00:00
|
|
|
|
lda BS.REFNUMs,y
|
|
|
|
|
sta BS.REFNUMs,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
pla
|
2022-03-27 21:05:28 +00:00
|
|
|
|
sta BS.REFNUMs,y
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB53F stz MLI.LEVEL
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
|
|
|
|
jsr BS.MLIClose
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB572
|
|
|
|
|
|
2022-04-07 17:19:48 +00:00
|
|
|
|
jsr BS.FreeSysBuf
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bit GP.EXECFILE
|
|
|
|
|
bpl LB55E
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
stz GP.EXECACTV
|
|
|
|
|
stz GP.EXECFILE
|
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
LB55E dec GP.OPENCNT
|
|
|
|
|
rts
|
2022-03-27 12:59:32 +00:00
|
|
|
|
*--------------------------------------
|
2022-04-27 19:24:41 +00:00
|
|
|
|
BS.CloseAll ldx GP.OPENCNT
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LB573
|
|
|
|
|
|
|
|
|
|
stx GP.EXECFILE
|
2022-03-27 21:05:28 +00:00
|
|
|
|
lda BS.REFNUMs,x
|
2022-04-27 19:24:41 +00:00
|
|
|
|
jsr BS.CloseA
|
|
|
|
|
bcc BS.CloseAll
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LB572 rts
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB573 stz GP.MLICF.REFNUM
|
|
|
|
|
|
|
|
|
|
lda #$07
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta MLI.LEVEL
|
2022-03-15 19:33:19 +00:00
|
|
|
|
jmp BS.MLIClose
|
|
|
|
|
*--------------------------------------
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.KW.POSITION jsr BS.CheckFilename
|
2022-04-27 19:24:41 +00:00
|
|
|
|
bcs LB5F0
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
sta GP.MLIRW.REFNUM
|
|
|
|
|
sta GP.NEWLREF
|
|
|
|
|
bit GP.DIRFLG
|
|
|
|
|
bmi LB5F0
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB592 lda GP.FoundBITS+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.F+CMDBITS1.R
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LB5ED
|
|
|
|
|
|
|
|
|
|
cmp #$03
|
|
|
|
|
beq LB5ED
|
|
|
|
|
|
|
|
|
|
and #$01
|
|
|
|
|
beq LB5AD
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.ParamF
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamR+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.ParamF+1
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB5AD lda #$EF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.COUNT
|
2022-03-13 12:52:24 +00:00
|
|
|
|
stz GP.MLIRW.COUNT+1
|
|
|
|
|
|
2022-04-27 19:24:41 +00:00
|
|
|
|
stz GP.MLIRW.DATAPTR
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$02
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR+1
|
2022-04-27 19:24:41 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$7F
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.NLINEMASK
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #MLI.C.NEWLINE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr GP.GOSYSTEM
|
2022-04-27 19:24:41 +00:00
|
|
|
|
bcs LB5F0
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB5CB lda GP.ParamF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ora GP.ParamF+1
|
|
|
|
|
clc
|
|
|
|
|
beq LB5F0
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.MLIRead
|
2022-04-27 19:24:41 +00:00
|
|
|
|
bcs LB5F0
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc #$00
|
|
|
|
|
sta GP.ParamF
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamF+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc #$00
|
|
|
|
|
sta GP.ParamF+1
|
|
|
|
|
bcs LB5CB
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LB5ED lda #BS.E.INVOPT
|
2022-04-27 19:24:41 +00:00
|
|
|
|
sec
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LB5F0 rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-04-03 21:25:00 +00:00
|
|
|
|
LB5F1 lda BS.RecordSize
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta BS.TMPBUF4
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda BS.RecordSize+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta BS.TMPBUF4+1
|
2022-03-13 12:52:24 +00:00
|
|
|
|
|
|
|
|
|
stz BS.TMPBUF4+2
|
|
|
|
|
stz BS.TMPBUF4+3
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
jsr BS.ZeroSBUFADR
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-06 22:28:52 +00:00
|
|
|
|
LB60E lsr GP.ParamR+1
|
|
|
|
|
ror GP.ParamR
|
|
|
|
|
ldx #$00
|
|
|
|
|
bcc LB62F
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB619 lda BS.TMPBUF4,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
adc GP.SBUFADR,x
|
|
|
|
|
sta GP.SBUFADR,x
|
|
|
|
|
inx
|
|
|
|
|
txa
|
|
|
|
|
eor #$03
|
|
|
|
|
bne LB619
|
|
|
|
|
|
|
|
|
|
bcs LB642
|
|
|
|
|
|
|
|
|
|
ldx BS.TMPBUF4+3
|
|
|
|
|
bne LB642
|
|
|
|
|
|
|
|
|
|
LB62F rol BS.TMPBUF4,x
|
|
|
|
|
inx
|
|
|
|
|
txa
|
|
|
|
|
eor #$04
|
|
|
|
|
bne LB62F
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.ParamR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ora GP.ParamR+1
|
|
|
|
|
bne LB60E
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LB642 lda #BS.E.RANGE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.KW.READ jsr BS.CheckFilename
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB69B
|
|
|
|
|
|
|
|
|
|
sta GP.MLIRW.REFNUM
|
|
|
|
|
sta GP.MLIMRKEOFBUF.REFNUM
|
|
|
|
|
sta GP.NEWLREF
|
|
|
|
|
bit GP.DIRFLG
|
|
|
|
|
bmi LB69C
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
jsr BS.CheckBFR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB69B
|
|
|
|
|
|
|
|
|
|
ldx #$7F
|
|
|
|
|
ldy #$EF
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.L
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LB67C
|
|
|
|
|
|
|
|
|
|
ldy GP.ParamL
|
|
|
|
|
ldx GP.ParamL+1
|
|
|
|
|
bne LB6CB
|
|
|
|
|
|
|
|
|
|
cpy #$EF
|
|
|
|
|
bcs LB6CB
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$22
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta IO.LINEBUF
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$01
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LB67C sta GP.MLIRW.DATAPTR
|
|
|
|
|
sty GP.MLIRW.COUNT
|
|
|
|
|
stx GP.NLINEMASK
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$02
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR+1
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
stz GP.MLIRW.COUNT+1
|
|
|
|
|
|
|
|
|
|
lda #MLI.C.NEWLINE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr GP.GOSYSTEM
|
|
|
|
|
bcs LB69B
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB696 lda #$FF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.IFILACTV
|
|
|
|
|
LB69B rts
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB69C lda #$59
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$02
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR+1
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$01
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.CATFLAG
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.R
|
2022-03-06 22:28:52 +00:00
|
|
|
|
clc
|
|
|
|
|
beq LB696
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
jsr BS.ZeroSBUFADR
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.MLISetMark
|
|
|
|
|
bcc LB696
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LB6CA rts
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LB6CB lda #BS.E.RANGE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
tax
|
|
|
|
|
sec
|
|
|
|
|
rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-04-03 21:25:00 +00:00
|
|
|
|
BS.CheckBFR lda GP.FoundBITS+1
|
|
|
|
|
and #CMDBITS1.B+CMDBITS1.F+CMDBITS1.R
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LB719
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.R
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LB6E5
|
|
|
|
|
|
|
|
|
|
jsr LB5F1
|
|
|
|
|
bcs LB6CB
|
|
|
|
|
|
|
|
|
|
LB6E0 jsr LB712
|
|
|
|
|
bcs LB71A
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
|
|
|
|
LB6E5 lda GP.FoundBITS+1
|
|
|
|
|
and #CMDBITS1.F
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LB6F1
|
|
|
|
|
|
|
|
|
|
jsr LB5AD
|
|
|
|
|
bcs LB71A
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB6F1 lda GP.FoundBITS+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.B
|
2022-03-06 22:28:52 +00:00
|
|
|
|
beq LB719
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.MLIGetMark
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB71A
|
|
|
|
|
|
|
|
|
|
ldx #$00
|
|
|
|
|
ldy #$02
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB703 lda GP.ParamB,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
adc GP.SBUFADR,x
|
|
|
|
|
sta GP.SBUFADR,x
|
|
|
|
|
inx
|
|
|
|
|
dey
|
|
|
|
|
bpl LB703
|
|
|
|
|
|
|
|
|
|
bcs LB6CB
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LB712 jsr BS.MLISetMark
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB71A
|
|
|
|
|
|
|
|
|
|
LB719 clc
|
|
|
|
|
LB71A ldx #$00
|
|
|
|
|
rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.KW.WRITE jsr BS.CheckFilename
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB732
|
|
|
|
|
|
|
|
|
|
sta GP.MLIRW.REFNUM
|
|
|
|
|
sta GP.MLIMRKEOFBUF.REFNUM
|
|
|
|
|
sta GP.NEWLREF
|
|
|
|
|
bit GP.DIRFLG
|
|
|
|
|
bpl LB734
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
lda #BS.E.LOCKED
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LB732 sec
|
|
|
|
|
rts
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB734 stz GP.MLIRW.DATAPTR
|
|
|
|
|
lda #$02
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
jsr BS.CheckBFR
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcc LB757
|
|
|
|
|
|
|
|
|
|
cmp #$02
|
|
|
|
|
bne LB732
|
|
|
|
|
|
|
|
|
|
cpx #$02
|
|
|
|
|
beq LB732
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LB74B jsr BS.MLISetEOF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB732
|
|
|
|
|
|
|
|
|
|
jsr LB6E0
|
|
|
|
|
bcs LB732
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
LB757 lda AS.HIMEM
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda AS.HIMEM+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.MLIRW.DATAPTR+1
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #$FF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sta GP.OFILACTV
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.KW.APPEND php
|
2022-03-06 22:28:52 +00:00
|
|
|
|
jsr BS.CheckFilename
|
|
|
|
|
bcc LB77A
|
|
|
|
|
|
|
|
|
|
plp
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.KW.OPEN
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB788
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.OREFNUM
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LB77B
|
|
|
|
|
|
|
|
|
|
brk
|
|
|
|
|
|
|
|
|
|
LB77A plp
|
|
|
|
|
|
|
|
|
|
LB77B sta GP.MLIRW.REFNUM
|
|
|
|
|
sta GP.MLIMRKEOFBUF.REFNUM
|
|
|
|
|
bit GP.DIRFLG
|
|
|
|
|
bpl LB78A
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
lda #BS.E.LOCKED
|
2022-04-03 21:25:00 +00:00
|
|
|
|
sec
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
LB788 rts
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LB78A ldx GP.ParamL
|
|
|
|
|
ldy GP.ParamL+1
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda GP.FoundBITS+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
and #CMDBITS1.L
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LB79D
|
|
|
|
|
|
|
|
|
|
ldx GP.FIAUXTYPE
|
|
|
|
|
ldy GP.FIAUXTYPE+1
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
LB79D phx
|
2022-03-13 12:52:24 +00:00
|
|
|
|
jsr BS.GetFTableIdx
|
2022-03-06 22:28:52 +00:00
|
|
|
|
pla
|
2022-04-03 21:25:00 +00:00
|
|
|
|
sta BS.OpenFiles+1,x
|
|
|
|
|
sta BS.RecordSize
|
2022-03-06 22:28:52 +00:00
|
|
|
|
tya
|
2022-04-03 21:25:00 +00:00
|
|
|
|
sta BS.OpenFiles+2,x
|
|
|
|
|
sta BS.RecordSize+1
|
2022-03-24 20:24:26 +00:00
|
|
|
|
jsr BS.MLIGetEOF
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB788
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda BS.RecordSize+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LB7C8
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda BS.RecordSize
|
2022-03-06 22:28:52 +00:00
|
|
|
|
cmp #$02
|
|
|
|
|
bcc LB7CD
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
LB7C8 jsr BS.FileLenDivRS
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcs LB788
|
|
|
|
|
|
|
|
|
|
LB7CD jmp LB74B
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-04-03 21:25:00 +00:00
|
|
|
|
BS.FileLenDivRS ldx #$03
|
2022-03-24 20:24:26 +00:00
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
LB7D2 lda GP.SBUFADR-1,x
|
|
|
|
|
sta BS.TMPBUF4-1,x
|
2022-03-06 22:28:52 +00:00
|
|
|
|
dex
|
|
|
|
|
bne LB7D2
|
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
stz BS.TMPBUF4+3
|
|
|
|
|
stz XBC0E
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
ldy #24
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LB7E3 jsr BS.TMPBUF3x2
|
|
|
|
|
rol BS.TMPBUF4+3
|
|
|
|
|
rol XBC0E
|
|
|
|
|
sec
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda BS.TMPBUF4+3
|
2022-04-03 21:25:00 +00:00
|
|
|
|
sbc BS.RecordSize
|
2022-03-06 22:28:52 +00:00
|
|
|
|
tax
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda XBC0E
|
2022-04-03 21:25:00 +00:00
|
|
|
|
sbc BS.RecordSize+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bcc LB805
|
|
|
|
|
|
|
|
|
|
stx BS.TMPBUF4+3
|
|
|
|
|
sta XBC0E
|
|
|
|
|
inc BS.TMPBUF4
|
|
|
|
|
|
|
|
|
|
LB805 dey
|
|
|
|
|
bne LB7E3
|
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda BS.TMPBUF4+3
|
2022-03-06 22:28:52 +00:00
|
|
|
|
ora XBC0E
|
|
|
|
|
clc
|
|
|
|
|
beq LB839
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda BS.RecordSize
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sec
|
|
|
|
|
sbc BS.TMPBUF4+3
|
|
|
|
|
tax
|
2022-04-03 21:25:00 +00:00
|
|
|
|
lda BS.RecordSize+1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
sbc XBC0E
|
|
|
|
|
tay
|
|
|
|
|
txa
|
|
|
|
|
clc
|
|
|
|
|
adc GP.SBUFADR
|
|
|
|
|
sta GP.SBUFADR
|
|
|
|
|
tya
|
|
|
|
|
adc GP.SBUFADR+1
|
|
|
|
|
sta GP.SBUFADR+1
|
2022-03-24 20:24:26 +00:00
|
|
|
|
bcc .1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
inc GP.SBUFADR+2
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
.1 lda #BS.E.RANGE
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
LB839 rts
|
2022-03-15 19:33:19 +00:00
|
|
|
|
*--------------------------------------
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.GetFileInfo ldx #$0A
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #MLI.C.GETFILEINFO
|
2022-03-06 22:28:52 +00:00
|
|
|
|
bne LB858
|
|
|
|
|
|
|
|
|
|
BS.SetFileInfoNoDate
|
2022-03-24 20:24:26 +00:00
|
|
|
|
ldx #7
|
|
|
|
|
|
|
|
|
|
.1 stz GP.FIMDATE,x
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.SetFileInfo ldx #$07
|
2022-03-13 12:52:24 +00:00
|
|
|
|
lda #MLI.C.SETFILEINFO
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
2022-03-24 20:24:26 +00:00
|
|
|
|
LB858 stx GP.SSGINFO
|
|
|
|
|
jmp GP.GOSYSTEM
|
2022-03-06 22:28:52 +00:00
|
|
|
|
|
|
|
|
|
BS.JMP.GP.VSYSO jmp (GP.VSYSO)
|
|
|
|
|
BS.JMP.GP.VSYSI jmp (GP.VSYSI)
|
|
|
|
|
*--------------------------------------
|
2022-03-27 12:59:32 +00:00
|
|
|
|
BS.KW.MTR jsr BS.SetState0
|
|
|
|
|
jsr MON.CLREOL
|
|
|
|
|
jmp MON.ENTERMON
|
|
|
|
|
*--------------------------------------
|
2022-04-01 19:43:16 +00:00
|
|
|
|
BS.KW.MEM jsr MON.CROUT
|
|
|
|
|
|
|
|
|
|
ldx #9
|
|
|
|
|
|
|
|
|
|
.1 lda AS.PGRMSTART,x
|
|
|
|
|
sta $260,x
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
lda AS.HIMEM
|
|
|
|
|
sta $260+10
|
|
|
|
|
lda AS.HIMEM+1
|
|
|
|
|
sta $260+11
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
sta XBC10
|
|
|
|
|
|
|
|
|
|
.2 ldx #BSX.Mem.X
|
|
|
|
|
jsr BS.ToAUX
|
|
|
|
|
|
|
|
|
|
jsr BS.LINEBUFOUT
|
|
|
|
|
inc XBC10
|
|
|
|
|
lda XBC10
|
|
|
|
|
cmp #6
|
|
|
|
|
bne .2
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
jsr MON.CROUT
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.KW.ONLINE jsr MON.CROUT
|
|
|
|
|
|
2022-04-03 21:25:00 +00:00
|
|
|
|
jsr BS.SetSBUFADRCMDBUF
|
|
|
|
|
|
|
|
|
|
lda MLI.DEVNUM
|
|
|
|
|
pha
|
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
lda #$10
|
|
|
|
|
|
|
|
|
|
.1 sta GP.MLIMRKEOFBUF.REFNUM
|
|
|
|
|
|
|
|
|
|
lda #MLI.C.ONLINE
|
|
|
|
|
jsr GP.GOSYSTEM
|
|
|
|
|
bcs .7
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
lda BS.CMDBUF
|
|
|
|
|
and #$0F
|
|
|
|
|
inc
|
|
|
|
|
sta BS.CMDBUF.LEN
|
|
|
|
|
lda #'/'
|
|
|
|
|
sta BS.CMDBUF
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
jsr BS.GetFileInfo
|
|
|
|
|
bcs .7
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
ldx #BSX.Online.X
|
|
|
|
|
jsr BS.ToAUX
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
jsr BS.LINEBUFOUT
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
.7 lda GP.MLIMRKEOFBUF.REFNUM
|
|
|
|
|
eor #$80
|
|
|
|
|
bmi .1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #$10
|
|
|
|
|
bpl .1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-04-01 19:43:16 +00:00
|
|
|
|
jsr MON.CROUT
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
sta MLI.DEVNUM
|
|
|
|
|
|
2022-04-19 18:24:34 +00:00
|
|
|
|
BS.KW.NOMON clc
|
2022-04-01 19:43:16 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-05-25 18:46:02 +00:00
|
|
|
|
* FORMAT VOLNAME,Sx,Dy
|
|
|
|
|
* ,A<HEADCOUNT>,E<TRACKCOUNT>,F<STEPPING>
|
|
|
|
|
* ,L<CATBLOCK>,B<BLOCK>
|
|
|
|
|
*
|
|
|
|
|
* d : 1,2 heads
|
|
|
|
|
* sss : 4,3,2,1 steppings
|
|
|
|
|
* => T : dev type, 0 = BLK, 255 = D2
|
|
|
|
|
* => V : d0000sss
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.KW.FORMAT ldx #BSX.FMT.CheckP.X
|
|
|
|
|
jsr BS.ToAUX
|
|
|
|
|
bcs .99
|
|
|
|
|
|
|
|
|
|
bit GP.ParamT
|
|
|
|
|
bmi .5
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Format BLK dev
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
lda #10
|
|
|
|
|
sta ZP.BUFPTR+1 fake Buffer for status & format
|
|
|
|
|
stz ZP.BUFPTR
|
|
|
|
|
|
|
|
|
|
lda GP.FoundBITS+1
|
|
|
|
|
and #CMDBITS1.B
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
jsr .2 A = cmd = 0 = status
|
|
|
|
|
bcs .19
|
|
|
|
|
|
|
|
|
|
stx GP.ParamB
|
|
|
|
|
sty GP.ParamB+1
|
|
|
|
|
stz GP.ParamB+2
|
|
|
|
|
|
|
|
|
|
.1 lda #3 cmd = 3 = format
|
|
|
|
|
|
|
|
|
|
jsr .2
|
|
|
|
|
|
|
|
|
|
bcc BS.KW.FORMAT.CAT
|
|
|
|
|
|
|
|
|
|
.19 lda #BS.E.IO
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.2 sta ZP.CMD
|
|
|
|
|
|
|
|
|
|
lda BS.WBlock.P.NUM unitnum : DSSS0000
|
|
|
|
|
sta ZP.UNITNUM
|
|
|
|
|
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
tax 000DSSS0
|
|
|
|
|
jmp (MLI.DEVPTRS,x)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Format Disk II
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.5 stz GP.ParamB+1 Total Block Count
|
|
|
|
|
|
|
|
|
|
ldx #3
|
|
|
|
|
|
|
|
|
|
bit GP.ParamV
|
|
|
|
|
bpl .6
|
|
|
|
|
|
|
|
|
|
inx 2 heads....
|
|
|
|
|
|
|
|
|
|
.6 lda GP.ParamE
|
|
|
|
|
|
|
|
|
|
.7 asl
|
|
|
|
|
rol GP.ParamB+1
|
|
|
|
|
dex
|
|
|
|
|
bne .7
|
|
|
|
|
|
|
|
|
|
sta GP.ParamB
|
|
|
|
|
|
|
|
|
|
ldx #BSX.FMT.D2.X
|
|
|
|
|
jsr BS.ToAUX
|
|
|
|
|
bcs .99
|
|
|
|
|
|
|
|
|
|
bra BS.KW.FORMAT.CAT
|
|
|
|
|
|
|
|
|
|
.99 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.KW.FORMAT.CAT
|
|
|
|
|
lda #2 512 bytes buffers
|
|
|
|
|
jsr BS.GETBUFR
|
|
|
|
|
bcs .99
|
|
|
|
|
|
|
|
|
|
sta BS.WBlock.P.PTR+1
|
|
|
|
|
|
|
|
|
|
ldx GP.ParamV
|
|
|
|
|
bne .10
|
|
|
|
|
|
|
|
|
|
lda #0 BB.ProDOS
|
|
|
|
|
ldx #BSX.FMT.GetCatBlk.X
|
|
|
|
|
jsr BS.ToAUX
|
|
|
|
|
|
|
|
|
|
jsr BS.WBlock
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
ldx #BSX.FMT.GetCatBlk.X
|
|
|
|
|
lda #1 BB.SOS
|
|
|
|
|
jsr BS.ToAUX
|
|
|
|
|
|
|
|
|
|
jsr BS.WBlock
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
bra .11
|
|
|
|
|
|
|
|
|
|
.10 ldx #BSX.FMT.GetCatBlk.X
|
|
|
|
|
lda #2 BB.FX 1/2
|
|
|
|
|
jsr BS.ToAUX
|
|
|
|
|
|
|
|
|
|
jsr BS.WBlock
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
ldx #BSX.FMT.GetCatBlk.X
|
|
|
|
|
lda #3 BB.FX 2/2
|
|
|
|
|
jsr BS.ToAUX
|
|
|
|
|
|
|
|
|
|
jsr BS.WBlock
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
.11 ldx #BSX.FMT.GetCatBlk.X
|
|
|
|
|
lda #4 Ist CAT block
|
|
|
|
|
jsr BS.ToAUX
|
|
|
|
|
|
|
|
|
|
jsr BS.WBlock
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
.1 ldx #BSX.FMT.GetCatBlk.X
|
|
|
|
|
lda #5 Next CAT block
|
|
|
|
|
jsr BS.ToAUX
|
|
|
|
|
bcs .2
|
|
|
|
|
|
|
|
|
|
jsr BS.WBlock
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
bra .1
|
|
|
|
|
|
|
|
|
|
.2 ldx #BSX.FMT.GetCatBlk.X
|
|
|
|
|
lda #6 BM blocks
|
|
|
|
|
jsr BS.ToAUX
|
|
|
|
|
bcs .3
|
|
|
|
|
|
|
|
|
|
jsr BS.WBlock
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
bra .2
|
|
|
|
|
|
|
|
|
|
.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
|
|
|
|
|
.9 php
|
|
|
|
|
jsr BS.FREEBUFR
|
|
|
|
|
lda #BS.E.IO
|
|
|
|
|
plp
|
|
|
|
|
.99 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.WBlock jsr MLI
|
|
|
|
|
.DA #MLI.C.WRITEBLOCK
|
|
|
|
|
.DA BS.WBlock.P
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
inc BS.WBlock.P.BLK
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 lda #BS.E.IO
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.WBlock.P .DA #3
|
|
|
|
|
BS.WBlock.P.NUM .BS 1
|
|
|
|
|
BS.WBlock.P.PTR .BS 2
|
|
|
|
|
BS.WBlock.P.BLK .BS 2
|
|
|
|
|
*--------------------------------------
|
2022-03-27 12:59:32 +00:00
|
|
|
|
BS.Expand2.P .DA #1
|
|
|
|
|
.DA MLI.PATHBUF
|
|
|
|
|
*--------------------------------------
|
2022-03-24 20:24:26 +00:00
|
|
|
|
BS.Expand2PATHBUF
|
2022-03-27 12:59:32 +00:00
|
|
|
|
stz MLI.PATHBUF reset target path
|
|
|
|
|
|
|
|
|
|
lda BS.CMDBUF
|
|
|
|
|
cmp #'/' new path is absolute ?
|
2022-03-24 20:24:26 +00:00
|
|
|
|
beq .1
|
|
|
|
|
|
|
|
|
|
jsr MLI no, get current path as a base
|
|
|
|
|
.DA #MLI.C.GETPREFIX
|
|
|
|
|
.DA BS.Expand2.P
|
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
.1 ldx #BSX.Expand.X
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.ToAUX stx .1+1
|
2022-03-24 20:24:26 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
sei
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
tsx
|
|
|
|
|
sta IO.SETALTZP
|
|
|
|
|
stx $100
|
|
|
|
|
ldx $101
|
|
|
|
|
txs
|
2022-03-24 20:24:26 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
bit IO.RRAMWRAMBNK1
|
|
|
|
|
bit IO.RRAMWRAMBNK1
|
2022-03-24 20:24:26 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
cli
|
2022-03-24 20:24:26 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
.1 ldx #$FF SELF MODIFIED
|
|
|
|
|
jsr BSX.JMPX
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
stx .3+1
|
|
|
|
|
php
|
|
|
|
|
plx
|
|
|
|
|
stx .2+1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
sei
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
tsx
|
|
|
|
|
stx $101
|
|
|
|
|
ldx $100
|
|
|
|
|
txs
|
|
|
|
|
sta IO.CLRALTZP
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
bit IO.RROMBNK1
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
cli
|
2022-04-03 21:25:00 +00:00
|
|
|
|
|
2022-03-27 12:59:32 +00:00
|
|
|
|
.2 ldx #$FF SELF MODIFIED
|
|
|
|
|
phx
|
|
|
|
|
.3 ldx #$FF SELF MODIFIED
|
|
|
|
|
plp
|
2022-03-24 20:24:26 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-04-03 11:55:03 +00:00
|
|
|
|
BS.ToAUXSaveX .BS 1
|
2022-03-13 12:52:24 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.GetFTableIdx lda GP.MLIRW.REFNUM
|
|
|
|
|
lsr
|
|
|
|
|
ror
|
|
|
|
|
ror
|
|
|
|
|
ror
|
|
|
|
|
tax
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-04-03 21:25:00 +00:00
|
|
|
|
BS.SetSBUFADRCMDBUF
|
|
|
|
|
ldx #BS.CMDBUF
|
|
|
|
|
ldy /BS.CMDBUF
|
2022-03-13 12:52:24 +00:00
|
|
|
|
BS.SetSBUFADRXY0
|
|
|
|
|
stz GP.SBUFADR+2
|
2022-03-15 19:33:19 +00:00
|
|
|
|
|
2022-03-13 12:52:24 +00:00
|
|
|
|
BS.SetSBUFADRXY stx GP.SBUFADR
|
|
|
|
|
sty GP.SBUFADR+1
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
BS.ZeroSBUFADR lda #0
|
|
|
|
|
sta GP.SBUFADR
|
|
|
|
|
sta GP.SBUFADR+1
|
|
|
|
|
sta GP.SBUFADR+2
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-03-06 22:28:52 +00:00
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/basic.fx/basic.s.c
|
|
|
|
|
LOAD usr/src/basic.fx/basic.s
|
|
|
|
|
ASM
|