2015-03-14 21:47:37 +00:00
|
|
|
|
NEW
|
2019-09-19 15:22:14 +00:00
|
|
|
|
AUTO 3,1
|
2021-07-24 20:42:23 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
|
|
|
|
.TF bin/ls
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-24 20:42:23 +00:00
|
|
|
|
.INB inc/macros.i
|
|
|
|
|
.INB inc/a2osx.i
|
|
|
|
|
.INB inc/kernel.i
|
|
|
|
|
.INB inc/mli.i
|
|
|
|
|
.INB inc/mli.e.i
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-05 00:12:18 +00:00
|
|
|
|
X.ENTER.SUBDIR .EQ 1
|
|
|
|
|
X.COPY.TO.DEST .EQ 0
|
|
|
|
|
X.DELETE.SOURCE .EQ 0
|
2016-11-08 16:56:05 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
MAX.COLW .EQ 20
|
|
|
|
|
MAX.COLC .EQ 4
|
|
|
|
|
COLOR.ENTER .EQ 32
|
|
|
|
|
COLOR.REG .EQ 93
|
|
|
|
|
COLOR.DIR .EQ 92
|
|
|
|
|
COLOR.BDEV .EQ 96
|
2016-10-19 15:47:53 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-24 20:42:23 +00:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR ZPBIN
|
2018-12-19 16:45:09 +00:00
|
|
|
|
ZS.START
|
2021-07-25 14:03:41 +00:00
|
|
|
|
ZPPtr1 .BS 2
|
|
|
|
|
ZPPtr2 .BS 2
|
|
|
|
|
ZPFileName .BS 2
|
|
|
|
|
ZPFileStat .BS 2
|
2021-07-05 00:12:18 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
ZPPWBuf .BS 2
|
2021-08-10 10:20:41 +00:00
|
|
|
|
ArgCount .BS 1
|
2021-07-25 14:03:41 +00:00
|
|
|
|
ColCount .BS 1
|
2021-07-28 16:50:59 +00:00
|
|
|
|
hLineBuf .BS 1
|
|
|
|
|
hPWBuf .BS 1
|
2021-07-05 00:12:18 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bPass2 .BS 1
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bPause .BS 1
|
|
|
|
|
bAllmostAll .BS 1
|
|
|
|
|
bColumn .BS 1
|
|
|
|
|
bFullPath .BS 1
|
|
|
|
|
bLong .BS 1
|
|
|
|
|
bRecurse .BS 1
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bToFile .BS 1
|
|
|
|
|
|
|
|
|
|
ZPLineBuf .BS 2
|
|
|
|
|
ZPLineBufPtr .BS 2
|
2021-07-05 00:12:18 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
ZS.END .ED
|
2021-07-05 00:12:18 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-25 14:03:41 +00:00
|
|
|
|
* File Header (16 Bytes)
|
2021-07-05 00:12:18 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-24 20:42:23 +00:00
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
|
|
|
|
.DA #0 S.PS.F.EVENT
|
2021-07-24 20:42:23 +00:00
|
|
|
|
.DA #0
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.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
|
2021-07-24 20:42:23 +00:00
|
|
|
|
.DA 0
|
2015-06-03 18:30:57 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
2019-10-03 06:25:27 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
|
|
|
|
L.MSG.USAGE .DA MSG.USAGE
|
|
|
|
|
L.MSG.ENTER .DA MSG.ENTER
|
|
|
|
|
L.MSG.REGEXT .DA MSG.REGEXT
|
|
|
|
|
L.MSG.DIREXT .DA MSG.DIREXT
|
|
|
|
|
L.MSG.BDEVEXT .DA MSG.BDEVEXT
|
2021-08-10 10:20:41 +00:00
|
|
|
|
L.MSG.SETCOLOR .DA MSG.SETCOLOR
|
2021-07-25 14:03:41 +00:00
|
|
|
|
L.PRODOS.FT.TXT .DA PRODOS.FT.TXT
|
2021-08-10 10:20:41 +00:00
|
|
|
|
L.MSG.NODATE .DA MSG.NODATE
|
2021-07-25 14:03:41 +00:00
|
|
|
|
L.FMT.Date .DA FMT.Date
|
|
|
|
|
L.FMT.Time .DA FMT.Time
|
|
|
|
|
L.FMT.int16 .DA FMT.int16
|
|
|
|
|
J.CS.RUN.PRINT .DA CS.RUN.PRINT.REG
|
2021-07-24 20:42:23 +00:00
|
|
|
|
.DA CS.RUN.PRINT.DIR
|
|
|
|
|
.DA CS.RUN.PRINT.CDEV
|
|
|
|
|
.DA CS.RUN.PRINT.BDEV
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.DA CS.RUN.PRINT.LNK
|
|
|
|
|
.DA CS.RUN.PRINT.DSOCK
|
|
|
|
|
.DA CS.RUN.PRINT.SSOCK
|
|
|
|
|
.DA CS.RUN.PRINT.PIPE
|
2021-07-24 20:42:23 +00:00
|
|
|
|
.DA 0
|
2021-07-05 00:12:18 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-25 14:03:41 +00:00
|
|
|
|
CS.INIT clc
|
|
|
|
|
rts
|
2018-12-19 16:45:09 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN ldy #S.PS.hStdOut
|
|
|
|
|
lda (pPS),y
|
|
|
|
|
tax
|
|
|
|
|
lda hFDs-1,x
|
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
lda (ZPPtr1)
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* cmp #S.FD.T.REG
|
|
|
|
|
beq .10
|
|
|
|
|
|
|
|
|
|
cmp #S.FD.T.PIPE
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.10 dec bToFile
|
2021-07-05 00:12:18 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.1 inc ArgCount
|
|
|
|
|
lda ArgCount
|
|
|
|
|
>SYSCALL ArgV
|
|
|
|
|
bcs .6
|
2020-07-20 15:19:32 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
lda (ZPPtr1)
|
|
|
|
|
cmp #'-'
|
|
|
|
|
bne .4
|
2020-07-20 15:19:32 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
ldy #1
|
|
|
|
|
lda (ZPPtr1),y
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
ldx #OptionVars-OptionList-1
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.2 cmp OptionList,x
|
|
|
|
|
beq .3
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
>PUSHW L.MSG.USAGE
|
|
|
|
|
>PUSHBI 0
|
|
|
|
|
>SYSCALL PrintF
|
2021-06-12 00:20:31 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
lda #E.SYN
|
|
|
|
|
sec
|
|
|
|
|
rts
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.3 ldy OptionVars,x
|
|
|
|
|
lda #$80
|
|
|
|
|
sta $0,y
|
|
|
|
|
bra .1
|
2019-12-14 18:44:01 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.4 >LDYA ZPPtr1
|
|
|
|
|
jsr InitSrcDirYA
|
|
|
|
|
bcc .1 scan for any other args
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.9 rts
|
2019-10-03 06:25:27 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.6 >LDA.G index do we have a Source dir ?
|
|
|
|
|
bne .8
|
2019-11-29 15:36:54 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
ldy #S.PS.hCWD
|
|
|
|
|
lda (pPS),y
|
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
jsr InitSrcDirYA
|
|
|
|
|
bcs .9
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.8 >PUSHEA.G TIME.SysTime
|
|
|
|
|
>SYSCALL Time
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
>LDYAI S.PW
|
|
|
|
|
>SYSCALL GetMem
|
|
|
|
|
bcs .9
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
>STYA ZPPWBuf
|
2021-07-28 16:50:59 +00:00
|
|
|
|
stx hPWBuf
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
>LDYAI 256
|
|
|
|
|
>SYSCALL GetMem
|
|
|
|
|
bcs .9
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
>STYA ZPLineBuf
|
2021-08-10 10:20:41 +00:00
|
|
|
|
>STYA ZPLineBufPtr
|
2021-07-28 16:50:59 +00:00
|
|
|
|
stx hLineBuf
|
2016-08-17 06:25:58 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-25 14:03:41 +00:00
|
|
|
|
CS.RUN.LOOP stz bPass2
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.1 >SLEEP
|
|
|
|
|
|
|
|
|
|
ldy #S.PS.hStdIn
|
2021-07-25 14:03:41 +00:00
|
|
|
|
lda (pPS),y
|
|
|
|
|
>SYSCALL FEOF
|
|
|
|
|
bcs .99 I/O error
|
2020-03-17 16:03:32 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
tay
|
|
|
|
|
bne .2 no char
|
2020-03-17 16:03:32 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
>SYSCALL GetChar
|
|
|
|
|
cmp #$03 Ctrl-C
|
|
|
|
|
beq .99 Abort....
|
2020-03-17 16:03:32 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
cmp #$13 Ctrl-S
|
|
|
|
|
bne .2
|
2017-01-15 20:51:20 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
lda bPause
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta bPause
|
|
|
|
|
bne .1
|
2020-03-17 16:03:32 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.2 bit bPause
|
|
|
|
|
bmi .1
|
2020-03-17 16:03:32 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
jsr GetEntry
|
2021-07-28 16:50:59 +00:00
|
|
|
|
bcs .6
|
2020-03-17 16:03:32 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
jsr FilterMatch
|
2021-08-01 13:45:15 +00:00
|
|
|
|
bcs .5 no match, skip....
|
2016-10-13 16:00:27 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bit bAllmostAll
|
|
|
|
|
bmi .4
|
2020-03-17 16:03:32 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
lda (ZPFileName)
|
|
|
|
|
cmp #'.'
|
2021-07-28 16:50:59 +00:00
|
|
|
|
beq .5
|
2018-12-19 16:45:09 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.4 ldy #S.STAT.MODE+1
|
|
|
|
|
lda (ZPFileStat),y
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
and #$70
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
tax
|
|
|
|
|
jsr CS.RUN.PRINT.JMP
|
|
|
|
|
bcs .99
|
2018-12-19 16:45:09 +00:00
|
|
|
|
|
2021-07-28 16:50:59 +00:00
|
|
|
|
.5 jsr GetNextEntry
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bcc .1
|
2018-12-19 16:45:09 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bit bPass2
|
2021-07-28 16:50:59 +00:00
|
|
|
|
bmi .6
|
2018-12-19 16:45:09 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jsr CS.RUN.CheckRoot
|
|
|
|
|
beq .6
|
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
jsr ResetSrcDir
|
|
|
|
|
bcs .99
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
dec bPass2
|
|
|
|
|
bra .1
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-28 16:50:59 +00:00
|
|
|
|
.6 bit bLong
|
|
|
|
|
bmi .7
|
2016-10-26 20:41:54 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jsr CS.RUN.LineBufFlush
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bcs .99
|
2016-10-26 20:41:54 +00:00
|
|
|
|
|
2021-07-28 16:50:59 +00:00
|
|
|
|
.7 jsr LeaveSubDir
|
|
|
|
|
bcs .8
|
2016-10-30 18:19:43 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
jsr BasePath..
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
jsr CS.RUN.ENTER.MSG
|
|
|
|
|
bcs .99
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
jsr GetNextEntry
|
|
|
|
|
jmp CS.RUN.LOOP
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-28 16:50:59 +00:00
|
|
|
|
.8 lda #0
|
2021-07-25 14:03:41 +00:00
|
|
|
|
sec
|
|
|
|
|
.99 rts
|
2016-10-13 16:00:27 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.CheckRoot
|
|
|
|
|
>LDA.G hSrcBasePath
|
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
ldy #1
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-29 14:06:28 +00:00
|
|
|
|
CS.RUN.PRINT.JMP
|
2021-07-25 14:03:41 +00:00
|
|
|
|
jmp (J.CS.RUN.PRINT,x)
|
2020-02-29 14:06:28 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.PRINT.REG
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bit bPass2
|
|
|
|
|
bpl .8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bit bLong
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bmi CS.RUN.PRINT.REGEXT
|
|
|
|
|
|
|
|
|
|
ldy #COLOR.REG
|
|
|
|
|
jsr CS.RUN.SetColorY
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bit bColumn
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bmi CS.RUN.PRINT.REG1
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bit bFullPath
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bpl .2
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jsr CS.RUN.SrcPathOut
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bra CS.RUN.PRINT.REG1
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.2 ldx #MAX.COLW
|
|
|
|
|
clc
|
|
|
|
|
jsr CS.RUN.FN2LineBuf
|
|
|
|
|
jmp CS.RUN.IncColCnt
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
.9 rts
|
2020-02-29 14:06:28 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.PRINT.REGEXT
|
|
|
|
|
jsr CS.RUN.PrintMod
|
|
|
|
|
jsr CS.RUN.PrintUidGid
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
>PUSHW ZPLineBufPtr
|
|
|
|
|
>PUSHW L.MSG.REGEXT
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
ldy #S.STAT.SIZE+3
|
|
|
|
|
ldx #4
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.2 lda (ZPFileStat),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
|
|
|
|
dex
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bne .2
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
>PUSHBI 4
|
|
|
|
|
jsr CS.RUN.ToLineBuf
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jsr CS.RUN.PrintTypeAux
|
|
|
|
|
jsr CS.RUN.PrintDates
|
2016-10-30 07:58:08 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
ldy #COLOR.REG
|
|
|
|
|
jsr CS.RUN.SetColorY
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.PRINT.REG1
|
|
|
|
|
ldx #0
|
|
|
|
|
clc
|
|
|
|
|
jsr CS.RUN.FN2LineBuf
|
|
|
|
|
jmp CS.RUN.LineBufOut
|
2016-10-13 16:00:27 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-19 16:45:09 +00:00
|
|
|
|
CS.RUN.PRINT.DIR
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bit bPass2
|
|
|
|
|
bmi .8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bit bLong
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bmi CS.RUN.PRINT.DIREXT
|
|
|
|
|
|
|
|
|
|
ldy #COLOR.DIR
|
|
|
|
|
jsr CS.RUN.SetColorY
|
2016-10-19 15:47:53 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bit bColumn
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bmi CS.RUN.PRINT.DIR1
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bit bFullPath
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bpl .2
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jsr CS.RUN.SrcPathOut
|
|
|
|
|
bra CS.RUN.PRINT.DIR1
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.2 ldx #MAX.COLW-1
|
|
|
|
|
sec
|
|
|
|
|
jsr CS.RUN.FN2LineBuf
|
|
|
|
|
jsr CS.RUN.IncColCnt
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bcs .9
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jmp CS.RUN.PRINT.DIREND
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
.9 rts
|
2019-12-06 13:50:32 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.PRINT.DIREXT
|
|
|
|
|
jsr CS.RUN.PrintMod
|
|
|
|
|
jsr CS.RUN.PrintUidGid
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
>LDYA L.MSG.DIREXT
|
|
|
|
|
jsr CS.RUN.LineBufYAOut
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jsr CS.RUN.PrintDates
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
ldy #COLOR.DIR
|
|
|
|
|
jsr CS.RUN.SetColorY
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.PRINT.DIR1
|
|
|
|
|
ldx #0
|
|
|
|
|
sec
|
|
|
|
|
jsr CS.RUN.FN2LineBuf
|
|
|
|
|
jsr CS.RUN.LineBufOut
|
|
|
|
|
bcs .9
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jmp CS.RUN.PRINT.DIREND
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.9 rts
|
2016-10-13 16:00:27 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-29 14:06:28 +00:00
|
|
|
|
CS.RUN.PRINT.CDEV
|
2021-07-25 14:03:41 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2020-02-29 14:06:28 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.PRINT.BDEV
|
2021-08-10 10:20:41 +00:00
|
|
|
|
clc
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bit bPass2
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bmi .9
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
|
|
|
|
bit bLong
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bmi CS.RUN.PRINT.BDEVEXT
|
|
|
|
|
|
|
|
|
|
ldy #COLOR.BDEV
|
|
|
|
|
jsr CS.RUN.SetColorY
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bit bColumn
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bmi CS.RUN.PRINT.BDEV1
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bit bFullPath
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bpl .2
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jsr CS.RUN.SrcPathOut
|
|
|
|
|
bra CS.RUN.PRINT.BDEV2
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.2 lda #'/'
|
|
|
|
|
jsr CS.RUN.LineBufCOut
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
ldx #MAX.COLW-1
|
|
|
|
|
sec
|
|
|
|
|
jsr CS.RUN.FN2LineBuf
|
|
|
|
|
jsr CS.RUN.IncColCnt
|
|
|
|
|
bcc CS.RUN.PRINT.BDEVEND
|
2021-01-12 21:14:13 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.9 rts
|
2020-02-29 14:06:28 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.PRINT.BDEVEXT
|
|
|
|
|
jsr CS.RUN.PrintMod
|
|
|
|
|
jsr CS.RUN.PrintUidGid
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
>PUSHW ZPLineBufPtr
|
|
|
|
|
>PUSHW L.MSG.BDEVEXT
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
ldy #S.STAT.BLOCKS+1
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
|
|
|
|
dey
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
ldy #S.STAT.P.DEVBLOCKS+1
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
|
|
|
|
dey
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
ldy #S.STAT.P.SLOT
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
|
|
|
|
iny DRIVE
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
|
|
|
|
|
|
|
|
|
>PUSHBI 6
|
|
|
|
|
jsr CS.RUN.ToLineBuf
|
2019-12-06 13:50:32 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jsr CS.RUN.PrintDates
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
ldy #COLOR.BDEV
|
|
|
|
|
jsr CS.RUN.SetColorY
|
2018-12-19 16:45:09 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.PRINT.BDEV1
|
|
|
|
|
lda #'/'
|
|
|
|
|
jsr CS.RUN.LineBufCOut
|
|
|
|
|
|
|
|
|
|
CS.RUN.PRINT.BDEV2
|
|
|
|
|
ldx #0
|
|
|
|
|
sec
|
|
|
|
|
jsr CS.RUN.FN2LineBuf
|
|
|
|
|
jsr CS.RUN.LineBufOut
|
|
|
|
|
bcc CS.RUN.PRINT.BDEVEND
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.PRINT.LNK
|
|
|
|
|
CS.RUN.PRINT.DSOCK
|
|
|
|
|
CS.RUN.PRINT.SSOCK
|
|
|
|
|
CS.RUN.PRINT.PIPE
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.PRINT.DIREND
|
|
|
|
|
CS.RUN.PRINT.BDEVEND
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bit bRecurse
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bpl .8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
lda (ZPFileName)
|
|
|
|
|
cmp #'.'
|
|
|
|
|
bne .7
|
|
|
|
|
|
|
|
|
|
ldy #1
|
|
|
|
|
lda (ZPFileName),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
cmp #'.'
|
|
|
|
|
bne .7
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPFileName),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
bit bLong
|
|
|
|
|
bmi .7
|
|
|
|
|
|
|
|
|
|
jsr CS.RUN.LineBufFlush
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
.7 >LDYA ZPFileName
|
2021-07-25 14:03:41 +00:00
|
|
|
|
jsr EnterSubDirYA
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bcs .9
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
jmp CS.RUN.ENTER.MSG
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
.9 rts
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.ENTER.MSG
|
|
|
|
|
ldy #COLOR.ENTER
|
|
|
|
|
jsr CS.RUN.SetColorY
|
|
|
|
|
|
|
|
|
|
>LDYA L.MSG.ENTER
|
|
|
|
|
jsr CS.RUN.LineBufYAOut
|
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
ldy #hSrcBasePath
|
|
|
|
|
lda (pData),y
|
|
|
|
|
>SYSCALL GetMemPtr
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jsr CS.RUN.LineBufYAOut
|
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
jsr CS.RUN.SetColorY
|
|
|
|
|
|
|
|
|
|
jmp CS.RUN.LineBufOut
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.PrintMod ldy #S.STAT.MODE+1
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
lsr
|
|
|
|
|
php C = RU
|
|
|
|
|
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
tax
|
|
|
|
|
lda TYPES,x
|
|
|
|
|
jsr CS.RUN.LineBufCOut
|
|
|
|
|
|
|
|
|
|
ldy #S.STAT.MODE
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
|
|
|
|
|
ldx #8
|
|
|
|
|
|
|
|
|
|
plp C = RU
|
|
|
|
|
|
|
|
|
|
.1 pha
|
|
|
|
|
lda #'-'
|
|
|
|
|
bcc .2
|
|
|
|
|
|
|
|
|
|
lda ACCESS,x
|
|
|
|
|
|
|
|
|
|
.2 jsr CS.RUN.LineBufCOut
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
asl
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
rts
|
2020-02-14 07:21:56 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.PrintUidGid
|
2021-07-25 14:03:41 +00:00
|
|
|
|
ldy #S.STAT.UID
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
>PUSHW ZPPWBuf
|
|
|
|
|
>SYSCALL GetPWUID
|
|
|
|
|
bcs .2
|
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jsr .8
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bra .3
|
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.2 ldy #S.STAT.UID+1
|
|
|
|
|
jsr .7
|
|
|
|
|
*--------------------------------------
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.3 ldy #S.STAT.GID
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
>PUSHW ZPPWBuf
|
|
|
|
|
>SYSCALL GetGRGID
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bcc .8
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
ldy #S.STAT.GID+1
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.7 >PUSHW ZPLineBufPtr
|
2021-07-25 14:03:41 +00:00
|
|
|
|
>PUSHW L.FMT.int16
|
|
|
|
|
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
>PUSHA
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
>PUSHBI 2
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jmp CS.RUN.ToLineBuf
|
|
|
|
|
|
|
|
|
|
.8 >LDYA ZPPWBuf
|
|
|
|
|
ldx #5
|
|
|
|
|
jmp CS.RUN.LineBufYAOutX
|
2019-12-06 13:50:32 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.PrintDates
|
|
|
|
|
ldy #S.STAT.MTIME+S.TIME.MONTH
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
bne .1
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jsr .8
|
|
|
|
|
bra .2
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.1 lda #S.STAT.MTIME
|
|
|
|
|
jsr .5
|
|
|
|
|
|
|
|
|
|
.2 ldy #S.STAT.CTIME+S.TIME.MONTH
|
2021-07-25 14:03:41 +00:00
|
|
|
|
lda (ZPFileStat),y
|
2021-08-10 10:20:41 +00:00
|
|
|
|
beq .8
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
lda #S.STAT.CTIME
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.5 clc
|
|
|
|
|
adc ZPFileStat
|
|
|
|
|
sta ZPPtr1
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
adc ZPFileStat+1
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
|
|
|
|
|
>PUSHW ZPLineBufPtr
|
|
|
|
|
|
|
|
|
|
ldx #0
|
|
|
|
|
|
|
|
|
|
ldy #S.TIME.DAY
|
|
|
|
|
|
|
|
|
|
.6 lda (ZPPtr1),y
|
|
|
|
|
cmp (pData),y TIME.SysTime
|
|
|
|
|
bne .7
|
|
|
|
|
|
|
|
|
|
dey S.TIME.MONTH,S.TIME.YEAR,S.TIME.CENTURY
|
|
|
|
|
bpl .6
|
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
|
inx Select L.FMT.Time
|
|
|
|
|
|
|
|
|
|
.7 >PUSHW L.FMT.Date,x
|
|
|
|
|
|
|
|
|
|
>PUSHW ZPPtr1
|
2021-07-25 14:03:41 +00:00
|
|
|
|
>SYSCALL StrFTime
|
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
lda #10
|
|
|
|
|
jmp CS.RUN.LineBufPtrAddA
|
|
|
|
|
|
|
|
|
|
.8 >LDYA L.MSG.NODATE
|
|
|
|
|
jmp CS.RUN.LineBufYAOut
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.PrintTypeAux
|
|
|
|
|
ldy #S.STAT.P.TYPE
|
2021-07-25 14:03:41 +00:00
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
ldy #PRODOS.FT.TXT-PRODOS.FT.HEX-1
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.1 cmp PRODOS.FT.HEX,y
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
dey
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
pha
|
|
|
|
|
lda #'$'
|
|
|
|
|
jsr CS.RUN.LineBufCOut
|
|
|
|
|
pla
|
|
|
|
|
jsr CS.RUN.LineBufHOut
|
|
|
|
|
bra .3
|
|
|
|
|
|
|
|
|
|
.2 tya
|
|
|
|
|
asl
|
|
|
|
|
asl CC
|
|
|
|
|
adc L.PRODOS.FT.TXT
|
2021-07-25 14:03:41 +00:00
|
|
|
|
tay
|
2021-08-10 10:20:41 +00:00
|
|
|
|
|
|
|
|
|
lda L.PRODOS.FT.TXT+1
|
2021-07-25 14:03:41 +00:00
|
|
|
|
adc #0
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jsr CS.RUN.LineBufYAOut
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.3 lda #C.SPACE
|
|
|
|
|
jsr CS.RUN.LineBufCOut
|
2019-11-29 15:36:54 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
ldy #S.STAT.P.AUXTYPE+1
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
ora (ZPFileStat),y
|
|
|
|
|
beq .4
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
txa
|
|
|
|
|
jsr CS.RUN.LineBufHOut
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
jsr CS.RUN.LineBufHOut
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
ldx #0
|
|
|
|
|
bra .5
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.4 ldx #4
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.5 lda #C.SPACE
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.6 jsr CS.RUN.LineBufCOut
|
|
|
|
|
dex
|
|
|
|
|
bpl .6
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
|
|
|
|
rts
|
2019-11-29 15:36:54 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.FN2LineBuf
|
|
|
|
|
phx X = MaxLen
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
php
|
2021-07-25 14:03:41 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
>LDYA ZPFileName
|
|
|
|
|
jsr CS.RUN.LineBufYAOutX Y = output count
|
|
|
|
|
|
|
|
|
|
plp
|
|
|
|
|
bcc .1
|
|
|
|
|
|
|
|
|
|
lda #'/'
|
|
|
|
|
jsr CS.RUN.LineBufCOut
|
|
|
|
|
|
|
|
|
|
.1 pla MaxLen was 0, no extra SPACE needed
|
|
|
|
|
beq .3
|
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
beq .3 all chars printed, no more SPACE
|
|
|
|
|
|
|
|
|
|
lda #C.SPACE
|
|
|
|
|
|
|
|
|
|
.2 jsr CS.RUN.LineBufCOut
|
|
|
|
|
dex
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
.3 ldy #0 Reset Color
|
2016-10-28 09:37:57 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.SetColorY
|
|
|
|
|
bit bToFile
|
|
|
|
|
bmi CS.RUN.IncColCnt.8
|
2021-07-05 00:12:18 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
>PUSHW ZPLineBufPtr
|
|
|
|
|
>PUSHW L.MSG.SETCOLOR
|
|
|
|
|
tya
|
|
|
|
|
>PUSHA
|
|
|
|
|
>PUSHBI 1
|
2021-07-05 00:12:18 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.ToLineBuf
|
|
|
|
|
>SYSCALL SPrintF
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.LineBufPtrAddY
|
|
|
|
|
tya
|
|
|
|
|
CS.RUN.LineBufPtrAddA
|
|
|
|
|
clc
|
|
|
|
|
adc ZPLineBufPtr
|
|
|
|
|
sta ZPLineBufPtr
|
|
|
|
|
bcc .8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
inc ZPLineBufPtr+1
|
2021-07-05 00:12:18 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.IncColCnt
|
|
|
|
|
inc ColCount
|
|
|
|
|
lda ColCount
|
|
|
|
|
cmp #MAX.COLC
|
|
|
|
|
beq CS.RUN.LineBufFlush1
|
2020-07-21 05:26:07 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.IncColCnt.8
|
2021-07-25 14:03:41 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2021-07-05 00:12:18 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.LineBufFlush
|
|
|
|
|
lda ColCount
|
|
|
|
|
beq CS.RUN.IncColCnt.8
|
2021-07-24 20:42:23 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.LineBufFlush1
|
|
|
|
|
stz ColCount
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.LineBufOut
|
|
|
|
|
lda #C.CR
|
|
|
|
|
jsr CS.RUN.LineBufCOUT
|
|
|
|
|
bit bToFile
|
|
|
|
|
bmi .1
|
2019-12-06 13:50:32 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
lda #C.LF
|
|
|
|
|
jsr CS.RUN.LineBufCOUT
|
2018-08-11 10:57:57 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.1 lda #0
|
|
|
|
|
sta (ZPLineBufPtr)
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
ldy #S.PS.hStdOut
|
|
|
|
|
lda (pPS),y
|
|
|
|
|
>PUSHA
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
>LDYA ZPLineBuf
|
|
|
|
|
>STYA ZPLineBufPtr
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
>PUSHYA
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
>SYSCALL fputs
|
2021-07-25 14:03:41 +00:00
|
|
|
|
rts
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.RUN.SrcPathOut
|
|
|
|
|
ldy #hSrcBasePath
|
|
|
|
|
lda (pData),y
|
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.LineBufYAOut
|
|
|
|
|
ldx #0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.LineBufYAOutX
|
|
|
|
|
>STYA ZPPtr1 X = MaxLen
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
ldy #$ff
|
|
|
|
|
|
|
|
|
|
.1 iny
|
|
|
|
|
lda (ZPPtr1),y
|
2021-07-25 14:03:41 +00:00
|
|
|
|
beq .8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jsr CS.RUN.LineBufCOut
|
|
|
|
|
dex
|
2021-07-25 14:03:41 +00:00
|
|
|
|
bne .1
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.LineBufHOut
|
2021-07-25 14:03:41 +00:00
|
|
|
|
pha
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
2021-08-10 10:20:41 +00:00
|
|
|
|
jsr .1
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
pla
|
|
|
|
|
and #$0F
|
2021-08-10 10:20:41 +00:00
|
|
|
|
|
|
|
|
|
.1 ora #$30
|
2021-07-25 14:03:41 +00:00
|
|
|
|
cmp #'9'+1
|
2021-08-10 10:20:41 +00:00
|
|
|
|
bcc CS.RUN.LineBufCOut
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
adc #6
|
2021-08-10 10:20:41 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.LineBufCOut
|
|
|
|
|
sta (ZPLineBufPtr)
|
|
|
|
|
inc ZPLineBufPtr
|
|
|
|
|
bne .8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
inc ZPLineBufPtr+1
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.DOEVENT sec
|
2021-07-25 14:03:41 +00:00
|
|
|
|
rts
|
2016-10-20 16:04:35 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
CS.QUIT jsr LeaveSubDir
|
|
|
|
|
bcc CS.QUIT
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
ldy #hFilter
|
|
|
|
|
lda (pData),y
|
|
|
|
|
jsr .7
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
lda hPWBuf
|
|
|
|
|
jsr .7
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
lda hLineBuf
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.7 beq .8
|
2021-06-10 14:00:05 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2017-10-10 15:40:23 +00:00
|
|
|
|
|
2021-08-10 10:20:41 +00:00
|
|
|
|
.8 clc
|
2021-07-25 14:03:41 +00:00
|
|
|
|
rts
|
2017-10-10 15:40:23 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-25 14:03:41 +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
|
|
|
|
*--------------------------------------
|
2021-07-25 14:03:41 +00:00
|
|
|
|
OptionList .AS "ACFLRacflr"
|
|
|
|
|
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"
|
2021-08-01 13:45:15 +00:00
|
|
|
|
.AS " -A : Show all files\r\n"
|
2021-06-12 00:20:31 +00:00
|
|
|
|
.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-07-25 14:03:41 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
MSG.ENTER .AZ "Directory:"
|
2021-07-05 00:12:18 +00:00
|
|
|
|
*--------------------------------------
|
2021-08-10 10:20:41 +00:00
|
|
|
|
MSG.REGEXT .AZ " %10u "
|
|
|
|
|
MSG.DIREXT .AZ " <dir> "
|
|
|
|
|
MSG.BDEVEXT .AZ " %5D/%5D s%dd%d "
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MSG.SETCOLOR .AZ "\e[1;%dm"
|
2021-07-28 16:50:59 +00:00
|
|
|
|
PRODOS.FT.HEX .HS 0406FAFCFDCBCCCFFF
|
2021-07-05 00:12:18 +00:00
|
|
|
|
PRODOS.FT.TXT .AZ "txt"
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.AZ "bin"
|
|
|
|
|
.AZ "asm"
|
|
|
|
|
.AZ "bas"
|
|
|
|
|
.AZ "var"
|
|
|
|
|
.AZ "pix"
|
|
|
|
|
.AZ "fon"
|
|
|
|
|
.AZ "pak"
|
|
|
|
|
.AZ "sys"
|
2021-08-10 10:20:41 +00:00
|
|
|
|
MSG.NODATE .AZ "<no-date> "
|
|
|
|
|
FMT.Date .AZ "%d-%b-%y "
|
|
|
|
|
FMT.Time .AZ " %H:%M:%S "
|
2021-07-25 14:03:41 +00:00
|
|
|
|
FMT.int16 .AZ "%6D"
|
2021-08-10 10:20:41 +00:00
|
|
|
|
TYPES .AS "-dcblssp"
|
2021-07-25 14:03:41 +00:00
|
|
|
|
ACCESS .AS "xwrxwrxwr"
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
2015-03-14 21:47:37 +00:00
|
|
|
|
DS.START
|
2021-07-05 00:12:18 +00:00
|
|
|
|
TIME.SysTime .BS S.TIME
|
2017-09-21 15:29:45 +00:00
|
|
|
|
|
2021-07-25 14:03:41 +00:00
|
|
|
|
.INB usr/src/shared/x.fileenum.g
|
|
|
|
|
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
|