2015-03-14 21:47:37 +00:00
|
|
|
|
NEW
|
2019-09-19 15:22:14 +00:00
|
|
|
|
AUTO 3,1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2020-03-16 06:50:15 +00:00
|
|
|
|
.TF bin/ls
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2020-07-13 19:29:31 +00:00
|
|
|
|
.INB inc/macros.i
|
|
|
|
|
.INB inc/a2osx.i
|
2020-07-20 15:19:32 +00:00
|
|
|
|
.INB inc/kernel.i
|
2020-07-13 19:29:31 +00:00
|
|
|
|
.INB inc/mli.i
|
|
|
|
|
.INB inc/mli.e.i
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2019-04-29 15:47:17 +00:00
|
|
|
|
X.ENTER.SUBDIR .EQ 1
|
2017-02-21 17:01:30 +00:00
|
|
|
|
X.COPY.TO.DEST .EQ 0
|
2016-11-08 16:56:05 +00:00
|
|
|
|
X.DELETE.SOURCE .EQ 0
|
|
|
|
|
*--------------------------------------
|
2016-10-19 15:47:53 +00:00
|
|
|
|
MAX.COL .EQ 4
|
|
|
|
|
*--------------------------------------
|
2018-12-19 16:45:09 +00:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR ZPBIN
|
|
|
|
|
ZS.START
|
|
|
|
|
ZPPtr1 .BS 2
|
|
|
|
|
ZPPtr2 .BS 2
|
|
|
|
|
ZPFileName .BS 2
|
|
|
|
|
ZPFileStat .BS 2
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
2020-07-20 15:19:32 +00:00
|
|
|
|
ZPLineBuf .BS 2
|
2021-06-10 14:00:05 +00:00
|
|
|
|
ZPPWBuf .BS 2
|
|
|
|
|
|
|
|
|
|
ArgCount .BS 1
|
|
|
|
|
|
|
|
|
|
ColCount .BS 1
|
|
|
|
|
bPass2 .BS 1
|
|
|
|
|
|
|
|
|
|
bPause .BS 1
|
|
|
|
|
bAllmostAll .BS 1
|
|
|
|
|
bColumn .BS 1
|
|
|
|
|
bFullPath .BS 1
|
|
|
|
|
bLong .BS 1
|
|
|
|
|
bRecurse .BS 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ZS.END .ED
|
2015-11-22 22:30:06 +00:00
|
|
|
|
*--------------------------------------
|
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
|
2018-12-19 16:45:09 +00:00
|
|
|
|
.DA #0 S.PS.F.EVENT
|
|
|
|
|
.DA #0
|
|
|
|
|
.DA CS.END-CS.START Code Size (without Constants)
|
|
|
|
|
.DA DS.END-DS.START Data SegmentSize
|
|
|
|
|
.DA #64 Stack Size
|
|
|
|
|
.DA #ZS.END-ZS.START Zero Page Size
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
2019-10-03 06:25:27 +00:00
|
|
|
|
*--------------------------------------
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
2021-06-10 14:00:05 +00:00
|
|
|
|
.DA CS.DOEVENT
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.DA CS.QUIT
|
2021-06-12 00:20:31 +00:00
|
|
|
|
L.MSG.USAGE .DA MSG.USAGE
|
2020-02-29 14:06:28 +00:00
|
|
|
|
L.MSG.REG .DA MSG.REG
|
|
|
|
|
L.MSG.REGEXT .DA MSG.REGEXT
|
2015-03-14 21:47:37 +00:00
|
|
|
|
L.MSG.DIR .DA MSG.DIR
|
2016-10-19 15:47:53 +00:00
|
|
|
|
L.MSG.DIREXT .DA MSG.DIREXT
|
2020-02-29 14:06:28 +00:00
|
|
|
|
L.MSG.BDEV .DA MSG.BDEV
|
|
|
|
|
L.MSG.BDEVEXT .DA MSG.BDEVEXT
|
|
|
|
|
L.MSG.ENTER .DA MSG.ENTER
|
2015-03-14 21:47:37 +00:00
|
|
|
|
L.PRODOS.FT.TXT .DA PRODOS.FT.TXT
|
2019-11-29 15:36:54 +00:00
|
|
|
|
L.FMT.Date .DA FMT.Date
|
|
|
|
|
L.FMT.Time .DA FMT.Time
|
2020-07-13 19:29:31 +00:00
|
|
|
|
L.FMT.string6 .DA FMT.string6
|
2019-12-06 13:50:32 +00:00
|
|
|
|
L.FMT.int16 .DA FMT.int16
|
2020-02-29 14:06:28 +00:00
|
|
|
|
J.CS.RUN.PRINT .DA CS.RUN.PRINT.REG
|
|
|
|
|
.DA CS.RUN.PRINT.DIR
|
|
|
|
|
.DA CS.RUN.PRINT.CDEV
|
|
|
|
|
.DA CS.RUN.PRINT.BDEV
|
|
|
|
|
.DA CS.RUN.PRINT.CDEV
|
|
|
|
|
.DA CS.RUN.PRINT.CDEV
|
|
|
|
|
.DA CS.RUN.PRINT.CDEV
|
|
|
|
|
.DA CS.RUN.PRINT.CDEV
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2018-12-19 16:45:09 +00:00
|
|
|
|
CS.INIT clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-06-10 14:00:05 +00:00
|
|
|
|
CS.RUN
|
|
|
|
|
.1 inc ArgCount
|
|
|
|
|
lda ArgCount
|
2018-10-16 15:48:03 +00:00
|
|
|
|
>SYSCALL ArgV
|
2017-09-28 15:39:12 +00:00
|
|
|
|
bcs .6
|
2020-07-20 15:19:32 +00:00
|
|
|
|
|
2016-10-18 15:56:06 +00:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
lda (ZPPtr1)
|
|
|
|
|
cmp #'-'
|
2016-10-20 16:04:35 +00:00
|
|
|
|
bne .4
|
2020-07-20 15:19:32 +00:00
|
|
|
|
|
2017-09-22 15:25:21 +00:00
|
|
|
|
ldy #1
|
2016-10-18 15:56:06 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
ldx #OptionVars-OptionList-1
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2016-10-19 15:47:53 +00:00
|
|
|
|
.2 cmp OptionList,x
|
|
|
|
|
beq .3
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2016-10-19 15:47:53 +00:00
|
|
|
|
dex
|
2019-12-14 18:44:01 +00:00
|
|
|
|
bpl .2
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-06-12 00:20:31 +00:00
|
|
|
|
>PUSHW L.MSG.USAGE
|
|
|
|
|
>PUSHBI 0
|
|
|
|
|
>SYSCALL PrintF
|
|
|
|
|
|
2018-10-21 20:54:07 +00:00
|
|
|
|
lda #E.SYN
|
2016-10-20 16:04:35 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
.3 ldy OptionVars,x
|
2016-10-18 15:56:06 +00:00
|
|
|
|
lda #$80
|
2021-06-10 14:00:05 +00:00
|
|
|
|
sta $0,y
|
2017-09-28 15:39:12 +00:00
|
|
|
|
bra .1
|
2019-12-14 18:44:01 +00:00
|
|
|
|
|
2016-10-20 16:04:35 +00:00
|
|
|
|
.4 >LDYA ZPPtr1
|
|
|
|
|
jsr InitSrcDirYA
|
2018-12-19 16:45:09 +00:00
|
|
|
|
bcc .1 scan for any other args
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
|
2017-09-22 15:25:21 +00:00
|
|
|
|
.6 >LDA.G index do we have a Source dir ?
|
2019-11-29 15:36:54 +00:00
|
|
|
|
bne .8
|
|
|
|
|
|
2019-07-22 16:28:44 +00:00
|
|
|
|
ldy #S.PS.hCWD
|
2020-02-28 07:21:46 +00:00
|
|
|
|
lda (pPS),y
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
2016-10-20 16:04:35 +00:00
|
|
|
|
jsr InitSrcDirYA
|
2019-11-29 15:36:54 +00:00
|
|
|
|
bcs .9
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-01-18 19:37:32 +00:00
|
|
|
|
.8 >PUSHEA.G TIME.SysTime
|
2020-08-12 19:31:36 +00:00
|
|
|
|
>SYSCALL Time
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2019-12-06 13:50:32 +00:00
|
|
|
|
>LDYAI S.PW
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL GetMem
|
2019-12-06 13:50:32 +00:00
|
|
|
|
bcs .9
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
|
|
|
|
>STYA ZPPWBuf
|
2019-12-06 13:50:32 +00:00
|
|
|
|
txa
|
2021-06-10 14:00:05 +00:00
|
|
|
|
>STA.G hPWBuf
|
|
|
|
|
|
2020-07-20 15:19:32 +00:00
|
|
|
|
>LDYAI 256
|
|
|
|
|
>SYSCALL GetMem
|
|
|
|
|
bcs .9
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-20 15:19:32 +00:00
|
|
|
|
>STYA ZPLineBuf
|
2021-06-10 14:00:05 +00:00
|
|
|
|
txa
|
|
|
|
|
|
|
|
|
|
>STA.G hLineBuf
|
2016-08-17 06:25:58 +00:00
|
|
|
|
*--------------------------------------
|
2021-06-10 14:00:05 +00:00
|
|
|
|
CS.RUN.LOOP stz bPass2
|
|
|
|
|
|
|
|
|
|
.1 ldy #S.PS.hStdIn
|
2019-04-30 16:08:47 +00:00
|
|
|
|
lda (pPS),y
|
2020-08-12 19:31:36 +00:00
|
|
|
|
>SYSCALL FEOF
|
2019-04-30 16:08:47 +00:00
|
|
|
|
bcs .99 I/O error
|
2020-03-17 16:03:32 +00:00
|
|
|
|
|
2019-04-30 16:08:47 +00:00
|
|
|
|
tay
|
2019-05-02 09:52:32 +00:00
|
|
|
|
bne .2 no char
|
2020-03-17 16:03:32 +00:00
|
|
|
|
|
2018-12-19 16:45:09 +00:00
|
|
|
|
>SYSCALL GetChar
|
2017-01-15 20:51:20 +00:00
|
|
|
|
cmp #$03 Ctrl-C
|
2021-06-10 14:00:05 +00:00
|
|
|
|
beq .99 Abort....
|
2020-03-17 16:03:32 +00:00
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
cmp #$13 Ctrl-S
|
2018-12-19 16:45:09 +00:00
|
|
|
|
bne .2
|
2017-01-15 20:51:20 +00:00
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
lda bPause
|
2017-01-15 20:51:20 +00:00
|
|
|
|
eor #$ff
|
2021-06-10 14:00:05 +00:00
|
|
|
|
sta bPause
|
|
|
|
|
bne .1
|
2020-03-17 16:03:32 +00:00
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
.2 bit bPause
|
|
|
|
|
bmi .1
|
2020-03-17 16:03:32 +00:00
|
|
|
|
|
2017-03-07 14:05:23 +00:00
|
|
|
|
jsr GetEntry
|
2016-10-26 20:41:54 +00:00
|
|
|
|
bcs .9
|
2020-03-17 16:03:32 +00:00
|
|
|
|
|
2019-04-30 16:08:47 +00:00
|
|
|
|
jsr FilterMatch
|
2016-10-26 20:41:54 +00:00
|
|
|
|
bcs .8 no match, skip....
|
2016-10-13 16:00:27 +00:00
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
bit bAllmostAll
|
2020-02-29 14:06:28 +00:00
|
|
|
|
bmi .4
|
2020-03-17 16:03:32 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
lda (ZPFileName)
|
|
|
|
|
cmp #'.'
|
|
|
|
|
beq .8
|
2018-12-19 16:45:09 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
.4 ldy #S.STAT.MODE+1
|
|
|
|
|
lda (ZPFileStat),y
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
and #$70
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
tax
|
|
|
|
|
jsr CS.RUN.PRINT.JMP
|
2018-12-19 16:45:09 +00:00
|
|
|
|
bcs .99
|
|
|
|
|
|
|
|
|
|
.8 jsr GetNextEntry
|
2021-06-10 14:00:05 +00:00
|
|
|
|
bcc .1
|
2018-12-19 16:45:09 +00:00
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
bit bPass2
|
|
|
|
|
bmi .9
|
2018-12-19 16:45:09 +00:00
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
jsr ResetSrcDir
|
|
|
|
|
bcs .99
|
|
|
|
|
|
|
|
|
|
dec bPass2
|
|
|
|
|
bra .1
|
|
|
|
|
|
|
|
|
|
.9 bit bLong
|
2016-10-26 20:41:54 +00:00
|
|
|
|
bmi .91
|
|
|
|
|
|
2016-10-28 09:37:57 +00:00
|
|
|
|
jsr CS.RUN.NewLine
|
|
|
|
|
bcs .99
|
2016-10-26 20:41:54 +00:00
|
|
|
|
|
|
|
|
|
.91 jsr LeaveSubDir
|
2018-12-19 16:45:09 +00:00
|
|
|
|
bcs .98
|
2016-10-30 18:19:43 +00:00
|
|
|
|
|
|
|
|
|
jsr BasePath..
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
|
|
|
|
jsr CS.RUN.ENTER.MSG
|
|
|
|
|
bcs .99
|
|
|
|
|
|
2018-12-19 16:45:09 +00:00
|
|
|
|
jsr GetNextEntry
|
2021-06-10 14:00:05 +00:00
|
|
|
|
jmp CS.RUN.LOOP
|
|
|
|
|
|
2018-12-19 16:45:09 +00:00
|
|
|
|
.98 lda #0
|
2016-10-26 20:41:54 +00:00
|
|
|
|
sec
|
2016-11-01 21:37:12 +00:00
|
|
|
|
.99 rts
|
2016-10-13 16:00:27 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-29 14:06:28 +00:00
|
|
|
|
CS.RUN.PRINT.JMP
|
|
|
|
|
jmp (J.CS.RUN.PRINT,x)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.PRINT.REG
|
2021-06-10 14:00:05 +00:00
|
|
|
|
bit bPass2
|
|
|
|
|
bpl .8
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
bit bLong
|
|
|
|
|
bmi .1
|
|
|
|
|
|
|
|
|
|
bit bColumn
|
2020-02-29 14:06:28 +00:00
|
|
|
|
bmi .23
|
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
bit bFullPath
|
2020-02-29 14:06:28 +00:00
|
|
|
|
bpl .22
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
jsr CS.RUN.PRINT.SRCPATH
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
.23 >LDYA ZPFileName
|
|
|
|
|
>SYSCALL PutS
|
|
|
|
|
rts
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
.22 >PUSHW L.MSG.REG
|
2020-02-14 07:21:56 +00:00
|
|
|
|
>PUSHW ZPFileName
|
2020-02-29 14:06:28 +00:00
|
|
|
|
>PUSHBI 2
|
|
|
|
|
>SYSCALL PrintF
|
|
|
|
|
bcs .9
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
|
|
|
|
jmp CS.RUN.UpdateColCnt
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
.9 rts
|
2020-02-29 14:06:28 +00:00
|
|
|
|
*--------------------------------------
|
2021-06-10 14:00:05 +00:00
|
|
|
|
.1 >PUSHW L.MSG.REGEXT
|
|
|
|
|
|
2020-04-02 06:32:25 +00:00
|
|
|
|
jsr Mod2CSTR (2)
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
|
|
|
|
jsr CS.RUN.PushUidGid (4)
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.STAT.SIZE+3
|
|
|
|
|
ldx #4
|
|
|
|
|
|
|
|
|
|
.2 lda (ZPFileStat),y
|
|
|
|
|
>PUSHA
|
2016-10-13 16:00:27 +00:00
|
|
|
|
dey
|
2020-02-29 14:06:28 +00:00
|
|
|
|
dex
|
2020-04-02 06:32:25 +00:00
|
|
|
|
bne .2 (4)
|
2016-10-13 06:21:16 +00:00
|
|
|
|
|
2020-04-02 06:32:25 +00:00
|
|
|
|
jsr CS.RUN.PUSHDATES (4)
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.STAT.P.TYPE
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
jsr FileType2PSTR
|
2020-04-02 06:32:25 +00:00
|
|
|
|
>PUSHYA (2)
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.STAT.P.AUXTYPE+1
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
>PUSHA
|
2020-02-14 07:21:56 +00:00
|
|
|
|
dey
|
2020-02-29 14:06:28 +00:00
|
|
|
|
lda (ZPFileStat),y
|
2020-04-02 06:32:25 +00:00
|
|
|
|
>PUSHA (2)
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2020-04-02 06:32:25 +00:00
|
|
|
|
>PUSHW ZPFileName (2)
|
2016-10-30 07:58:08 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
>PUSHBI 20
|
|
|
|
|
>SYSCALL PrintF
|
2020-07-20 15:19:32 +00:00
|
|
|
|
bcs .9
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-20 15:19:32 +00:00
|
|
|
|
jmp CS.RUN.NewLine.1
|
2016-10-13 16:00:27 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-19 16:45:09 +00:00
|
|
|
|
CS.RUN.PRINT.DIR
|
2021-06-10 14:00:05 +00:00
|
|
|
|
bit bPass2
|
|
|
|
|
bmi .8
|
|
|
|
|
|
|
|
|
|
bit bLong
|
2016-10-26 20:41:54 +00:00
|
|
|
|
bmi .4
|
2016-10-19 15:47:53 +00:00
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
bit bColumn
|
2019-03-12 14:41:55 +00:00
|
|
|
|
bmi .23
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
|
|
|
|
bit bFullPath
|
2019-03-12 14:41:55 +00:00
|
|
|
|
bpl .22
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
|
|
|
|
jsr CS.RUN.PRINT.SRCPATH
|
|
|
|
|
|
2019-03-11 16:46:00 +00:00
|
|
|
|
.23 >LDYA ZPFileName
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PutS
|
2019-03-12 14:41:55 +00:00
|
|
|
|
bcs .9
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
|
|
|
|
bit bRecurse
|
2019-03-12 14:41:55 +00:00
|
|
|
|
bpl .8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2019-03-12 14:41:55 +00:00
|
|
|
|
lda (ZPFileName)
|
|
|
|
|
cmp #'.'
|
|
|
|
|
beq .8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2019-03-12 14:41:55 +00:00
|
|
|
|
>LDYA ZPFileName
|
2021-06-10 14:00:05 +00:00
|
|
|
|
jmp EnterSubDirYA
|
|
|
|
|
|
2019-03-12 14:41:55 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
.9 rts
|
2018-08-22 15:23:27 +00:00
|
|
|
|
|
2020-02-14 07:21:56 +00:00
|
|
|
|
.22 >PUSHW L.MSG.DIR
|
|
|
|
|
>PUSHW ZPFileName
|
|
|
|
|
>PUSHBI 2
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2019-03-12 14:41:55 +00:00
|
|
|
|
bcs .9
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2017-09-21 15:29:45 +00:00
|
|
|
|
ldy #0
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2017-09-22 15:25:21 +00:00
|
|
|
|
.1 iny
|
|
|
|
|
lda (ZPFileName),y
|
|
|
|
|
bne .1
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2017-09-22 15:25:21 +00:00
|
|
|
|
.11 iny
|
|
|
|
|
cpy #19
|
|
|
|
|
bcs .2
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2020-03-03 16:44:52 +00:00
|
|
|
|
lda #C.SPACE
|
2017-09-21 15:29:45 +00:00
|
|
|
|
phy
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL PutChar
|
2017-09-21 15:29:45 +00:00
|
|
|
|
ply
|
2017-09-22 15:25:21 +00:00
|
|
|
|
bcc .11
|
|
|
|
|
rts
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2016-10-28 09:37:57 +00:00
|
|
|
|
.2 jsr CS.RUN.UpdateColCnt
|
2016-10-26 20:41:54 +00:00
|
|
|
|
bcc .5
|
|
|
|
|
rts
|
2019-12-06 13:50:32 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-14 07:21:56 +00:00
|
|
|
|
.4 >PUSHW L.MSG.DIREXT
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2017-10-10 15:40:23 +00:00
|
|
|
|
jsr Mod2CSTR
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
jsr CS.RUN.PushUidGid
|
2020-02-14 07:21:56 +00:00
|
|
|
|
jsr CS.RUN.PUSHDATES
|
|
|
|
|
>PUSHW ZPFileName
|
2019-12-06 13:50:32 +00:00
|
|
|
|
>PUSHBI 12
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2020-07-20 15:19:32 +00:00
|
|
|
|
bcs .90
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-20 15:19:32 +00:00
|
|
|
|
jsr CS.RUN.NewLine.1
|
2019-03-12 14:41:55 +00:00
|
|
|
|
bcs .90
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
|
|
|
|
.5 bit bRecurse
|
2019-03-12 14:41:55 +00:00
|
|
|
|
bpl .80
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2017-09-21 15:29:45 +00:00
|
|
|
|
lda (ZPFileName)
|
2016-10-26 20:41:54 +00:00
|
|
|
|
cmp #'.'
|
2019-03-12 14:41:55 +00:00
|
|
|
|
beq .80
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2016-10-28 09:37:57 +00:00
|
|
|
|
jsr CS.RUN.NewLine
|
2019-03-12 14:41:55 +00:00
|
|
|
|
bcs .90
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2017-02-24 16:34:02 +00:00
|
|
|
|
>LDYA ZPFileName
|
2016-10-30 22:23:18 +00:00
|
|
|
|
jsr EnterSubDirYA
|
2019-03-12 14:41:55 +00:00
|
|
|
|
bcs .90
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2018-12-19 16:45:09 +00:00
|
|
|
|
jmp CS.RUN.ENTER.MSG
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
2019-03-12 14:41:55 +00:00
|
|
|
|
.80 clc
|
|
|
|
|
.90 rts
|
2016-10-13 16:00:27 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-29 14:06:28 +00:00
|
|
|
|
CS.RUN.PRINT.CDEV
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.PRINT.BDEV
|
2021-06-10 19:53:52 +00:00
|
|
|
|
bit bPass2
|
|
|
|
|
bmi .8
|
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
bit bLong
|
2020-02-29 14:06:28 +00:00
|
|
|
|
bmi .20
|
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
bit bColumn
|
2019-03-12 14:41:55 +00:00
|
|
|
|
bmi .23
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
|
|
|
|
bit bFullPath
|
2019-03-12 14:41:55 +00:00
|
|
|
|
bpl .22
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
2020-02-14 07:21:56 +00:00
|
|
|
|
jsr CS.RUN.PRINT.SRCPATH
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
2019-03-11 16:46:00 +00:00
|
|
|
|
.23 >LDYA ZPFileName
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PutS
|
2020-02-29 14:06:28 +00:00
|
|
|
|
bcs .9
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
|
|
|
|
bit bRecurse
|
2020-02-29 14:06:28 +00:00
|
|
|
|
bpl .8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
lda (ZPFileName)
|
|
|
|
|
cmp #'.'
|
|
|
|
|
beq .8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
>LDYA ZPFileName
|
|
|
|
|
jmp EnterSubDirYA
|
2021-01-12 21:14:13 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
.8 clc
|
2021-06-10 14:00:05 +00:00
|
|
|
|
.9 rts
|
2019-03-11 15:43:33 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
.22 >PUSHW L.MSG.BDEV
|
2020-02-14 07:21:56 +00:00
|
|
|
|
>PUSHW ZPFileName
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 2
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2016-10-28 09:37:57 +00:00
|
|
|
|
bcs .9
|
2019-12-06 13:50:32 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
ldy #0
|
2019-12-06 13:50:32 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
.1 iny
|
|
|
|
|
lda (ZPFileName),y
|
|
|
|
|
bne .1
|
2019-12-06 13:50:32 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
.11 iny
|
|
|
|
|
cpy #19
|
|
|
|
|
bcs .2
|
2019-12-06 13:50:32 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
lda #C.SPACE
|
|
|
|
|
phy
|
|
|
|
|
>SYSCALL PutChar
|
|
|
|
|
ply
|
|
|
|
|
bcc .11
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
rts
|
2019-12-06 13:50:32 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
.2 jsr CS.RUN.UpdateColCnt
|
|
|
|
|
* bcc .5
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.20 >PUSHW L.MSG.BDEVEXT
|
|
|
|
|
>PUSHW ZPFileName
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
ldy #S.STAT.P.SLOT
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
|
|
|
|
iny DRIVE
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
ldy #S.STAT.BLOCKS+1
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
2020-02-14 07:21:56 +00:00
|
|
|
|
dey
|
2020-02-29 14:06:28 +00:00
|
|
|
|
>PUSHB (ZPFileStat),y
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
ldy #S.STAT.P.DEVBLOCKS+1
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
|
|
|
|
dey
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
>PUSHBI 8
|
2019-12-06 13:50:32 +00:00
|
|
|
|
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2020-02-29 14:06:28 +00:00
|
|
|
|
bcs .90
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-20 15:19:32 +00:00
|
|
|
|
jsr CS.RUN.NewLine.1
|
|
|
|
|
bcs .90
|
2018-12-19 16:45:09 +00:00
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
bit bRecurse
|
2020-02-29 14:06:28 +00:00
|
|
|
|
bpl .80
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
>LDYA ZPFileName
|
|
|
|
|
jsr EnterSubDirYA
|
|
|
|
|
bcs .90
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
jmp CS.RUN.ENTER.MSG
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
.80 clc
|
|
|
|
|
.90 rts
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-14 07:21:56 +00:00
|
|
|
|
CS.RUN.PRINT.SRCPATH
|
|
|
|
|
ldy #hSrcBasePath
|
|
|
|
|
lda (pData),y
|
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
>PUSHYA
|
|
|
|
|
>PUSHBI 0
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2020-02-14 07:21:56 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-07-13 19:29:31 +00:00
|
|
|
|
CS.RUN.PushUidGid
|
|
|
|
|
ldy #S.STAT.UID
|
2019-12-06 13:50:32 +00:00
|
|
|
|
lda (ZPFileStat),y
|
2020-07-13 19:29:31 +00:00
|
|
|
|
>PUSHA
|
2021-06-10 14:00:05 +00:00
|
|
|
|
>PUSHW ZPPWBuf
|
2020-07-13 19:29:31 +00:00
|
|
|
|
>SYSCALL GetPWUID
|
|
|
|
|
bcs .2
|
|
|
|
|
|
|
|
|
|
>PUSHEA.G USER
|
|
|
|
|
jsr CS.RUN.PushUidGidStr
|
|
|
|
|
bra .3
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
.2 >PUSHEA.G USER
|
|
|
|
|
>PUSHW L.FMT.int16
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
ldy #S.STAT.UID+1
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
>PUSHBI 2
|
2020-08-12 19:31:36 +00:00
|
|
|
|
>SYSCALL SPrintF
|
2019-12-06 13:50:32 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
.3 ldy #S.STAT.GID
|
2019-12-06 13:50:32 +00:00
|
|
|
|
lda (ZPFileStat),y
|
2020-02-17 16:55:02 +00:00
|
|
|
|
>PUSHA
|
2021-06-10 14:00:05 +00:00
|
|
|
|
>PUSHW ZPPWBuf
|
2020-07-13 19:29:31 +00:00
|
|
|
|
>SYSCALL GetGRGID
|
|
|
|
|
bcs .5
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
>PUSHEA.G GROUP
|
|
|
|
|
jsr CS.RUN.PushUidGidStr
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
bra .8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
.5 >PUSHEA.G GROUP
|
2020-02-14 07:21:56 +00:00
|
|
|
|
>PUSHW L.FMT.int16
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
ldy #S.STAT.GID+1
|
2019-12-06 13:50:32 +00:00
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
>PUSHA
|
2019-12-10 14:12:07 +00:00
|
|
|
|
>PUSHBI 2
|
2020-08-12 19:31:36 +00:00
|
|
|
|
>SYSCALL SPrintF
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
.8 >PUSHEA.G USER
|
|
|
|
|
>PUSHEA.G GROUP
|
2019-12-06 13:50:32 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
CS.RUN.PushUidGidStr
|
|
|
|
|
>PUSHW L.FMT.string6
|
2021-06-10 14:00:05 +00:00
|
|
|
|
>PUSHW ZPPWBuf
|
2020-07-13 19:29:31 +00:00
|
|
|
|
>PUSHBI 2
|
2020-08-12 19:31:36 +00:00
|
|
|
|
>SYSCALL SPrintF
|
2020-07-13 19:29:31 +00:00
|
|
|
|
rts
|
2019-12-06 13:50:32 +00:00
|
|
|
|
*--------------------------------------
|
2017-09-22 15:25:21 +00:00
|
|
|
|
CS.RUN.PUSHDATES
|
|
|
|
|
ldy #TIME.Mod-1 Set NODATE as default
|
2019-11-29 15:36:54 +00:00
|
|
|
|
jsr CS.RUN.NODATES.INIT
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2017-09-22 15:25:21 +00:00
|
|
|
|
ldy #TIME.Create-1 Set NODATE as default
|
2019-11-29 15:36:54 +00:00
|
|
|
|
jsr CS.RUN.NODATES.INIT
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2016-11-14 14:59:09 +00:00
|
|
|
|
ldy #S.STAT.MTIME+S.TIME.MONTH
|
2017-02-24 16:34:02 +00:00
|
|
|
|
lda (ZPFileStat),y
|
2016-11-14 14:59:09 +00:00
|
|
|
|
beq .1 Month=0.....invalid date/time
|
|
|
|
|
|
2020-01-18 19:37:32 +00:00
|
|
|
|
>PUSHEA.G TIME.Mod
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2017-02-24 16:34:02 +00:00
|
|
|
|
lda ZPFileStat
|
2016-10-14 15:39:49 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #S.STAT.MTIME
|
|
|
|
|
tay
|
2017-02-24 16:34:02 +00:00
|
|
|
|
lda ZPFileStat+1
|
2016-10-14 15:39:49 +00:00
|
|
|
|
adc #0
|
2019-11-29 15:36:54 +00:00
|
|
|
|
jsr CS.RUN.DATEFMT.SELECT
|
2017-08-22 06:37:03 +00:00
|
|
|
|
>SYSCALL StrFTime
|
2019-11-29 15:36:54 +00:00
|
|
|
|
|
2016-11-14 14:59:09 +00:00
|
|
|
|
.1 ldy #S.STAT.CTIME+S.TIME.MONTH
|
2017-02-24 16:34:02 +00:00
|
|
|
|
lda (ZPFileStat),y
|
2016-11-14 14:59:09 +00:00
|
|
|
|
beq .2 Month=0.....invalid date/time
|
|
|
|
|
|
2020-01-18 19:37:32 +00:00
|
|
|
|
>PUSHEA.G TIME.Create
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2017-02-24 16:34:02 +00:00
|
|
|
|
lda ZPFileStat
|
2016-10-14 15:39:49 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #S.STAT.CTIME
|
|
|
|
|
tay
|
2017-02-24 16:34:02 +00:00
|
|
|
|
lda ZPFileStat+1
|
2016-10-14 15:39:49 +00:00
|
|
|
|
adc #0
|
2019-11-29 15:36:54 +00:00
|
|
|
|
jsr CS.RUN.DATEFMT.SELECT
|
2017-08-22 06:37:03 +00:00
|
|
|
|
>SYSCALL StrFTime
|
2019-11-29 15:36:54 +00:00
|
|
|
|
|
2017-09-25 15:50:33 +00:00
|
|
|
|
.2 >PUSHEA.G TIME.Mod
|
|
|
|
|
>PUSHEA.G TIME.Create
|
2016-10-14 15:39:49 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-11-29 15:36:54 +00:00
|
|
|
|
CS.RUN.NODATES.INIT
|
|
|
|
|
ldx #$ff
|
|
|
|
|
|
|
|
|
|
.1 inx
|
|
|
|
|
iny
|
|
|
|
|
lda MSG.NODATE,x
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bne .1
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2019-11-29 15:36:54 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.DATEFMT.SELECT
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
|
|
|
|
|
ldy #S.TIME.CENTURY
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
ldy #TIME.SysTime+S.TIME.CENTURY
|
|
|
|
|
cmp (pData),y
|
|
|
|
|
bne .9
|
|
|
|
|
|
|
|
|
|
ldy #S.TIME.YEAR
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
ldy #TIME.SysTime+S.TIME.YEAR
|
|
|
|
|
cmp (pData),y
|
|
|
|
|
bne .9
|
|
|
|
|
|
|
|
|
|
ldy #S.TIME.MONTH
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
ldy #TIME.SysTime+S.TIME.MONTH
|
|
|
|
|
cmp (pData),y
|
|
|
|
|
bne .9
|
|
|
|
|
|
|
|
|
|
ldy #S.TIME.DAY
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
ldy #TIME.SysTime+S.TIME.DAY
|
|
|
|
|
cmp (pData),y
|
|
|
|
|
bne .9
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2019-11-29 15:36:54 +00:00
|
|
|
|
.8 >PUSHW L.FMT.Time
|
2020-01-18 19:37:32 +00:00
|
|
|
|
>PUSHW ZPPtr1
|
2019-11-29 15:36:54 +00:00
|
|
|
|
rts
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2019-11-29 15:36:54 +00:00
|
|
|
|
.9 >PUSHW L.FMT.Date
|
2020-01-18 19:37:32 +00:00
|
|
|
|
>PUSHW ZPPtr1
|
2019-11-29 15:36:54 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-10-28 09:37:57 +00:00
|
|
|
|
CS.RUN.UpdateColCnt
|
2021-06-10 14:00:05 +00:00
|
|
|
|
inc ColCount
|
|
|
|
|
lda ColCount
|
2016-10-28 09:37:57 +00:00
|
|
|
|
cmp #MAX.COL
|
|
|
|
|
bne CS.RUN.NewLine.8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-06-10 15:10:40 +00:00
|
|
|
|
stz ColCount
|
|
|
|
|
|
2016-10-28 09:37:57 +00:00
|
|
|
|
bra CS.RUN.NewLine.1
|
|
|
|
|
*--------------------------------------
|
2016-10-30 22:23:18 +00:00
|
|
|
|
CS.RUN.ENTER.MSG
|
2020-02-14 07:21:56 +00:00
|
|
|
|
>PUSHW L.MSG.ENTER
|
2016-11-08 16:56:05 +00:00
|
|
|
|
ldy #hSrcBasePath
|
2016-10-30 22:23:18 +00:00
|
|
|
|
lda (pData),y
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
2016-10-30 22:23:18 +00:00
|
|
|
|
>PUSHYA
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 2
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2020-07-21 05:26:07 +00:00
|
|
|
|
bcc CS.RUN.NewLine.1
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-06-10 14:00:05 +00:00
|
|
|
|
CS.RUN.NewLine lda ColCount
|
2020-07-21 05:26:07 +00:00
|
|
|
|
beq CS.RUN.NewLine.8
|
|
|
|
|
CS.RUN.NewLine.1
|
|
|
|
|
lda #C.CR
|
2020-08-12 19:31:36 +00:00
|
|
|
|
>SYSCALL PutChar
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-21 05:26:07 +00:00
|
|
|
|
lda #C.LF
|
2020-08-12 19:31:36 +00:00
|
|
|
|
>SYSCALL PutChar
|
2020-07-21 05:26:07 +00:00
|
|
|
|
|
|
|
|
|
CS.RUN.NewLine.8
|
|
|
|
|
clc
|
2016-10-30 22:23:18 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-01-15 20:51:20 +00:00
|
|
|
|
CS.DOEVENT sec
|
2015-03-14 21:47:37 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-10-20 16:04:35 +00:00
|
|
|
|
CS.QUIT jsr LeaveSubDir
|
|
|
|
|
bcc CS.QUIT
|
2019-12-06 13:50:32 +00:00
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
ldy #hFilter
|
|
|
|
|
jsr .7
|
2018-08-11 10:57:57 +00:00
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
ldy #hPWBuf
|
|
|
|
|
jsr .7
|
|
|
|
|
|
|
|
|
|
ldy #hLineBuf
|
|
|
|
|
|
|
|
|
|
.7 lda (pData),y
|
2019-12-06 13:50:32 +00:00
|
|
|
|
beq .8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2019-12-06 13:50:32 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2019-12-06 13:50:32 +00:00
|
|
|
|
.8 clc
|
2015-03-14 21:47:37 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-09-26 06:18:51 +00:00
|
|
|
|
FileType2PSTR ldy #0
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2016-09-26 06:18:51 +00:00
|
|
|
|
.1 cmp PRODOS.FT.HEX,y
|
2018-08-24 10:20:23 +00:00
|
|
|
|
beq .8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2016-10-18 15:56:06 +00:00
|
|
|
|
iny
|
|
|
|
|
cpy #PRODOS.FT.TXT-PRODOS.FT.HEX
|
2016-09-26 06:18:51 +00:00
|
|
|
|
bne .1
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2016-09-26 06:18:51 +00:00
|
|
|
|
pha
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
2018-08-24 10:20:23 +00:00
|
|
|
|
ora #$30
|
2021-06-10 14:00:05 +00:00
|
|
|
|
cmp #'9'+1
|
2018-08-24 10:20:23 +00:00
|
|
|
|
bcc .2
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2018-08-24 10:20:23 +00:00
|
|
|
|
adc #6
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
|
|
|
|
.2 sta PRODOS.FT.DFLT+1
|
2016-09-26 06:18:51 +00:00
|
|
|
|
pla
|
|
|
|
|
and #$0F
|
2018-08-24 10:20:23 +00:00
|
|
|
|
ora #$30
|
2021-06-10 14:00:05 +00:00
|
|
|
|
cmp #'9'+1
|
2018-08-24 10:20:23 +00:00
|
|
|
|
bcc .3
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2018-08-24 10:20:23 +00:00
|
|
|
|
adc #6
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
|
|
|
|
.3 sta PRODOS.FT.DFLT+2
|
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.8 tya
|
2016-09-26 06:18:51 +00:00
|
|
|
|
asl
|
|
|
|
|
asl CC
|
|
|
|
|
adc L.PRODOS.FT.TXT
|
|
|
|
|
tay
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2016-09-26 06:18:51 +00:00
|
|
|
|
lda L.PRODOS.FT.TXT+1
|
|
|
|
|
adc #0
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2016-09-26 06:18:51 +00:00
|
|
|
|
rts
|
2016-10-20 16:04:35 +00:00
|
|
|
|
*--------------------------------------
|
2017-10-10 15:40:23 +00:00
|
|
|
|
Mod2CSTR ldy #S.STAT.MODE+1
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
lsr
|
2020-07-13 19:29:31 +00:00
|
|
|
|
php C = RU
|
|
|
|
|
|
2017-10-10 15:40:23 +00:00
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
tax
|
|
|
|
|
lda TYPES,x
|
|
|
|
|
>STA.G MOD
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
|
|
|
|
plp
|
|
|
|
|
|
2017-10-10 15:40:23 +00:00
|
|
|
|
ldy #S.STAT.MODE
|
|
|
|
|
lda (ZPFileStat),y
|
2019-04-15 05:40:13 +00:00
|
|
|
|
|
2017-10-10 15:40:23 +00:00
|
|
|
|
ldy #MOD+1
|
2020-07-29 13:10:11 +00:00
|
|
|
|
ldx #8
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
|
|
|
|
.1 pha
|
2017-10-10 15:40:23 +00:00
|
|
|
|
lda #'-'
|
|
|
|
|
bcc .2
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2017-10-10 15:40:23 +00:00
|
|
|
|
lda ACCESS,x
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
2017-10-10 15:40:23 +00:00
|
|
|
|
.2 sta (pData),y
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2017-10-10 15:40:23 +00:00
|
|
|
|
iny
|
|
|
|
|
pla
|
2020-07-13 19:29:31 +00:00
|
|
|
|
asl
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
2017-10-10 15:40:23 +00:00
|
|
|
|
|
2020-04-02 06:32:25 +00:00
|
|
|
|
>PUSHEA.G MOD
|
2017-10-10 15:40:23 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-08-25 14:54:30 +00:00
|
|
|
|
.INB usr/src/shared/x.fileenum.s
|
2016-09-26 06:18:51 +00:00
|
|
|
|
*--------------------------------------
|
2015-03-14 21:47:37 +00:00
|
|
|
|
CS.END
|
2016-10-18 15:56:06 +00:00
|
|
|
|
*--------------------------------------
|
2019-12-14 18:44:01 +00:00
|
|
|
|
OptionList .AS "ACFLRacflr"
|
2019-03-11 16:46:00 +00:00
|
|
|
|
OptionVars .DA #bAllmostAll,#bColumn,#bFullPath,#bLong,#bRecurse,#bAllmostAll,#bColumn,#bFullPath,#bLong,#bRecurse
|
2016-10-18 15:56:06 +00:00
|
|
|
|
*--------------------------------------
|
2021-06-12 00:20:31 +00:00
|
|
|
|
MSG.USAGE .AS "Usage : LS [-A] [-C] [-F] [-L] [-R] [filespec]\r\n"
|
|
|
|
|
.AS " -A : Show dot files\r\n"
|
|
|
|
|
.AS " -C : List in multiple columns\r\n"
|
|
|
|
|
.AS " -F : Show full paths\r\n"
|
|
|
|
|
.AS " -L : Use long listing format\r\n"
|
|
|
|
|
.AZ " -R : Recursively list subdirectories\r\n"
|
2021-06-10 14:00:05 +00:00
|
|
|
|
MSG.REGEXT .AZ "%s %6s %6s %10u %s %s %s %H %s"
|
2020-07-22 08:32:58 +00:00
|
|
|
|
MSG.REG .AZ "%19s"
|
|
|
|
|
MSG.DIREXT .AZ "%s %6s %6s %s %s <dir> %s"
|
2018-04-11 15:35:51 +00:00
|
|
|
|
MSG.DIR .AZ "\e[32m%s/\e[0m"
|
2020-07-28 20:37:26 +00:00
|
|
|
|
MSG.BDEVEXT .AZ "/%15s s%dd%d Blocks Used:%5D Total:%5D"
|
2020-07-22 08:32:58 +00:00
|
|
|
|
MSG.BDEV .AZ "\e[32m%s/\e[0m"
|
2020-07-21 05:26:07 +00:00
|
|
|
|
MSG.ENTER .AZ "Directory:%s"
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2019-09-19 15:22:14 +00:00
|
|
|
|
PRODOS.FT.HEX .HS 0406FAFCFDE2CBCCCFFF
|
2021-06-10 14:00:05 +00:00
|
|
|
|
PRODOS.FT.TXT .AZ "txt"
|
|
|
|
|
.AZ "bin"
|
|
|
|
|
.AZ "asm"
|
|
|
|
|
.AZ "bas"
|
|
|
|
|
.AZ "var"
|
|
|
|
|
.AZ "atk"
|
|
|
|
|
.AZ "pix"
|
|
|
|
|
.AZ "fon"
|
|
|
|
|
.AZ "pak"
|
|
|
|
|
.AZ "sys"
|
|
|
|
|
PRODOS.FT.DFLT .AZ "$ "
|
2019-12-06 15:06:08 +00:00
|
|
|
|
MSG.NODATE .AZ "<no-date>"
|
2019-11-29 15:36:54 +00:00
|
|
|
|
FMT.Date .AZ "%d-%b-%y"
|
|
|
|
|
FMT.Time .AZ "%H:%M:%S "
|
2020-07-13 19:29:31 +00:00
|
|
|
|
FMT.string6 .AZ "%6s"
|
|
|
|
|
FMT.int16 .AZ "%6D"
|
2017-10-10 15:40:23 +00:00
|
|
|
|
TYPES .AS "-dbclssp"
|
2020-07-13 19:29:31 +00:00
|
|
|
|
ACCESS .AS "xwrxwrxwr"
|
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
|
2017-10-10 15:40:23 +00:00
|
|
|
|
MOD .BS 11 drwxrwxrwx0
|
2020-07-13 19:29:31 +00:00
|
|
|
|
USER .BS 7
|
|
|
|
|
GROUP .BS 7
|
|
|
|
|
|
2017-09-21 15:29:45 +00:00
|
|
|
|
TIME.Create .BS 20
|
|
|
|
|
TIME.Mod .BS 20
|
2019-11-29 15:36:54 +00:00
|
|
|
|
TIME.SysTime .BS S.TIME
|
2017-09-21 15:29:45 +00:00
|
|
|
|
|
2021-06-10 14:00:05 +00:00
|
|
|
|
hLineBuf .BS 1
|
|
|
|
|
hPWBuf .BS 1
|
2017-10-04 15:12:03 +00:00
|
|
|
|
|
2020-08-25 14:54:30 +00:00
|
|
|
|
.INB usr/src/shared/x.fileenum.g
|
2020-08-12 19:31:36 +00:00
|
|
|
|
DS.END .ED
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2020-07-13 19:29:31 +00:00
|
|
|
|
SAVE usr/src/bin/ls.s
|
2015-03-14 21:47:37 +00:00
|
|
|
|
ASM
|