mirror of https://github.com/A2osX/A2osX.git
Kernel 0.94
This commit is contained in:
parent
f8c1e12990
commit
2ae41aa860
Binary file not shown.
116
BIN/ATTR.S.txt
116
BIN/ATTR.S.txt
|
@ -22,10 +22,9 @@ ZPPtr2 .BS 2
|
|||
ZPFileName .BS 2
|
||||
ZPFileStat .BS 2
|
||||
ZPFullPath .BS 2
|
||||
ZPMode .BS 2
|
||||
|
||||
ArgIndex .BS 1
|
||||
StrMode .BS 1
|
||||
bRead .BS 1
|
||||
bWrite .BS 1
|
||||
ZS.END .ED
|
||||
*--------------------------------------
|
||||
* File Header (16 Bytes)
|
||||
|
@ -48,6 +47,8 @@ CS.START cld
|
|||
.DA CS.DOEVENT
|
||||
.DA CS.QUIT
|
||||
L.MSG.USAGE .DA MSG.USAGE
|
||||
L.MSG.DIRDUMP .DA MSG.DIRDUMP
|
||||
L.MSG.FILEDUMP .DA MSG.FILEDUMP
|
||||
L.MSG.DIR .DA MSG.DIR
|
||||
L.MSG.FILE .DA MSG.FILE
|
||||
L.MSG.OK .DA MSG.OK
|
||||
|
@ -89,14 +90,7 @@ CS.RUN inc ArgIndex
|
|||
sta (pData),y
|
||||
bra CS.RUN
|
||||
*--------------------------------------
|
||||
.4 lda StrMode
|
||||
bne .5
|
||||
|
||||
lda ArgIndex
|
||||
sta StrMode
|
||||
bra CS.RUN
|
||||
|
||||
.5 >LDA.G hSrcBasePath
|
||||
.4 >LDA.G hSrcBasePath
|
||||
bne .9
|
||||
|
||||
>LDYA ZPPtr1
|
||||
|
@ -104,11 +98,7 @@ CS.RUN inc ArgIndex
|
|||
bcc CS.RUN
|
||||
rts
|
||||
|
||||
.8 lda StrMode
|
||||
beq .9
|
||||
|
||||
|
||||
>LDA.G hSrcBasePath
|
||||
.8 >LDA.G hSrcBasePath
|
||||
beq .9
|
||||
|
||||
>LDYAI 256
|
||||
|
@ -203,6 +193,11 @@ CS.RUN.DIR lda (ZPFileName)
|
|||
bcs .8
|
||||
|
||||
jsr CS.RUN.GetFilePath
|
||||
bcs .9
|
||||
|
||||
bit bWrite
|
||||
bpl .2
|
||||
|
||||
>PUSHW L.MSG.DIR
|
||||
>PUSHW ZPFullPath
|
||||
>PUSHBI 2
|
||||
|
@ -212,9 +207,20 @@ CS.RUN.DIR lda (ZPFileName)
|
|||
|
||||
|
||||
jsr CS.RUN.CheckErr
|
||||
bcc .7
|
||||
|
||||
rts
|
||||
|
||||
.2 >PUSHW L.MSG.DIRDUMP
|
||||
|
||||
jsr Access2CSTR
|
||||
|
||||
>PUSHW ZPFullPath
|
||||
>PUSHBI 4
|
||||
>SYSCALL PrintF
|
||||
bcs .9
|
||||
|
||||
>LDA.G bRecurse
|
||||
.7 >LDA.G bRecurse
|
||||
bpl .8
|
||||
|
||||
>LDYA ZPFileName
|
||||
|
@ -223,23 +229,38 @@ CS.RUN.DIR lda (ZPFileName)
|
|||
.8 clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.FILE jsr CS.RUN.GetFilePath
|
||||
CS.RUN.FILE jsr FilterMatch
|
||||
bcs .8
|
||||
|
||||
jsr CS.RUN.GetFilePath
|
||||
bcs .9
|
||||
|
||||
bit bWrite
|
||||
bpl .2
|
||||
|
||||
>PUSHW L.MSG.FILE
|
||||
>PUSHW ZPFullPath
|
||||
>PUSHBI 2
|
||||
>SYSCALL PrintF
|
||||
bcs .9
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsr CS.RUN.CheckErr
|
||||
bcs .9
|
||||
rts
|
||||
|
||||
.2 >PUSHW L.MSG.FILEDUMP
|
||||
|
||||
|
||||
|
||||
clc
|
||||
jsr Access2CSTR
|
||||
|
||||
>PUSHW ZPFullPath
|
||||
>PUSHBI 4
|
||||
>SYSCALL PrintF
|
||||
.9 rts
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.CheckErr bcs .1
|
||||
>LDYA L.MSG.OK
|
||||
|
@ -270,6 +291,39 @@ CS.RUN.GetFilePath
|
|||
>SYSCALL StrCat
|
||||
rts
|
||||
*--------------------------------------
|
||||
Access2CSTR ldy #S.STAT.P.ACCESS
|
||||
lda (ZPFileStat),y
|
||||
|
||||
ldy #ATTR+15
|
||||
ldx #15
|
||||
|
||||
.1 lsr
|
||||
pha
|
||||
bcc .2
|
||||
|
||||
lda ATTRS,x
|
||||
sta (pData),y
|
||||
dex
|
||||
dey
|
||||
lda ATTRS,x
|
||||
sta (pData),y
|
||||
bra .3
|
||||
|
||||
.2 lda #'-'
|
||||
sta (pData),y
|
||||
dex
|
||||
dey
|
||||
sta (pData),y
|
||||
|
||||
.3 pla
|
||||
|
||||
dey
|
||||
dex
|
||||
bpl .1
|
||||
|
||||
>PUSHEA.G ATTR
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.DOEVENT sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
@ -296,12 +350,12 @@ ATTRS .AS "DeReBn----InWrRd"
|
|||
MSG.USAGE .AS "Usage : ATTR File(s) (*,? wildcards allowed)\r\n"
|
||||
.AS " -C : Continue on error\r\n"
|
||||
.AS " -R : Recurse subdirectories\r\n"
|
||||
.AZ "+|-De : Destroy enable\r\n"
|
||||
.AS "+|-De : Destroy enable\r\n"
|
||||
.AS "+|-Re : Rename enable\r\n"
|
||||
.AZ "+|-Bn : Backup needed\r\n"
|
||||
.AZ "+|-In : Invisible\r\n"
|
||||
.AZ "+|-Wr : Write enable\r\n"
|
||||
.AS "+|-Rd : Read enable\r\n"
|
||||
.AS "+|-Bn : Backup needed\r\n"
|
||||
.AS "+|-In : Invisible\r\n"
|
||||
.AS "+|-Wr : Write enable\r\n"
|
||||
.AZ "+|-Rd : Read enable\r\n"
|
||||
*--------------------------------------
|
||||
* 7 6 5 4 3 2 1 0
|
||||
* +--+--+--+--+--+--+--+--+
|
||||
|
@ -318,6 +372,8 @@ MSG.USAGE .AS "Usage : ATTR File(s) (*,? wildcards allowed)\r\n"
|
|||
*--------------------------------------
|
||||
MSG.OK .AZ "[OK]"
|
||||
MSG.ERR .AZ "[%h]\r\n"
|
||||
MSG.DIRDUMP .AZ "%s %s/\r\n"
|
||||
MSG.FILEDUMP .AZ "%s %s\r\n"
|
||||
MSG.DIR .AZ "Dir :%s..."
|
||||
MSG.FILE .AZ "File:%s..."
|
||||
*--------------------------------------
|
||||
|
@ -330,6 +386,8 @@ bRecurse .BS 1
|
|||
bPause .BS 1
|
||||
hSrcFullPath .BS 1
|
||||
|
||||
ATTR .BS 17
|
||||
|
||||
.INB usr/src/bin/x.fileenum.g
|
||||
|
||||
DS.END
|
||||
|
|
|
@ -215,7 +215,8 @@ K.FGetS jsr PFT.CheckNodeA
|
|||
|
||||
.2 lda K.IOBuf
|
||||
cmp #C.LF Discard any leading LF from a previous CR/LF
|
||||
beq .8 returns as empty string
|
||||
* beq .8 returns as empty string
|
||||
beq .1
|
||||
|
||||
cmp #C.CR
|
||||
beq .8 empty string
|
||||
|
|
Loading…
Reference in New Issue