mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-29 02:49:54 +00:00
DU.S: Code cleanup. Fix usage text.
This commit is contained in:
parent
91906ca42b
commit
0c510140da
111
BIN/DU.S.TXT
111
BIN/DU.S.TXT
@ -12,25 +12,25 @@
|
|||||||
.INB inc/mli.i
|
.INB inc/mli.i
|
||||||
.INB inc/mli.e.i
|
.INB inc/mli.e.i
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
X.ENTER.SUBDIR .EQ 1
|
X.ENTER.SUBDIR .EQ 1
|
||||||
X.COPY.TO.DEST .EQ 0
|
X.COPY.TO.DEST .EQ 0
|
||||||
X.DELETE.SOURCE .EQ 0
|
X.DELETE.SOURCE .EQ 0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.DUMMY
|
.DUMMY
|
||||||
.OR ZPBIN
|
.OR ZPBIN
|
||||||
ZS.START
|
ZS.START
|
||||||
ZPPtr1 .BS 2
|
ZPPtr1 .BS 2
|
||||||
ZPPtr2 .BS 2
|
ZPPtr2 .BS 2
|
||||||
ZPFileName .BS 2
|
ZPFileName .BS 2
|
||||||
ZPFileStat .BS 2
|
ZPFileStat .BS 2
|
||||||
ZPPW .BS 2
|
ZPPW .BS 2
|
||||||
hLineBuf .BS 1
|
hLineBuf .BS 1
|
||||||
ZPLineBuf .BS 2
|
ZPLineBuf .BS 2
|
||||||
bPass2 .BS 1
|
bPass2 .BS 1
|
||||||
ZS.END
|
ZS.END
|
||||||
.ED
|
.ED
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* File Header (16 Bytes)
|
* File Header (16 Bytes)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.START cld
|
CS.START cld
|
||||||
jmp (.1,x)
|
jmp (.1,x)
|
||||||
@ -68,8 +68,7 @@ J.CS.RUN.PRINT .DA CS.RUN.PRINT.REG
|
|||||||
.DA CS.RUN.PRINT.CDEV
|
.DA CS.RUN.PRINT.CDEV
|
||||||
.DA 0
|
.DA 0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.INIT
|
CS.INIT clc
|
||||||
clc
|
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN
|
CS.RUN
|
||||||
@ -181,7 +180,7 @@ CS.RUN.LOOP stz bPass2
|
|||||||
bit bPass2
|
bit bPass2
|
||||||
bmi .9
|
bmi .9
|
||||||
|
|
||||||
jsr MyResetSrcDir
|
jsr ResetSrcDir
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
dec bPass2
|
dec bPass2
|
||||||
@ -204,7 +203,7 @@ CS.RUN.LOOP stz bPass2
|
|||||||
|
|
||||||
.98
|
.98
|
||||||
jsr CS.RUN.PrintTotSumm
|
jsr CS.RUN.PrintTotSumm
|
||||||
jsr CS.RUN.NewLine.1
|
jsr CS.RUN.NewLine
|
||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
sec
|
sec
|
||||||
@ -265,13 +264,12 @@ CS.RUN.PRINT.REG
|
|||||||
>PUSHBI 2
|
>PUSHBI 2
|
||||||
>SYSCALL PrintF
|
>SYSCALL PrintF
|
||||||
bcs .9
|
bcs .9
|
||||||
jmp CS.RUN.NewLine.1
|
jmp CS.RUN.NewLine
|
||||||
|
|
||||||
.8 clc
|
.8 clc
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.PRINT.DIR
|
CS.RUN.PRINT.DIR bit bPass2
|
||||||
bit bPass2
|
|
||||||
bmi .8
|
bmi .8
|
||||||
|
|
||||||
lda (ZPFileName)
|
lda (ZPFileName)
|
||||||
@ -284,12 +282,10 @@ CS.RUN.PRINT.DIR
|
|||||||
.8 clc
|
.8 clc
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.PRINT.CDEV
|
CS.RUN.PRINT.CDEV clc
|
||||||
clc
|
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.PRINT.BDEV
|
CS.RUN.PRINT.BDEV bit bPass2
|
||||||
bit bPass2
|
|
||||||
bmi .8
|
bmi .8
|
||||||
|
|
||||||
>PUSHW L.MSG.BDEVEXT
|
>PUSHW L.MSG.BDEVEXT
|
||||||
@ -312,7 +308,7 @@ CS.RUN.PRINT.BDEV
|
|||||||
>SYSCALL PrintF
|
>SYSCALL PrintF
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
jsr CS.RUN.NewLine.1
|
jsr CS.RUN.NewLine
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>LDYA ZPFileName
|
>LDYA ZPFileName
|
||||||
@ -340,8 +336,7 @@ CS.RUN.PrintTotSumm >PUSHW L.MSG.TOTSUMM
|
|||||||
>SYSCALL PrintF
|
>SYSCALL PrintF
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.PrintCwd
|
CS.RUN.PrintCwd >PUSHW L.MSG.CWD
|
||||||
>PUSHW L.MSG.CWD
|
|
||||||
ldy #hSrcBasePath
|
ldy #hSrcBasePath
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
>SYSCALL GetMemPtr
|
>SYSCALL GetMemPtr
|
||||||
@ -350,59 +345,35 @@ CS.RUN.PrintCwd
|
|||||||
>SYSCALL PrintF
|
>SYSCALL PrintF
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.NewLine
|
CS.RUN.NewLine lda #C.CR
|
||||||
CS.RUN.NewLine.1
|
|
||||||
lda #C.CR
|
|
||||||
>SYSCALL PutChar
|
>SYSCALL PutChar
|
||||||
|
|
||||||
* bit bCRLF
|
|
||||||
* bpl CS.RUN.NewLine.8
|
|
||||||
|
|
||||||
lda #C.LF
|
lda #C.LF
|
||||||
>SYSCALL PutChar
|
>SYSCALL PutChar
|
||||||
CS.RUN.NewLine.8
|
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MyResetSrcDir jsr GethDIR Not in Kernel I am building against
|
CS.DOEVENT sec
|
||||||
>SYSCALL CloseDir
|
rts
|
||||||
>LDA.G hSrcBasePath
|
|
||||||
>SYSCALL GetMemPtr
|
|
||||||
>SYSCALL OpenDir
|
|
||||||
bcs .9
|
|
||||||
pha
|
|
||||||
>LDA.G index
|
|
||||||
clc
|
|
||||||
adc #hDIRs-1
|
|
||||||
tay
|
|
||||||
pla
|
|
||||||
sta (pData),y
|
|
||||||
* clc
|
|
||||||
.9 rts
|
|
||||||
*----------------------------------------------
|
|
||||||
|
|
||||||
CS.DOEVENT sec
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
|
||||||
CS.QUIT
|
CS.QUIT
|
||||||
jsr LeaveSubDir
|
jsr LeaveSubDir
|
||||||
bcc CS.QUIT
|
bcc CS.QUIT
|
||||||
>LDA.G hFilter
|
>LDA.G hFilter
|
||||||
beq .3
|
beq .3
|
||||||
>SYSCALL FreeMem
|
>SYSCALL FreeMem
|
||||||
.3 >LDA.G hPW
|
.3 >LDA.G hPW
|
||||||
beq .4
|
beq .4
|
||||||
|
|
||||||
>SYSCALL FreeMem
|
>SYSCALL FreeMem
|
||||||
|
|
||||||
.4 lda hLineBuf
|
.4 lda hLineBuf
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
>SYSCALL FreeMem
|
>SYSCALL FreeMem
|
||||||
|
|
||||||
|
.8 clc
|
||||||
|
rts
|
||||||
|
|
||||||
.8 clc
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB usr/src/shared/x.fileenum.s
|
.INB usr/src/shared/x.fileenum.s
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user