2015-03-14 21:47:37 +00:00
|
|
|
|
PR#3
|
2015-06-03 18:30:57 +00:00
|
|
|
|
PREFIX /A2OSX.SRC
|
2015-03-14 21:47:37 +00:00
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.TF /A2OSX.BOOT/BIN/LS
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.INB INC/MACROS.I
|
|
|
|
|
.INB INC/A2OSX.I
|
|
|
|
|
.INB INC/LIBSTR.I
|
|
|
|
|
*--------------------------------------
|
2015-11-22 22:30:06 +00:00
|
|
|
|
ZPPtr1 .EQ ZPBIN
|
|
|
|
|
ZPPtr2 .EQ ZPBIN+2
|
|
|
|
|
ZPPtr3 .EQ ZPBIN+4
|
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
* File Header (16 Bytes)
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA CS.END-CS.START Code Length To Relocate
|
|
|
|
|
.DA DS.END-DS.START Data Segment to Allocate
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
|
|
|
|
*--------------------------------------
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
2015-06-03 18:30:57 +00:00
|
|
|
|
L.LIBSTR .DA LIBSTR
|
2015-03-14 21:47:37 +00:00
|
|
|
|
L.MSG.VOL.HEADER .DA MSG.VOL.HEADER
|
|
|
|
|
L.MSG.DIR.HEADER .DA MSG.DIR.HEADER
|
|
|
|
|
L.MSG.VOL .DA MSG.VOL
|
|
|
|
|
L.MSG.DIR .DA MSG.DIR
|
|
|
|
|
L.MSG.FILE .DA MSG.FILE
|
|
|
|
|
L.MSG.VOL.END .DA MSG.VOL.END
|
|
|
|
|
L.MSG.DIR.END .DA MSG.DIR.END
|
|
|
|
|
L.PRODOS.FT.TXT .DA PRODOS.FT.TXT
|
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
CS.INIT >LDYA L.LIBSTR
|
2015-11-22 22:30:06 +00:00
|
|
|
|
>SYSCALL SYS.LoadLibYA
|
2015-03-14 21:47:37 +00:00
|
|
|
|
sta hLIBSTR
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
ldy #DS.END-DS.START-1
|
|
|
|
|
.11 sta (pData),y
|
|
|
|
|
dey
|
|
|
|
|
bpl .11
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.PS.hARGS
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda (pPs),y
|
2015-08-05 20:38:05 +00:00
|
|
|
|
beq .1 no arg, go get current prefix
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>SYSCALL SYS.GetMemPtrA
|
2015-11-22 22:30:06 +00:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
lda (ZPPtr1)
|
2015-03-14 21:47:37 +00:00
|
|
|
|
beq .1
|
|
|
|
|
ldy #1
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-08-05 20:38:05 +00:00
|
|
|
|
cmp #'/' full path starting with '/'?
|
|
|
|
|
bne .10 no, append to current prefix
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2015-08-05 20:38:05 +00:00
|
|
|
|
ldy #S.PS.hARGS yes, get back arg...
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda (pPs),y
|
2015-08-05 20:38:05 +00:00
|
|
|
|
bra .3
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
|
|
|
|
.10 ldy #S.PS.hARGS
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda (pPs),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
ldy #S.PS.hPREFIX
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda (pPs),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
>SYSCALL SYS.PStrCat
|
2016-01-06 22:08:10 +00:00
|
|
|
|
ldy #hDIRPATH
|
|
|
|
|
sta (pData),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
bra .3
|
|
|
|
|
|
|
|
|
|
.1 ldy #S.PS.hPREFIX
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda (pPs),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2015-08-05 20:38:05 +00:00
|
|
|
|
.3 pha
|
|
|
|
|
>SYSCALL SYS.CheckPrefixA is it a existing directory?
|
|
|
|
|
bcs .4 no, let ListDirInitA extract pattern
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
pha
|
|
|
|
|
>SYSCALL SYS.GetMemPtrA
|
2015-11-22 22:30:06 +00:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
lda (ZPPtr1)
|
2015-08-05 20:38:05 +00:00
|
|
|
|
tay
|
|
|
|
|
lda #'/'
|
2015-11-22 22:30:06 +00:00
|
|
|
|
cmp (ZPPtr1),y
|
2015-08-05 20:38:05 +00:00
|
|
|
|
beq .31
|
|
|
|
|
iny
|
2015-11-22 22:30:06 +00:00
|
|
|
|
sta (ZPPtr1),y
|
2015-08-05 20:38:05 +00:00
|
|
|
|
|
|
|
|
|
.31 iny
|
|
|
|
|
lda #'*'
|
2015-11-22 22:30:06 +00:00
|
|
|
|
sta (ZPPtr1),y
|
2015-08-05 20:38:05 +00:00
|
|
|
|
|
|
|
|
|
.4 pla
|
|
|
|
|
>SYSCALL SYS.ListDirInitA
|
2015-06-03 18:30:57 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
ldy #hS.LISTDIR
|
|
|
|
|
sta (pData),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda (pPs)
|
2015-03-14 21:47:37 +00:00
|
|
|
|
ora #S.PS.F.EVENT Now accept events
|
2015-06-03 18:30:57 +00:00
|
|
|
|
sta (pPs)
|
2015-03-14 21:47:37 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.9 sec
|
2015-03-14 21:47:37 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
CS.RUN ldy #bCANCEL
|
|
|
|
|
lda (pData),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
beq .1
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.1 ldy #bSTOP
|
|
|
|
|
lda (pData),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
beq .2
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.2 ldy #hS.LISTDIR
|
|
|
|
|
lda (pData),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>SYSCALL SYS.ListDirNextA
|
|
|
|
|
bcc .3
|
|
|
|
|
|
|
|
|
|
jmp Push.Footer
|
|
|
|
|
|
|
|
|
|
.3 pha
|
|
|
|
|
>SYSCALL SYS.GetMemPtrA
|
2015-11-22 22:30:06 +00:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
lda (ZPPtr1)
|
2015-03-14 21:47:37 +00:00
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
and #$0F
|
2015-11-22 22:30:06 +00:00
|
|
|
|
sta (ZPPtr1) Adjust Filename len
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
and #$F0
|
|
|
|
|
cmp #$F0 Volume ($F) HEADER ?
|
|
|
|
|
bne .31
|
|
|
|
|
|
|
|
|
|
pla
|
2015-06-03 18:30:57 +00:00
|
|
|
|
ldy #hVOLHEADER
|
|
|
|
|
sta (pData),y
|
2015-11-22 22:30:06 +00:00
|
|
|
|
>PUSHW ZPPtr1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHW L.MSG.VOL.HEADER
|
|
|
|
|
>LIBCALL hLIBSTR,LIBSTR.PRINTF
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.31 cmp #$E0 Dir ($E) HEADER ?
|
|
|
|
|
bne .4
|
|
|
|
|
|
|
|
|
|
pla
|
2015-06-03 18:30:57 +00:00
|
|
|
|
ldy #hDIRHEADER
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2015-11-22 22:30:06 +00:00
|
|
|
|
>PUSHW ZPPtr1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHW L.MSG.DIR.HEADER
|
|
|
|
|
>LIBCALL hLIBSTR,LIBSTR.PRINTF
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.4 cmp #$D0 Directory ?
|
|
|
|
|
bne .5
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2015-03-14 21:47:37 +00:00
|
|
|
|
jsr Push.Dates
|
|
|
|
|
jsr Push.Dir
|
|
|
|
|
>PUSHW L.MSG.DIR
|
|
|
|
|
bra .8
|
|
|
|
|
|
|
|
|
|
.5 cmp #$C0 Volume Name ?
|
|
|
|
|
bne .6
|
|
|
|
|
|
2015-11-22 22:30:06 +00:00
|
|
|
|
>PUSHW ZPPtr1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHW L.MSG.VOL
|
|
|
|
|
bra .8
|
|
|
|
|
|
|
|
|
|
.6 jsr Push.Dates File
|
|
|
|
|
jsr Push.File
|
|
|
|
|
>PUSHW L.MSG.FILE
|
|
|
|
|
|
|
|
|
|
.8 >LIBCALL hLIBSTR,LIBSTR.PRINTF
|
|
|
|
|
|
|
|
|
|
.9 pla
|
|
|
|
|
>SYSCALL SYS.FreeMemA
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Push.Dir ldy #$1E get access mask
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
2015-11-22 22:30:06 +00:00
|
|
|
|
>PUSHW ZPPtr1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Push.File >PUSHBI 0 4th byte of file len=0
|
|
|
|
|
ldy #$17 get file len (3 bytes)
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
ldy #$1E get access mask
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
ldy #$20 get aux type
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
ldy #$10 get filetype
|
|
|
|
|
|
|
|
|
|
lda L.PRODOS.FT.TXT
|
2015-11-22 22:30:06 +00:00
|
|
|
|
sta ZPPtr2
|
2015-03-14 21:47:37 +00:00
|
|
|
|
lda L.PRODOS.FT.TXT+1
|
2015-11-22 22:30:06 +00:00
|
|
|
|
sta ZPPtr2+1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
ldx #0
|
|
|
|
|
|
2015-11-22 22:30:06 +00:00
|
|
|
|
.1 lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
cmp PRODOS.FT.ID,x
|
|
|
|
|
beq .3
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda ZPPtr2
|
2015-03-14 21:47:37 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #4
|
2015-11-22 22:30:06 +00:00
|
|
|
|
sta ZPPtr2
|
2015-03-14 21:47:37 +00:00
|
|
|
|
bcc .2
|
2015-11-22 22:30:06 +00:00
|
|
|
|
inc ZPPtr2+1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.2 inx
|
|
|
|
|
cpx PRODOS.FT.COUNT
|
|
|
|
|
bne .1
|
|
|
|
|
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
tax
|
|
|
|
|
lda HEXDIGIT,x
|
|
|
|
|
sta PRODOS.FT.DFLT+2
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
and #$0F
|
|
|
|
|
tax
|
|
|
|
|
lda HEXDIGIT,x
|
|
|
|
|
sta PRODOS.FT.DFLT+3
|
|
|
|
|
|
2015-11-22 22:30:06 +00:00
|
|
|
|
.3 >PUSHW ZPPtr2
|
|
|
|
|
>PUSHW ZPPtr1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>LIBCALL hLIBSTR,LIBSTR.LCASEP
|
2015-11-22 22:30:06 +00:00
|
|
|
|
>PUSHW ZPPtr1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Push.Dates ldy #$24 get modification time
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
ldy #$22
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
ldy #$1B get creation time
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
ldy #$19
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
Push.Footer ldy #hVOLHEADER
|
|
|
|
|
lda (pData),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
beq .20
|
|
|
|
|
|
|
|
|
|
>SYSCALL SYS.GetMemPtrA
|
2015-11-22 22:30:06 +00:00
|
|
|
|
>STYA ZPPtr1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
ldy #$22 file_count
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
>PUSHW L.MSG.VOL.END
|
|
|
|
|
>LIBCALL hLIBSTR,LIBSTR.PRINTF
|
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.20 ldy #hDIRHEADER
|
|
|
|
|
lda (pData),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
beq .21
|
|
|
|
|
|
|
|
|
|
>SYSCALL SYS.GetMemPtrA
|
2015-11-22 22:30:06 +00:00
|
|
|
|
>STYA ZPPtr1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
ldy #$22 file_count
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
>PUSHW L.MSG.DIR.END
|
|
|
|
|
>LIBCALL hLIBSTR,LIBSTR.PRINTF
|
|
|
|
|
|
|
|
|
|
.21 sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.DOEVENT ldy #S.EVT.hDEV is Event from active IN device?
|
|
|
|
|
lda (pEvent),y
|
|
|
|
|
ldy #S.PS.hINDEV
|
2015-06-03 18:30:57 +00:00
|
|
|
|
cmp (pPs),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
bne .9
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2015-03-14 21:47:37 +00:00
|
|
|
|
lda (pEvent)
|
|
|
|
|
and #S.EVT.F.KEY is it a KEY event?
|
|
|
|
|
beq .9
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2015-03-14 21:47:37 +00:00
|
|
|
|
ldy #S.EVT.DATAHI is it an O or SAPPLE key ?
|
|
|
|
|
lda (pEvent),y
|
|
|
|
|
bne .9
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2015-03-14 21:47:37 +00:00
|
|
|
|
ldy #S.EVT.DATALO
|
|
|
|
|
lda (pEvent),y
|
|
|
|
|
cmp #$03 Ctrl-C
|
|
|
|
|
bne .1
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2015-03-14 21:47:37 +00:00
|
|
|
|
lda #$FF
|
2015-06-03 18:30:57 +00:00
|
|
|
|
ldy #bCANCEL
|
|
|
|
|
sta (pData),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
bra .8
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.1 cmp #$13 Ctrl-S
|
|
|
|
|
bne .8
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
|
|
|
|
ldy #bSTOP
|
|
|
|
|
lda (pData),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
eor #$FF
|
2015-06-03 18:30:57 +00:00
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
.8 clc
|
2015-03-14 21:47:37 +00:00
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
CS.QUIT ldy #hVOLHEADER
|
|
|
|
|
lda (pData),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
beq .1
|
|
|
|
|
|
|
|
|
|
>SYSCALL SYS.FreeMemA
|
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.1 ldy #hDIRHEADER
|
|
|
|
|
lda (pData),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
>SYSCALL SYS.FreeMemA
|
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.2 ldy #hS.LISTDIR
|
|
|
|
|
lda (pData),y
|
|
|
|
|
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>SYSCALL SYS.ListDirCloseA
|
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
ldy #hDIRPATH
|
|
|
|
|
lda (pData),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
beq .3
|
|
|
|
|
>SYSCALL SYS.FreeMemA
|
|
|
|
|
|
|
|
|
|
.3 lda hLIBSTR
|
|
|
|
|
>SYSCALL SYS.UnloadLibA
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.END
|
2015-06-03 18:30:57 +00:00
|
|
|
|
LIBSTR >PSTRING "libstr.o"
|
2015-03-14 21:47:37 +00:00
|
|
|
|
MSG.VOL.HEADER >CSTRING "Volume Listing Of %S\n"
|
|
|
|
|
MSG.DIR.HEADER >CSTRING "Directory Listing Of %S\n"
|
|
|
|
|
MSG.VOL >CSTRING "/%S\n"
|
|
|
|
|
MSG.DIR >CSTRING "/%15S <dir> %a %T %t %T %t\n"
|
|
|
|
|
MSG.FILE >CSTRING "%15S %S $%H %a %8L %T %t %T %t\n"
|
|
|
|
|
MSG.VOL.END >CSTRING "%D Files In Volume.\n"
|
|
|
|
|
MSG.DIR.END >CSTRING "%D Files In Directory.\n"
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PRODOS.FT.COUNT .HS 07
|
|
|
|
|
PRODOS.FT.ID .HS 0406FAFCFDE2FF
|
|
|
|
|
PRODOS.FT.TXT
|
|
|
|
|
T04 >PSTRING "TXT"
|
|
|
|
|
T06 >PSTRING "BIN"
|
|
|
|
|
TFA >PSTRING "S-C"
|
|
|
|
|
TFC >PSTRING "BAS"
|
|
|
|
|
TFD >PSTRING "VAR"
|
|
|
|
|
TE2 >PSTRING "ATK"
|
|
|
|
|
TFF >PSTRING "SYS"
|
|
|
|
|
PRODOS.FT.DFLT >PSTRING "$ "
|
|
|
|
|
HEXDIGIT .AS '0123456789ABCDEF'
|
2015-06-03 18:30:57 +00:00
|
|
|
|
hLIBSTR .BS 1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
2015-03-14 21:47:37 +00:00
|
|
|
|
DS.START
|
|
|
|
|
hDIRPATH .BS 1
|
|
|
|
|
hS.LISTDIR .BS 1
|
|
|
|
|
hVOLHEADER .BS 1
|
|
|
|
|
hDIRHEADER .BS 1
|
|
|
|
|
bSTOP .BS 1
|
|
|
|
|
bCANCEL .BS 1
|
|
|
|
|
DS.END
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.ED
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE BIN/LS.S
|
|
|
|
|
ASM
|