2015-03-14 22:47:37 +01:00
|
|
|
|
NEW
|
2018-11-17 18:17:13 +01:00
|
|
|
|
PREFIX
|
2017-12-22 22:24:30 +01:00
|
|
|
|
AUTO 4,1
|
2015-03-14 22:47:37 +01:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2018-07-20 13:51:08 +02:00
|
|
|
|
.TF BIN/LS
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
2018-07-20 13:51:08 +02:00
|
|
|
|
.INB INC/MACROS.I
|
|
|
|
|
.INB INC/A2OSX.I
|
2018-10-02 17:52:30 +02:00
|
|
|
|
.INB INC/MLI.E.I
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
2017-02-21 18:01:30 +01:00
|
|
|
|
X.COPY.TO.DEST .EQ 0
|
2016-11-08 17:56:05 +01:00
|
|
|
|
X.DELETE.SOURCE .EQ 0
|
|
|
|
|
*--------------------------------------
|
2016-10-19 17:47:53 +02:00
|
|
|
|
MAX.COL .EQ 4
|
|
|
|
|
*--------------------------------------
|
2015-11-22 23:30:06 +01:00
|
|
|
|
ZPPtr1 .EQ ZPBIN
|
|
|
|
|
ZPPtr2 .EQ ZPBIN+2
|
2017-02-24 17:34:02 +01:00
|
|
|
|
ZPFileName .EQ ZPBIN+4
|
|
|
|
|
ZPFileStat .EQ ZPBIN+6
|
2015-11-22 23:30:06 +01:00
|
|
|
|
*--------------------------------------
|
2015-06-03 20:30:57 +02:00
|
|
|
|
* File Header (16 Bytes)
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
2015-06-03 20:30:57 +02:00
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
|
|
|
|
.DA 0
|
2017-09-21 17:29:45 +02:00
|
|
|
|
.DA CS.END-CS.START CS
|
|
|
|
|
.DA DS.END-DS.START DS
|
2018-04-13 16:18:48 +01:00
|
|
|
|
.DA #64 SS
|
2017-09-21 17:29:45 +02:00
|
|
|
|
.DA #8 ZP
|
2015-06-03 20:30:57 +02:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
|
|
|
|
*--------------------------------------
|
2015-03-14 22:47:37 +01:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
2016-10-30 08:58:08 +01:00
|
|
|
|
L.MSG.DEVEXT .DA MSG.DEVEXT
|
2015-03-14 22:47:37 +01:00
|
|
|
|
L.MSG.DIR .DA MSG.DIR
|
2016-10-26 22:41:54 +02:00
|
|
|
|
L.MSG.ENTER .DA MSG.ENTER
|
2016-10-19 17:47:53 +02:00
|
|
|
|
L.MSG.DIREXT .DA MSG.DIREXT
|
2015-03-14 22:47:37 +01:00
|
|
|
|
L.MSG.FILE .DA MSG.FILE
|
2016-10-19 17:47:53 +02:00
|
|
|
|
L.MSG.FILEEXT .DA MSG.FILEEXT
|
2015-03-14 22:47:37 +01:00
|
|
|
|
L.PRODOS.FT.TXT .DA PRODOS.FT.TXT
|
2017-09-22 17:25:21 +02:00
|
|
|
|
L.FMT.DateTime .DA FMT.DateTime
|
2015-03-14 22:47:37 +01:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2017-09-28 17:39:12 +02:00
|
|
|
|
CS.INIT
|
|
|
|
|
.1 >INC.G ArgCount
|
2018-10-16 17:48:03 +02:00
|
|
|
|
>SYSCALL ArgV
|
2017-09-28 17:39:12 +02:00
|
|
|
|
bcs .6
|
2016-10-18 17:56:06 +02:00
|
|
|
|
>STYA ZPPtr1
|
2017-09-28 17:39:12 +02:00
|
|
|
|
|
2016-10-18 17:56:06 +02:00
|
|
|
|
lda (ZPPtr1)
|
|
|
|
|
cmp #'-'
|
2016-10-20 18:04:35 +02:00
|
|
|
|
bne .4
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2017-09-22 17:25:21 +02:00
|
|
|
|
ldy #1
|
2016-10-18 17:56:06 +02:00
|
|
|
|
lda (ZPPtr1),y
|
2016-10-19 17:47:53 +02:00
|
|
|
|
ldx OptionList
|
|
|
|
|
|
|
|
|
|
.2 cmp OptionList,x
|
|
|
|
|
beq .3
|
|
|
|
|
dex
|
|
|
|
|
bne .2
|
2016-10-20 18:04:35 +02:00
|
|
|
|
|
2018-10-21 22:54:07 +02:00
|
|
|
|
lda #E.SYN
|
2016-10-20 18:04:35 +02:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
|
|
|
|
.3 ldy OptionVars-1,x
|
2016-10-18 17:56:06 +02:00
|
|
|
|
lda #$80
|
|
|
|
|
sta (pData),y
|
2017-09-28 17:39:12 +02:00
|
|
|
|
bra .1
|
2016-10-18 17:56:06 +02:00
|
|
|
|
|
2016-10-20 18:04:35 +02:00
|
|
|
|
.4 >LDYA ZPPtr1
|
|
|
|
|
jsr InitSrcDirYA
|
|
|
|
|
bcs .9
|
2016-10-18 17:56:06 +02:00
|
|
|
|
|
2017-09-28 17:39:12 +02:00
|
|
|
|
bra .1 scan for any other args
|
2016-10-20 18:04:35 +02:00
|
|
|
|
|
2017-09-22 17:25:21 +02:00
|
|
|
|
.6 >LDA.G index do we have a Source dir ?
|
2016-10-20 18:04:35 +02:00
|
|
|
|
bne .8
|
2016-10-18 17:56:06 +02:00
|
|
|
|
|
2017-09-22 17:25:21 +02:00
|
|
|
|
.7 ldy #S.PS.hPREFIX
|
2016-08-28 22:48:01 +02:00
|
|
|
|
lda (pPs),y
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL GetMemPtr
|
2016-10-20 18:04:35 +02:00
|
|
|
|
jsr InitSrcDirYA
|
|
|
|
|
bcs .9
|
2016-10-18 17:56:06 +02:00
|
|
|
|
|
2018-11-17 18:17:13 +01:00
|
|
|
|
.8 clc
|
2016-10-20 18:04:35 +02:00
|
|
|
|
.9 rts
|
2016-08-17 08:25:58 +02:00
|
|
|
|
*--------------------------------------
|
2017-09-18 08:30:07 +02:00
|
|
|
|
CS.RUN >SYSCALL GetChar
|
2017-01-15 21:51:20 +01:00
|
|
|
|
bcs .10 no char
|
|
|
|
|
|
|
|
|
|
cmp #$03 Ctrl-C
|
|
|
|
|
beq .92 Abort....
|
|
|
|
|
|
|
|
|
|
cmp #$13 Ctrl-S
|
|
|
|
|
bne .10
|
|
|
|
|
|
2017-09-22 17:25:21 +02:00
|
|
|
|
>LDA.G bPause
|
2017-01-15 21:51:20 +01:00
|
|
|
|
eor #$ff
|
|
|
|
|
sta (pData),y
|
2017-04-03 17:35:03 +02:00
|
|
|
|
bne .80
|
2015-03-14 22:47:37 +01:00
|
|
|
|
|
2017-09-22 17:25:21 +02:00
|
|
|
|
.10 >LDA.G bPause
|
2017-04-03 17:35:03 +02:00
|
|
|
|
bne .80 Pause...
|
2017-01-15 21:51:20 +01:00
|
|
|
|
|
2017-03-07 15:05:23 +01:00
|
|
|
|
jsr GetEntry
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bcs .9
|
2015-03-14 22:47:37 +01:00
|
|
|
|
|
2017-09-22 17:25:21 +02:00
|
|
|
|
>LDA.G hFilter
|
2016-10-13 18:00:27 +02:00
|
|
|
|
beq .4 No filter....
|
2018-11-17 18:17:13 +01:00
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
ldy #S.STAT.FSID
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
bne .11 not prodos...
|
2016-10-13 18:00:27 +02:00
|
|
|
|
|
2018-11-17 18:17:13 +01:00
|
|
|
|
pla
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL GetMemPtr
|
2018-11-17 18:17:13 +01:00
|
|
|
|
>SYSCALL strupr
|
|
|
|
|
bra .12
|
|
|
|
|
|
|
|
|
|
.11 pla
|
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
|
|
|
|
|
.12 >PUSHYA
|
2018-09-05 13:31:49 +02:00
|
|
|
|
>LDYA ZPFileName
|
2017-09-18 08:30:07 +02:00
|
|
|
|
>SYSCALL StrMatch
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bcs .8 no match, skip....
|
2016-10-13 18:00:27 +02:00
|
|
|
|
|
2016-12-09 17:36:24 +01:00
|
|
|
|
.4 ldy #S.STAT.P.DRIVE
|
2017-02-24 17:34:02 +01:00
|
|
|
|
lda (ZPFileStat),y ProDOS Device ?
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bne .5
|
2016-10-13 18:00:27 +02:00
|
|
|
|
|
2016-12-09 17:36:24 +01:00
|
|
|
|
ldy #S.STAT.P.TYPE
|
2017-02-24 17:34:02 +01:00
|
|
|
|
lda (ZPFileStat),y
|
2016-09-23 17:19:22 +02:00
|
|
|
|
cmp #$0F Directory ?
|
2016-10-13 18:00:27 +02:00
|
|
|
|
bne .6
|
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
jmp CS.RUN.DIR
|
|
|
|
|
.5 jmp CS.RUN.DEV
|
|
|
|
|
.6 jmp CS.RUN.FILE
|
2016-10-13 18:00:27 +02:00
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
.9 ldy #bLong
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bmi .91
|
|
|
|
|
|
2016-10-28 11:37:57 +02:00
|
|
|
|
jsr CS.RUN.NewLine
|
|
|
|
|
bcs .99
|
2016-10-26 22:41:54 +02:00
|
|
|
|
|
|
|
|
|
.91 jsr LeaveSubDir
|
2016-11-01 22:37:12 +01:00
|
|
|
|
bcs .92
|
2016-10-30 19:19:43 +01:00
|
|
|
|
|
|
|
|
|
jsr BasePath..
|
|
|
|
|
|
2017-03-31 17:24:42 +02:00
|
|
|
|
.8 jsr GetNextEntry
|
2017-04-03 17:35:03 +02:00
|
|
|
|
.80 clc
|
2016-10-26 22:41:54 +02:00
|
|
|
|
rts
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2016-11-01 22:37:12 +01:00
|
|
|
|
.92 lda #0
|
2016-10-26 22:41:54 +02:00
|
|
|
|
sec
|
2016-11-01 22:37:12 +01:00
|
|
|
|
.99 rts
|
2016-10-13 18:00:27 +02:00
|
|
|
|
*--------------------------------------
|
2018-08-22 17:23:27 +02:00
|
|
|
|
CS.RUN.DEV >LDA.G bLong
|
2016-10-30 08:58:08 +01:00
|
|
|
|
bpl CS.RUN.DIR
|
|
|
|
|
|
2016-12-09 17:36:24 +01:00
|
|
|
|
ldy #S.STAT.P.DEVBLOCKS+1
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>PUSHB (ZPFileStat),y
|
2016-10-13 18:00:27 +02:00
|
|
|
|
dey
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>PUSHB (ZPFileStat),y
|
2016-10-13 18:00:27 +02:00
|
|
|
|
ldy #S.STAT.BLOCKS+1
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>PUSHB (ZPFileStat),y
|
2016-10-13 18:00:27 +02:00
|
|
|
|
dey
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>PUSHB (ZPFileStat),y
|
2016-10-13 08:21:16 +02:00
|
|
|
|
|
2016-12-09 17:36:24 +01:00
|
|
|
|
ldy #S.STAT.P.DRIVE
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>PUSHB (ZPFileStat),y
|
2016-10-13 18:00:27 +02:00
|
|
|
|
dey SLOT
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>PUSHB (ZPFileStat),y
|
2016-10-13 18:00:27 +02:00
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>PUSHW ZPFileName
|
2018-08-22 17:23:27 +02:00
|
|
|
|
>PUSHBI 8
|
2016-10-30 08:58:08 +01:00
|
|
|
|
>LDYA L.MSG.DEVEXT
|
2018-06-21 17:12:10 +02:00
|
|
|
|
>SYSCALL printf
|
2016-10-30 08:58:08 +01:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
ldy #bRecurse
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bpl .8
|
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>LDYA ZPFileName
|
2016-10-30 23:23:18 +01:00
|
|
|
|
jsr EnterSubDirYA
|
|
|
|
|
bcs .9
|
|
|
|
|
jsr CS.RUN.ENTER.MSG
|
2017-03-07 15:05:23 +01:00
|
|
|
|
rts
|
2016-10-30 08:58:08 +01:00
|
|
|
|
|
2017-03-07 15:05:23 +01:00
|
|
|
|
.8 jsr GetNextEntry
|
|
|
|
|
clc
|
2016-10-30 08:58:08 +01:00
|
|
|
|
.9 rts
|
2016-10-13 18:00:27 +02:00
|
|
|
|
*--------------------------------------
|
2017-09-21 17:29:45 +02:00
|
|
|
|
CS.RUN.DIR >LDA.G bAllmostAll
|
2017-09-22 17:25:21 +02:00
|
|
|
|
bmi .10
|
2016-10-28 11:37:57 +02:00
|
|
|
|
|
2017-09-21 17:29:45 +02:00
|
|
|
|
lda (ZPFileName)
|
2016-10-28 11:37:57 +02:00
|
|
|
|
cmp #'.'
|
|
|
|
|
beq .5
|
|
|
|
|
|
2017-09-21 17:29:45 +02:00
|
|
|
|
.10 >LDA.G bLong
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bmi .4
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>PUSHW ZPFileName
|
2018-08-22 17:23:27 +02:00
|
|
|
|
>PUSHBI 2
|
2016-10-19 17:47:53 +02:00
|
|
|
|
>LDYA L.MSG.DIR
|
2018-06-21 17:12:10 +02:00
|
|
|
|
>SYSCALL printf
|
2018-08-22 17:23:27 +02:00
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bcs .9
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2017-09-21 17:29:45 +02:00
|
|
|
|
ldy #0
|
|
|
|
|
|
2017-09-22 17:25:21 +02:00
|
|
|
|
.1 iny
|
|
|
|
|
lda (ZPFileName),y
|
|
|
|
|
bne .1
|
2016-10-25 08:58:15 +02:00
|
|
|
|
|
2017-09-22 17:25:21 +02:00
|
|
|
|
.11 iny
|
|
|
|
|
cpy #19
|
|
|
|
|
bcs .2
|
|
|
|
|
lda #' '
|
2017-09-21 17:29:45 +02:00
|
|
|
|
phy
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL PutChar
|
2017-09-21 17:29:45 +02:00
|
|
|
|
ply
|
2017-09-22 17:25:21 +02:00
|
|
|
|
bcc .11
|
|
|
|
|
rts
|
2016-10-25 08:58:15 +02:00
|
|
|
|
|
2016-10-28 11:37:57 +02:00
|
|
|
|
.2 jsr CS.RUN.UpdateColCnt
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bcc .5
|
|
|
|
|
rts
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2017-09-22 17:25:21 +02:00
|
|
|
|
.4 jsr CS.RUN.PUSHDATES
|
2016-10-14 17:39:49 +02:00
|
|
|
|
|
2017-10-10 17:40:23 +02:00
|
|
|
|
jsr Mod2CSTR
|
|
|
|
|
>PUSHEA.G MOD File Mod
|
2016-10-18 17:56:06 +02:00
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>PUSHW ZPFileName
|
2018-08-22 17:23:27 +02:00
|
|
|
|
>PUSHBI 8
|
2016-10-19 17:47:53 +02:00
|
|
|
|
>LDYA L.MSG.DIREXT
|
2018-06-21 17:12:10 +02:00
|
|
|
|
>SYSCALL printf
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bcs .9
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
.5 ldy #bRecurse
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bpl .8
|
|
|
|
|
|
2017-09-21 17:29:45 +02:00
|
|
|
|
lda (ZPFileName)
|
2016-10-26 22:41:54 +02:00
|
|
|
|
cmp #'.'
|
|
|
|
|
beq .8
|
|
|
|
|
|
2016-10-28 11:37:57 +02:00
|
|
|
|
jsr CS.RUN.NewLine
|
|
|
|
|
bcs .9
|
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>LDYA ZPFileName
|
2016-10-30 23:23:18 +01:00
|
|
|
|
jsr EnterSubDirYA
|
|
|
|
|
bcs .9
|
|
|
|
|
jsr CS.RUN.ENTER.MSG
|
2017-03-07 15:05:23 +01:00
|
|
|
|
rts
|
2016-10-26 22:41:54 +02:00
|
|
|
|
|
2017-03-07 15:05:23 +01:00
|
|
|
|
.8 jsr GetNextEntry
|
|
|
|
|
clc
|
2016-10-26 22:41:54 +02:00
|
|
|
|
.9 rts
|
2016-10-13 18:00:27 +02:00
|
|
|
|
*--------------------------------------
|
2016-10-19 17:47:53 +02:00
|
|
|
|
CS.RUN.FILE ldy #bLong
|
|
|
|
|
lda (pData),y
|
2018-08-24 12:20:23 +02:00
|
|
|
|
bmi .1
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>PUSHW ZPFileName
|
2018-08-22 17:23:27 +02:00
|
|
|
|
>PUSHBI 2
|
2016-10-19 17:47:53 +02:00
|
|
|
|
>LDYA L.MSG.FILE
|
2018-06-21 17:12:10 +02:00
|
|
|
|
>SYSCALL printf
|
2016-10-28 11:37:57 +02:00
|
|
|
|
bcs .9
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2017-03-07 15:05:23 +01:00
|
|
|
|
jsr CS.RUN.UpdateColCnt
|
|
|
|
|
jsr GetNextEntry
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2018-08-24 12:20:23 +02:00
|
|
|
|
.1 jsr CS.RUN.PUSHDATES
|
2016-10-13 18:00:27 +02:00
|
|
|
|
|
2018-05-26 08:59:25 +02:00
|
|
|
|
ldy #S.STAT.SIZE+3
|
2018-08-24 12:20:23 +02:00
|
|
|
|
ldx #4
|
|
|
|
|
|
|
|
|
|
.2 lda (ZPFileStat),y
|
2018-05-26 08:59:25 +02:00
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
2018-08-24 12:20:23 +02:00
|
|
|
|
dex
|
|
|
|
|
bne .2
|
2016-10-13 18:00:27 +02:00
|
|
|
|
|
2017-10-10 17:40:23 +02:00
|
|
|
|
jsr Mod2CSTR
|
2018-05-26 08:59:25 +02:00
|
|
|
|
>PUSHEA.G MOD File Mod
|
2016-10-18 17:56:06 +02:00
|
|
|
|
|
2016-12-09 17:36:24 +01:00
|
|
|
|
ldy #S.STAT.P.AUXTYPE+1
|
2018-08-24 12:20:23 +02:00
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
lda (ZPFileStat),y
|
2016-10-13 08:21:16 +02:00
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
2017-02-24 17:34:02 +01:00
|
|
|
|
lda (ZPFileStat),y
|
2018-08-24 12:20:23 +02:00
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
dey Type
|
2017-02-24 17:34:02 +01:00
|
|
|
|
lda (ZPFileStat),y
|
2016-09-26 08:18:51 +02:00
|
|
|
|
jsr FileType2PSTR
|
2018-08-24 12:20:23 +02:00
|
|
|
|
>PUSHYA
|
2016-09-26 08:18:51 +02:00
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>PUSHW ZPFileName
|
2018-08-22 17:23:27 +02:00
|
|
|
|
>PUSHBI 16
|
2016-10-19 17:47:53 +02:00
|
|
|
|
>LDYA L.MSG.FILEEXT
|
2018-06-21 17:12:10 +02:00
|
|
|
|
>SYSCALL printf
|
2017-03-07 15:05:23 +01:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
jsr GetNextEntry
|
|
|
|
|
clc
|
2016-10-28 11:37:57 +02:00
|
|
|
|
.9 rts
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
2017-09-22 17:25:21 +02:00
|
|
|
|
CS.RUN.PUSHDATES
|
|
|
|
|
ldx #$ff
|
|
|
|
|
ldy #TIME.Mod-1 Set NODATE as default
|
2016-11-14 15:59:09 +01:00
|
|
|
|
|
2017-09-22 17:25:21 +02:00
|
|
|
|
.10 inx
|
|
|
|
|
iny
|
|
|
|
|
lda MSG.NODATE,x
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bne .10
|
|
|
|
|
|
|
|
|
|
ldx #$ff
|
|
|
|
|
ldy #TIME.Create-1 Set NODATE as default
|
|
|
|
|
|
|
|
|
|
.11 inx
|
|
|
|
|
iny
|
|
|
|
|
lda MSG.NODATE,x
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bne .11
|
2016-11-14 15:59:09 +01:00
|
|
|
|
|
|
|
|
|
ldy #S.STAT.MTIME+S.TIME.MONTH
|
2017-02-24 17:34:02 +01:00
|
|
|
|
lda (ZPFileStat),y
|
2016-11-14 15:59:09 +01:00
|
|
|
|
beq .1 Month=0.....invalid date/time
|
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
lda ZPFileStat
|
2016-10-14 17:39:49 +02:00
|
|
|
|
clc
|
|
|
|
|
adc #S.STAT.MTIME
|
|
|
|
|
tay
|
2017-02-24 17:34:02 +01:00
|
|
|
|
lda ZPFileStat+1
|
2016-10-14 17:39:49 +02:00
|
|
|
|
adc #0
|
|
|
|
|
>PUSHYA
|
2018-10-11 17:23:06 +02:00
|
|
|
|
>PUSHW L.FMT.DateTime
|
|
|
|
|
>LEA.G TIME.Mod
|
2017-08-22 08:37:03 +02:00
|
|
|
|
>SYSCALL StrFTime
|
2016-10-14 17:39:49 +02:00
|
|
|
|
|
2016-11-14 15:59:09 +01:00
|
|
|
|
.1 ldy #S.STAT.CTIME+S.TIME.MONTH
|
2017-02-24 17:34:02 +01:00
|
|
|
|
lda (ZPFileStat),y
|
2016-11-14 15:59:09 +01:00
|
|
|
|
beq .2 Month=0.....invalid date/time
|
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
lda ZPFileStat
|
2016-10-14 17:39:49 +02:00
|
|
|
|
clc
|
|
|
|
|
adc #S.STAT.CTIME
|
|
|
|
|
tay
|
2017-02-24 17:34:02 +01:00
|
|
|
|
lda ZPFileStat+1
|
2016-10-14 17:39:49 +02:00
|
|
|
|
adc #0
|
|
|
|
|
>PUSHYA
|
2018-10-11 17:23:06 +02:00
|
|
|
|
>PUSHW L.FMT.DateTime
|
|
|
|
|
>LEA.G TIME.Create
|
2017-08-22 08:37:03 +02:00
|
|
|
|
>SYSCALL StrFTime
|
2016-10-14 17:39:49 +02:00
|
|
|
|
|
2017-09-25 17:50:33 +02:00
|
|
|
|
.2 >PUSHEA.G TIME.Mod
|
|
|
|
|
>PUSHEA.G TIME.Create
|
2016-10-14 17:39:49 +02:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-10-28 11:37:57 +02:00
|
|
|
|
CS.RUN.UpdateColCnt
|
|
|
|
|
ldy #ColCount
|
|
|
|
|
lda (pData),y
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
cmp #MAX.COL
|
|
|
|
|
bne CS.RUN.NewLine.8
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bra CS.RUN.NewLine.1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.NewLine ldy #ColCount
|
|
|
|
|
lda (pData),y
|
|
|
|
|
beq CS.RUN.NewLine.8
|
|
|
|
|
CS.RUN.NewLine.1
|
|
|
|
|
lda #13
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL PutChar
|
2017-02-28 17:58:36 +01:00
|
|
|
|
lda #10
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL PutChar
|
2016-10-28 11:37:57 +02:00
|
|
|
|
rts
|
|
|
|
|
CS.RUN.NewLine.8
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-10-30 23:23:18 +01:00
|
|
|
|
CS.RUN.ENTER.MSG
|
2016-11-08 17:56:05 +01:00
|
|
|
|
ldy #hSrcBasePath
|
2016-10-30 23:23:18 +01:00
|
|
|
|
lda (pData),y
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL GetMemPtr
|
2016-10-30 23:23:18 +01:00
|
|
|
|
>PUSHYA
|
2018-08-22 17:23:27 +02:00
|
|
|
|
>PUSHBI 2
|
2016-10-30 23:23:18 +01:00
|
|
|
|
>LDYA L.MSG.ENTER
|
2018-06-21 17:12:10 +02:00
|
|
|
|
>SYSCALL printf
|
2016-10-30 23:23:18 +01:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-01-15 21:51:20 +01:00
|
|
|
|
CS.DOEVENT sec
|
2015-03-14 22:47:37 +01:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-10-20 18:04:35 +02:00
|
|
|
|
CS.QUIT jsr LeaveSubDir
|
|
|
|
|
bcc CS.QUIT
|
2015-03-14 22:47:37 +01:00
|
|
|
|
|
2018-08-11 12:57:57 +02:00
|
|
|
|
>LDA.G hFilter
|
2015-03-14 22:47:37 +01:00
|
|
|
|
beq .3
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL FreeMem
|
2018-08-11 12:57:57 +02:00
|
|
|
|
|
2016-10-13 18:00:27 +02:00
|
|
|
|
.3 clc
|
2015-03-14 22:47:37 +01:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-09-26 08:18:51 +02:00
|
|
|
|
FileType2PSTR ldy #0
|
|
|
|
|
|
|
|
|
|
.1 cmp PRODOS.FT.HEX,y
|
2018-08-24 12:20:23 +02:00
|
|
|
|
beq .8
|
2016-09-26 08:18:51 +02:00
|
|
|
|
|
2016-10-18 17:56:06 +02:00
|
|
|
|
iny
|
|
|
|
|
cpy #PRODOS.FT.TXT-PRODOS.FT.HEX
|
2016-09-26 08:18:51 +02:00
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
pha
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
2018-08-24 12:20:23 +02:00
|
|
|
|
ora #$30
|
|
|
|
|
cmp #$3A
|
|
|
|
|
bcc .2
|
|
|
|
|
adc #6
|
|
|
|
|
.2 sta PRODOS.FT.DFLT+2
|
2016-09-26 08:18:51 +02:00
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
and #$0F
|
2018-08-24 12:20:23 +02:00
|
|
|
|
ora #$30
|
|
|
|
|
cmp #$3A
|
|
|
|
|
bcc .3
|
|
|
|
|
adc #6
|
|
|
|
|
.3 sta PRODOS.FT.DFLT+3
|
2016-09-26 08:18:51 +02:00
|
|
|
|
|
2018-08-24 12:20:23 +02:00
|
|
|
|
.8 tya
|
2016-09-26 08:18:51 +02:00
|
|
|
|
asl
|
|
|
|
|
asl CC
|
|
|
|
|
adc L.PRODOS.FT.TXT
|
|
|
|
|
tay
|
|
|
|
|
lda L.PRODOS.FT.TXT+1
|
|
|
|
|
adc #0
|
|
|
|
|
rts
|
2016-10-20 18:04:35 +02:00
|
|
|
|
*--------------------------------------
|
2017-10-10 17:40:23 +02:00
|
|
|
|
Mod2CSTR ldy #S.STAT.MODE+1
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
tax
|
|
|
|
|
lda TYPES,x
|
|
|
|
|
>STA.G MOD
|
|
|
|
|
|
|
|
|
|
ldx #0
|
|
|
|
|
|
|
|
|
|
ldy #S.STAT.MODE
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
|
|
|
|
|
ldy #MOD+1
|
|
|
|
|
|
|
|
|
|
.1 lsr
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
lda #'-'
|
|
|
|
|
bcc .2
|
|
|
|
|
lda ACCESS,x
|
|
|
|
|
|
|
|
|
|
.2 sta (pData),y
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
|
cpx #8
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.3 ldy #S.STAT.MODE+1
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
lsr
|
|
|
|
|
lda #'-'
|
|
|
|
|
|
|
|
|
|
bcc .4
|
|
|
|
|
lda ACCESS,x
|
|
|
|
|
|
|
|
|
|
.4 >STA.G MOD+9
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-11-17 18:17:13 +01:00
|
|
|
|
.INB USR/SRC/BIN/X.FILEENUM.S
|
2016-09-26 08:18:51 +02:00
|
|
|
|
*--------------------------------------
|
2015-03-14 22:47:37 +01:00
|
|
|
|
CS.END
|
2016-10-18 17:56:06 +02:00
|
|
|
|
*--------------------------------------
|
2017-06-25 14:04:33 +02:00
|
|
|
|
OptionList >PSTR "ALRalr"
|
|
|
|
|
OptionVars .DA #bAllmostAll,#bLong,#bRecurse,#bAllmostAll,#bLong,#bRecurse
|
2016-10-18 17:56:06 +02:00
|
|
|
|
*--------------------------------------
|
2018-04-18 16:18:32 +01:00
|
|
|
|
MSG.DEVEXT .AZ "/%15s S%dD%d Blocks Used:%5D Total:%5D\r\n"
|
2018-04-11 16:35:51 +01:00
|
|
|
|
MSG.DIR .AZ "\e[32m%s/\e[0m"
|
|
|
|
|
MSG.ENTER .AZ "Directory:%s\r\n"
|
|
|
|
|
MSG.DIREXT .AZ "\e[32m%16s\e[0m <dir> %s %s %s\r\n"
|
|
|
|
|
MSG.FILE .AZ "%19s"
|
|
|
|
|
MSG.FILEEXT .AZ "%15s %S $%H %s %10u %s %s\r\n"
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
2017-12-08 17:10:39 +01:00
|
|
|
|
PRODOS.FT.HEX .HS 0406FAFCFDE2CBCCFF
|
2016-10-24 17:54:43 +02:00
|
|
|
|
PRODOS.FT.TXT >PSTR "TXT"
|
|
|
|
|
>PSTR "BIN"
|
2017-07-05 16:45:19 +02:00
|
|
|
|
>PSTR "ASM"
|
2016-10-24 17:54:43 +02:00
|
|
|
|
>PSTR "BAS"
|
|
|
|
|
>PSTR "VAR"
|
|
|
|
|
>PSTR "ATK"
|
2017-11-24 17:13:32 +01:00
|
|
|
|
>PSTR "PIX"
|
2017-12-08 17:10:39 +01:00
|
|
|
|
>PSTR "FON"
|
2016-10-24 17:54:43 +02:00
|
|
|
|
>PSTR "SYS"
|
|
|
|
|
PRODOS.FT.DFLT >PSTR "$ "
|
2018-04-11 16:35:51 +01:00
|
|
|
|
MSG.NODATE .AZ " <No-Date> "
|
|
|
|
|
FMT.DateTime .AZ "%d-%b-%y %H:%M"
|
2017-10-10 17:40:23 +02:00
|
|
|
|
TYPES .AS "-dbclssp"
|
|
|
|
|
ACCESS .AS "rwxrwxrwx"
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
2015-06-03 20:30:57 +02:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
2015-03-14 22:47:37 +01:00
|
|
|
|
DS.START
|
2017-09-21 17:29:45 +02:00
|
|
|
|
ArgCount .BS 1
|
2017-10-04 17:12:03 +02:00
|
|
|
|
|
2017-10-10 17:40:23 +02:00
|
|
|
|
MOD .BS 11 drwxrwxrwx0
|
2017-09-21 17:29:45 +02:00
|
|
|
|
TIME.Create .BS 20
|
|
|
|
|
TIME.Mod .BS 20
|
|
|
|
|
|
2016-10-13 18:00:27 +02:00
|
|
|
|
hFilter .BS 1
|
2017-01-15 21:51:20 +01:00
|
|
|
|
bPause .BS 1
|
2016-10-28 11:37:57 +02:00
|
|
|
|
bAllmostAll .BS 1
|
2016-10-19 17:47:53 +02:00
|
|
|
|
bLong .BS 1
|
2016-10-18 17:56:06 +02:00
|
|
|
|
bRecurse .BS 1
|
2017-10-04 17:12:03 +02:00
|
|
|
|
|
2016-10-19 17:47:53 +02:00
|
|
|
|
ColCount .BS 1
|
2017-10-04 17:12:03 +02:00
|
|
|
|
|
2018-11-17 18:17:13 +01:00
|
|
|
|
.INB USR/SRC/BIN/X.FILEENUM.G
|
2015-03-14 22:47:37 +01:00
|
|
|
|
DS.END
|
2015-06-03 20:30:57 +02:00
|
|
|
|
.ED
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2018-11-17 18:17:13 +01:00
|
|
|
|
SAVE USR/SRC/BIN/LS.S
|
2015-03-14 22:47:37 +01:00
|
|
|
|
ASM
|