mirror of https://github.com/A2osX/A2osX.git
Kernel 0.94
This commit is contained in:
parent
ee18653120
commit
59045997d8
Binary file not shown.
322
BIN/CHGRP.S.txt
322
BIN/CHGRP.S.txt
|
@ -0,0 +1,322 @@
|
|||
NEW
|
||||
AUTO 3,1
|
||||
.LIST OFF
|
||||
.OP 65C02
|
||||
.OR $2000
|
||||
.TF bin/chgrp
|
||||
*--------------------------------------
|
||||
.INB inc/macros.i
|
||||
.INB inc/a2osx.i
|
||||
.INB inc/mli.i
|
||||
.INB inc/mli.e.i
|
||||
*--------------------------------------
|
||||
X.ENTER.SUBDIR .EQ 0
|
||||
X.COPY.TO.DEST .EQ 0
|
||||
X.DELETE.SOURCE .EQ 0
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR ZPBIN
|
||||
ZS.START
|
||||
ZPPtr1 .BS 2
|
||||
ZPPtr2 .BS 2
|
||||
ZPFileName .BS 2
|
||||
ZPFileStat .BS 2
|
||||
ZPFullPath .BS 2
|
||||
|
||||
ZS.END .ED
|
||||
*--------------------------------------
|
||||
* File Header (16 Bytes)
|
||||
*--------------------------------------
|
||||
CS.START cld
|
||||
jmp (.1,x)
|
||||
.DA #$61 6502,Level 1 (65c02)
|
||||
.DA #1 BIN Layout Version 1
|
||||
.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
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
* Relocation Table
|
||||
*--------------------------------------
|
||||
.1 .DA CS.INIT
|
||||
.DA CS.RUN
|
||||
.DA CS.DOEVENT
|
||||
.DA CS.QUIT
|
||||
L.MSG.USAGE .DA MSG.USAGE
|
||||
L.MSG.DIR .DA MSG.DIR
|
||||
L.MSG.FILE .DA MSG.FILE
|
||||
L.MSG.OK .DA MSG.OK
|
||||
L.MSG.ERR .DA MSG.ERR
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
CS.INIT clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN >INC.G ArgIndex
|
||||
>SYSCALL ArgV
|
||||
bcs .8
|
||||
|
||||
>STYA ZPPtr1
|
||||
lda (ZPPtr1)
|
||||
cmp #'-'
|
||||
bne .4
|
||||
|
||||
ldy #1
|
||||
lda (ZPPtr1),y
|
||||
|
||||
ldx #OptionVars-OptionList-1
|
||||
|
||||
.2 cmp OptionList,x
|
||||
beq .3
|
||||
dex
|
||||
bpl .2
|
||||
|
||||
.9 >PUSHW L.MSG.USAGE
|
||||
>PUSHBI 0
|
||||
>SYSCALL PrintF
|
||||
lda #E.SYN
|
||||
sec
|
||||
.99 rts
|
||||
|
||||
.3 ldy OptionVars,x
|
||||
lda #$80
|
||||
sta (pData),y
|
||||
bra CS.RUN
|
||||
*--------------------------------------
|
||||
.4 >LDA.G GID
|
||||
bne .5
|
||||
|
||||
>LDA.G ArgIndex
|
||||
>STA.G GID
|
||||
bra CS.RUN
|
||||
|
||||
.5 >LDA.G hSrcBasePath
|
||||
bne .9
|
||||
>LDYA ZPPtr1
|
||||
jsr InitSrcDirYA
|
||||
bcc CS.RUN
|
||||
rts
|
||||
|
||||
.8 >LDA.G GID
|
||||
beq .9
|
||||
|
||||
jsr CS.RUN.GetGID
|
||||
bcs .99
|
||||
|
||||
>LDA.G hSrcBasePath
|
||||
beq .9
|
||||
|
||||
>LDYAI 256
|
||||
>SYSCALL GetMem
|
||||
bcs .99
|
||||
|
||||
>STYA ZPFullPath
|
||||
txa
|
||||
>STA.G hSrcFullPath
|
||||
*--------------------------------------
|
||||
CS.RUN.LOOP ldy #S.PS.hStdIn
|
||||
lda (pPS),y
|
||||
>SYSCALL feof
|
||||
bcs .99
|
||||
|
||||
tay
|
||||
bne .1
|
||||
|
||||
>SYSCALL GetChar
|
||||
bcs .99
|
||||
|
||||
cmp #$03 Ctrl-C
|
||||
beq .99 Abort....
|
||||
|
||||
cmp #$13 Ctrl-S
|
||||
bne .1
|
||||
|
||||
>LDA.G bPause
|
||||
eor #$ff
|
||||
sta (pData),y
|
||||
bne CS.RUN.LOOP
|
||||
|
||||
.1 >LDA.G bPause
|
||||
bne CS.RUN.LOOP Pause...
|
||||
*--------------------------------------
|
||||
jsr GetEntry
|
||||
bcs CS.RUN.LEAVE
|
||||
|
||||
ldy #S.STAT.MODE+1
|
||||
lda (ZPFileStat),y
|
||||
and #$70
|
||||
bne .5 REG file ?
|
||||
|
||||
jsr CS.RUN.FILE
|
||||
bcc CS.RUN.NEXT
|
||||
rts
|
||||
|
||||
.5 cmp /S.STAT.MODE.DIR DIR ?
|
||||
bne .6
|
||||
|
||||
jsr CS.RUN.DIR
|
||||
bcc CS.RUN.NEXT
|
||||
rts
|
||||
|
||||
.6 lda #MLI.E.UNSUPST
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.NEXT jsr GetNextEntry
|
||||
bcc CS.RUN.LOOP
|
||||
|
||||
CS.RUN.LEAVE jsr LeaveSubDir
|
||||
bcs .90
|
||||
|
||||
jsr BasePath..
|
||||
|
||||
jmp CS.RUN.NEXT
|
||||
|
||||
.90 lda #0
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.DIR lda (ZPFileName)
|
||||
cmp #'.'
|
||||
bne .1
|
||||
|
||||
ldy #1
|
||||
lda (ZPFileName),y
|
||||
beq .8 skip "."
|
||||
|
||||
cmp #'.'
|
||||
bne .1
|
||||
|
||||
iny
|
||||
lda (ZPFileName),y
|
||||
beq .8 skip ".."
|
||||
|
||||
.1 jsr FilterMatch
|
||||
bcc .2
|
||||
|
||||
.8 clc
|
||||
.9 rts
|
||||
|
||||
.2 jsr CS.RUN.GetFilePath
|
||||
>PUSHW L.MSG.DIR
|
||||
>PUSHW ZPFullPath
|
||||
>PUSHBI 2
|
||||
>SYSCALL PrintF
|
||||
bcs .9
|
||||
|
||||
>PUSHW ZPFullPath
|
||||
>PUSHEA.G STATBUF
|
||||
>SYSCALL stat
|
||||
bcs .90
|
||||
|
||||
>PUSHW ZPFullPath
|
||||
>PUSHB.G STATBUF+S.STAT.UID
|
||||
>PUSHB.G GID
|
||||
>SYSCALL chown
|
||||
|
||||
.90 jsr CS.RUN.CheckErr
|
||||
bcs .9
|
||||
|
||||
>LDA.G bRecurse
|
||||
bpl .80
|
||||
|
||||
>LDYA ZPFileName
|
||||
jmp EnterSubDirYA
|
||||
|
||||
.80 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.FILE
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.GetGID >SYSCALL ArgV
|
||||
>PUSHYA
|
||||
>PUSHWI 0
|
||||
>SYSCALL GetGRName
|
||||
bcs .9
|
||||
|
||||
>STA.G GID
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.CheckErr bcs .1
|
||||
>LDYA L.MSG.OK
|
||||
>SYSCALL PutS
|
||||
rts
|
||||
|
||||
.1 pha
|
||||
>PUSHW L.MSG.ERR
|
||||
pla
|
||||
pha
|
||||
>PUSHA
|
||||
>PUSHBI 1
|
||||
>SYSCALL PrintF
|
||||
>LDA.G bContinue
|
||||
eor #$80
|
||||
asl
|
||||
pla
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.GetFilePath
|
||||
>LDA.G hSrcBasePath
|
||||
>SYSCALL GetMemPtr
|
||||
>PUSHYA
|
||||
>LDYA ZPFullPath
|
||||
>SYSCALL StrCpy
|
||||
>PUSHW ZPFileName
|
||||
>LDYA ZPFullPath
|
||||
>SYSCALL StrCat
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.DOEVENT sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.QUIT jsr LeaveSubDir
|
||||
bcc CS.QUIT
|
||||
>LDA.G hFilter
|
||||
beq .1
|
||||
>SYSCALL FreeMem
|
||||
.1 >LDA.G hSrcFullPath
|
||||
beq .8
|
||||
>SYSCALL FreeMem
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
.INB usr/src/bin/x.fileenum.s
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
*--------------------------------------
|
||||
OptionList .AS "CRcr"
|
||||
OptionVars .DA #bContinue,#bRecurse,#bContinue,#bRecurse
|
||||
*--------------------------------------
|
||||
MSG.USAGE .AS "Usage : CHGRP groupname [File *,? wildcards allowed]\r\n"
|
||||
.AS " -C : Continue on error\r\n"
|
||||
.AZ " -R : Recurse subdirectories\r\n"
|
||||
MSG.OK .AZ "[OK]"
|
||||
MSG.ERR .AZ "[%h]\r\n"
|
||||
MSG.DIR .AZ "Dir :%s..."
|
||||
MSG.FILE .AZ "File:%s..."
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR 0
|
||||
DS.START
|
||||
ArgIndex .BS 1
|
||||
bContinue .BS 1
|
||||
bRecurse .BS 1
|
||||
bPause .BS 1
|
||||
|
||||
GID .BS 1
|
||||
STATBUF .BS S.STAT
|
||||
hSrcFullPath .BS 1
|
||||
|
||||
.INB usr/src/bin/x.fileenum.g
|
||||
|
||||
DS.END
|
||||
.ED
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE usr/src/bin/chgrp.s
|
||||
ASM
|
323
BIN/CHOWN.S.txt
323
BIN/CHOWN.S.txt
|
@ -0,0 +1,323 @@
|
|||
NEW
|
||||
AUTO 3,1
|
||||
.LIST OFF
|
||||
.OP 65C02
|
||||
.OR $2000
|
||||
.TF bin/chown
|
||||
*--------------------------------------
|
||||
.INB inc/macros.i
|
||||
.INB inc/a2osx.i
|
||||
.INB inc/mli.i
|
||||
.INB inc/mli.e.i
|
||||
*--------------------------------------
|
||||
X.ENTER.SUBDIR .EQ 0
|
||||
X.COPY.TO.DEST .EQ 0
|
||||
X.DELETE.SOURCE .EQ 0
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR ZPBIN
|
||||
ZS.START
|
||||
ZPPtr1 .BS 2
|
||||
ZPPtr2 .BS 2
|
||||
ZPFileName .BS 2
|
||||
ZPFileStat .BS 2
|
||||
ZPFullPath .BS 2
|
||||
|
||||
ZS.END .ED
|
||||
*--------------------------------------
|
||||
* File Header (16 Bytes)
|
||||
*--------------------------------------
|
||||
CS.START cld
|
||||
jmp (.1,x)
|
||||
.DA #$61 6502,Level 1 (65c02)
|
||||
.DA #1 BIN Layout Version 1
|
||||
.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
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
* Relocation Table
|
||||
*--------------------------------------
|
||||
.1 .DA CS.INIT
|
||||
.DA CS.RUN
|
||||
.DA CS.DOEVENT
|
||||
.DA CS.QUIT
|
||||
L.MSG.USAGE .DA MSG.USAGE
|
||||
L.MSG.DIR .DA MSG.DIR
|
||||
L.MSG.FILE .DA MSG.FILE
|
||||
L.MSG.OK .DA MSG.OK
|
||||
L.MSG.ERR .DA MSG.ERR
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
CS.INIT clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN >INC.G ArgIndex
|
||||
>SYSCALL ArgV
|
||||
bcs .8
|
||||
|
||||
>STYA ZPPtr1
|
||||
lda (ZPPtr1)
|
||||
cmp #'-'
|
||||
bne .4
|
||||
|
||||
ldy #1
|
||||
lda (ZPPtr1),y
|
||||
|
||||
ldx #OptionVars-OptionList-1
|
||||
|
||||
.2 cmp OptionList,x
|
||||
beq .3
|
||||
dex
|
||||
bpl .2
|
||||
|
||||
.9 >PUSHW L.MSG.USAGE
|
||||
>PUSHBI 0
|
||||
>SYSCALL PrintF
|
||||
lda #E.SYN
|
||||
sec
|
||||
.99 rts
|
||||
|
||||
.3 ldy OptionVars,x
|
||||
lda #$80
|
||||
sta (pData),y
|
||||
bra CS.RUN
|
||||
*--------------------------------------
|
||||
.4 >LDA.G UID
|
||||
bne .5
|
||||
|
||||
>LDA.G ArgIndex
|
||||
>STA.G UID
|
||||
bra CS.RUN
|
||||
|
||||
.5 >LDA.G hSrcBasePath
|
||||
bne .9
|
||||
|
||||
>LDYA ZPPtr1
|
||||
jsr InitSrcDirYA
|
||||
bcc CS.RUN
|
||||
rts
|
||||
|
||||
.8 >LDA.G UID
|
||||
beq .9
|
||||
|
||||
jsr CS.RUN.GetUID
|
||||
bcs .99
|
||||
|
||||
>LDA.G hSrcBasePath
|
||||
beq .9
|
||||
|
||||
>LDYAI 256
|
||||
>SYSCALL GetMem
|
||||
bcs .99
|
||||
|
||||
>STYA ZPFullPath
|
||||
txa
|
||||
>STA.G hSrcFullPath
|
||||
*--------------------------------------
|
||||
CS.RUN.LOOP ldy #S.PS.hStdIn
|
||||
lda (pPS),y
|
||||
>SYSCALL feof
|
||||
bcs .99
|
||||
|
||||
tay
|
||||
bne .1
|
||||
|
||||
>SYSCALL GetChar
|
||||
bcs .99
|
||||
|
||||
cmp #$03 Ctrl-C
|
||||
beq .99 Abort....
|
||||
|
||||
cmp #$13 Ctrl-S
|
||||
bne .1
|
||||
|
||||
>LDA.G bPause
|
||||
eor #$ff
|
||||
sta (pData),y
|
||||
bne CS.RUN.LOOP
|
||||
|
||||
.1 >LDA.G bPause
|
||||
bne CS.RUN.LOOP Pause...
|
||||
*--------------------------------------
|
||||
jsr GetEntry
|
||||
bcs CS.RUN.LEAVE
|
||||
|
||||
ldy #S.STAT.MODE+1
|
||||
lda (ZPFileStat),y
|
||||
and #$70
|
||||
bne .5 REG file ?
|
||||
|
||||
jsr CS.RUN.FILE
|
||||
bcc CS.RUN.NEXT
|
||||
rts
|
||||
|
||||
.5 cmp /S.STAT.MODE.DIR DIR ?
|
||||
bne .6
|
||||
|
||||
jsr CS.RUN.DIR
|
||||
bcc CS.RUN.NEXT
|
||||
rts
|
||||
|
||||
.6 lda #MLI.E.UNSUPST
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.NEXT jsr GetNextEntry
|
||||
bcc CS.RUN.LOOP
|
||||
|
||||
CS.RUN.LEAVE jsr LeaveSubDir
|
||||
bcs .90
|
||||
|
||||
jsr BasePath..
|
||||
|
||||
jmp CS.RUN.NEXT
|
||||
|
||||
.90 lda #0
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.DIR lda (ZPFileName)
|
||||
cmp #'.'
|
||||
bne .1
|
||||
|
||||
ldy #1
|
||||
lda (ZPFileName),y
|
||||
beq .8 skip "."
|
||||
|
||||
cmp #'.'
|
||||
bne .1
|
||||
|
||||
iny
|
||||
lda (ZPFileName),y
|
||||
beq .8 skip ".."
|
||||
|
||||
.1 jsr FilterMatch
|
||||
bcc .2
|
||||
|
||||
.8 clc
|
||||
.9 rts
|
||||
|
||||
.2 jsr CS.RUN.GetFilePath
|
||||
>PUSHW L.MSG.DIR
|
||||
>PUSHW ZPFullPath
|
||||
>PUSHBI 2
|
||||
>SYSCALL PrintF
|
||||
bcs .9
|
||||
|
||||
>PUSHW ZPFullPath
|
||||
>PUSHEA.G STATBUF
|
||||
>SYSCALL stat
|
||||
bcs .90
|
||||
|
||||
>PUSHW ZPFullPath
|
||||
>PUSHB.G UID
|
||||
>PUSHB.G STATBUF+S.STAT.GID
|
||||
>SYSCALL chown
|
||||
|
||||
.90 jsr CS.RUN.CheckErr
|
||||
bcs .9
|
||||
|
||||
>LDA.G bRecurse
|
||||
bpl .80
|
||||
|
||||
>LDYA ZPFileName
|
||||
jmp EnterSubDirYA
|
||||
|
||||
.80 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.FILE
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.GetUID >SYSCALL ArgV
|
||||
>PUSHYA
|
||||
>PUSHWI 0
|
||||
>SYSCALL GetPWName
|
||||
bcs .9
|
||||
|
||||
>STA.G UID
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.CheckErr bcs .1
|
||||
>LDYA L.MSG.OK
|
||||
>SYSCALL PutS
|
||||
rts
|
||||
|
||||
.1 pha
|
||||
>PUSHW L.MSG.ERR
|
||||
pla
|
||||
pha
|
||||
>PUSHA
|
||||
>PUSHBI 1
|
||||
>SYSCALL PrintF
|
||||
>LDA.G bContinue
|
||||
eor #$80
|
||||
asl
|
||||
pla
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.GetFilePath
|
||||
>LDA.G hSrcBasePath
|
||||
>SYSCALL GetMemPtr
|
||||
>PUSHYA
|
||||
>LDYA ZPFullPath
|
||||
>SYSCALL StrCpy
|
||||
>PUSHW ZPFileName
|
||||
>LDYA ZPFullPath
|
||||
>SYSCALL StrCat
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.DOEVENT sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.QUIT jsr LeaveSubDir
|
||||
bcc CS.QUIT
|
||||
>LDA.G hFilter
|
||||
beq .1
|
||||
>SYSCALL FreeMem
|
||||
.1 >LDA.G hSrcFullPath
|
||||
beq .8
|
||||
>SYSCALL FreeMem
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
.INB usr/src/bin/x.fileenum.s
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
*--------------------------------------
|
||||
OptionList .AS "CRcr"
|
||||
OptionVars .DA #bContinue,#bRecurse,#bContinue,#bRecurse
|
||||
*--------------------------------------
|
||||
MSG.USAGE .AS "Usage : CHOWN username [File *,? wildcards allowed]\r\n"
|
||||
.AS " -C : Continue on error\r\n"
|
||||
.AZ " -R : Recurse subdirectories\r\n"
|
||||
MSG.OK .AZ "[OK]"
|
||||
MSG.ERR .AZ "[%h]\r\n"
|
||||
MSG.DIR .AZ "Dir :%s..."
|
||||
MSG.FILE .AZ "File:%s..."
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR 0
|
||||
DS.START
|
||||
ArgIndex .BS 1
|
||||
bContinue .BS 1
|
||||
bRecurse .BS 1
|
||||
bPause .BS 1
|
||||
|
||||
UID .BS 1
|
||||
STATBUF .BS S.STAT
|
||||
hSrcFullPath .BS 1
|
||||
|
||||
.INB usr/src/bin/x.fileenum.g
|
||||
|
||||
DS.END
|
||||
.ED
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE usr/src/bin/chown.s
|
||||
ASM
|
|
@ -121,6 +121,9 @@ NEW
|
|||
.DO ]1=MLIGETFILEINFOEX
|
||||
lda #2
|
||||
.FIN
|
||||
.DO ]1=MLISETACL
|
||||
lda #2
|
||||
.FIN
|
||||
|
||||
jsr GP.MLICall
|
||||
.EM
|
||||
|
|
|
@ -252,12 +252,7 @@ sysdeath1 tax death error code.
|
|||
*--------------------------------------
|
||||
* ProDOS Block File Manager
|
||||
*--------------------------------------
|
||||
XDOS.bfmgr cpx #$14
|
||||
bcc .1
|
||||
|
||||
* >DEBUG
|
||||
|
||||
.1 lda XDOS.CmdFlags,x translate into command address.
|
||||
XDOS.bfmgr lda XDOS.CmdFlags,x translate into command address.
|
||||
asl bit 7 indicates pathname to process
|
||||
sta cmdtemp
|
||||
and #$3F bit 6 is refnum, 5 is time to process
|
||||
|
@ -783,7 +778,7 @@ H3588 lda (zpt),y
|
|||
eor #$18 done with usage/eof update?
|
||||
bne H3588 branch if not.
|
||||
|
||||
jsr XDOS.WriteGBuf go update parent.
|
||||
jsr XDOS.WriteGBuf go update parent.
|
||||
bcs crerr2
|
||||
|
||||
jmp XDOS.Create
|
||||
|
@ -979,7 +974,7 @@ drevise1 lda bkbitflg (bit 5 = backup needed)
|
|||
sta devnum to be revised
|
||||
lda d_entblk and address of direcotry block.
|
||||
ldx d_entblk+1
|
||||
jsr XDOS.ReadGBufAX read block into general purpose buffer
|
||||
jsr XDOS.ReadGBufAX read block into general purpose buffer
|
||||
bcs crerr3
|
||||
|
||||
jsr entcalc fix up ptr to entry location within gbuf.
|
||||
|
@ -1000,7 +995,7 @@ drevise1 lda bkbitflg (bit 5 = backup needed)
|
|||
cmp bloknml+1
|
||||
beq uphead branch if they are the same block.
|
||||
|
||||
H36E0 jsr XDOS.WriteGBuf go write updated directory block.
|
||||
H36E0 jsr XDOS.WriteGBuf go write updated directory block.
|
||||
bcs crerr3
|
||||
|
||||
lda d_head get address of header block and
|
||||
|
@ -1017,6 +1012,7 @@ H36F2 lda h_fcnt,y
|
|||
|
||||
lda h_attr also update header's attributes.
|
||||
sta gbuf+34
|
||||
|
||||
jsr XDOS.WriteGBuf go write updated header
|
||||
bcs H375A
|
||||
|
||||
|
|
|
@ -624,24 +624,24 @@ L3ACE .DO LOWERCASE=1
|
|||
* lda bloknml+1
|
||||
* sta VCBs+VCB.ROOT+1,x
|
||||
|
||||
* ldy #0
|
||||
|
||||
*.1 lda gbuf+39,y
|
||||
* lda gbuf+39 save address of the 1st bitmap.
|
||||
* sta VCBs+VCB.BMAP,x
|
||||
* iny
|
||||
* inx
|
||||
* cpy #4
|
||||
* bne .1
|
||||
* lda gbuf+40
|
||||
* sta VCBs+VCB.BMAP+1,x
|
||||
|
||||
lda gbuf+39 save address of the 1st bitmap.
|
||||
sta VCBs+VCB.BMAP,x
|
||||
lda gbuf+40
|
||||
sta VCBs+VCB.BMAP+1,x
|
||||
* lda gbuf+41 total # of blocks on this unit.
|
||||
* sta VCBs+VCB.TBLK,x
|
||||
* lda gbuf+42
|
||||
* sta VCBs+VCB.TBLK+1,x
|
||||
|
||||
lda gbuf+41 total # of blocks on this unit.
|
||||
sta VCBs+VCB.TBLK,x
|
||||
lda gbuf+42
|
||||
sta VCBs+VCB.TBLK+1,x
|
||||
ldy #0
|
||||
|
||||
.1 lda gbuf+39,y
|
||||
sta VCBs+VCB.BMAP,x copy BMAP+TBLK
|
||||
iny
|
||||
inx
|
||||
cpy #4
|
||||
bne .1
|
||||
|
||||
L3B04 clc indicate logged if possible
|
||||
rts
|
||||
|
|
|
@ -238,6 +238,10 @@ wrtbmap lda #$02 write command.
|
|||
txa error code
|
||||
L3DB6 rts
|
||||
*--------------------------------------
|
||||
XDOS.ReadGBuf_d_frst
|
||||
lda d_frst read 1st block of directory into gbuf
|
||||
ldx d_frst+1
|
||||
|
||||
XDOS.ReadGBufAX sta bloknml
|
||||
stx bloknml+1
|
||||
|
||||
|
|
|
@ -46,13 +46,13 @@ close2 ldy fcbptr
|
|||
|
||||
lda #$00
|
||||
ldy fcbptr
|
||||
sta FCBs,y free fcb too
|
||||
sta FCBs,y free fcb too
|
||||
lda FCBs+1,y
|
||||
sta devnum go look for associated vcb
|
||||
jsr fnddvcb
|
||||
|
||||
ldx vcbptr get vcb pointer.
|
||||
dec VCBs+VCB.OFCNT,x indicate one less file open.
|
||||
dec VCBs+VCB.OFCNT,x indicate one less file open.
|
||||
* bne L46B4 branch if that wasn't the last...
|
||||
|
||||
* clc strip 'files open' bit
|
||||
|
@ -126,7 +126,7 @@ L471C lda #$06 prepare to update directory
|
|||
tax
|
||||
ora fcbptr
|
||||
tay
|
||||
L4723 lda FCBs,y note: this code depends on the defined
|
||||
L4723 lda FCBs,y note: this code depends on the defined
|
||||
sta d_dev-1,x order of the file control block and the
|
||||
dey temporary directory area in 'work space'
|
||||
dex
|
||||
|
@ -547,19 +547,33 @@ XDOS.SetFileInfoEx
|
|||
dex
|
||||
bpl .2
|
||||
|
||||
jmp drevise1
|
||||
*--------------------------------------
|
||||
XDOS.SetACL jsr findfile
|
||||
bcs .9
|
||||
|
||||
lda d_stor
|
||||
and #$F0
|
||||
cmp #$D0
|
||||
bne .99
|
||||
|
||||
jsr XDOS.ReadGBuf_d_frst
|
||||
bcs .9
|
||||
|
||||
ldx #7
|
||||
ldy #S.FIEX.ACL+7+3
|
||||
|
||||
.3 lda (A3L),y
|
||||
sta h_acl,x
|
||||
sta gbuf+$14,x
|
||||
dey
|
||||
dex
|
||||
bpl .3
|
||||
|
||||
jmp drevise1
|
||||
*--------------------------------------
|
||||
XDOS.SetACL clc
|
||||
rts
|
||||
jmp XDOS.WriteGBuf
|
||||
|
||||
.99 lda MLI.E.UNSUPST
|
||||
sec
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
XDOS.SetFileInfo
|
||||
jsr findfile get the file to work on.
|
||||
|
@ -755,10 +769,7 @@ L4ABE lda pathbuf,y move local name to dir entry workspace.
|
|||
cpx #$D0 that file must be changed also.
|
||||
bne L4AF0 branch if not directory type.
|
||||
|
||||
lda d_frst read in 1st header block of subdir
|
||||
ldx d_frst+1
|
||||
|
||||
jsr XDOS.ReadGBufAX
|
||||
jsr XDOS.ReadGBuf_d_frst
|
||||
bcs L4A74 errors.
|
||||
|
||||
ldy rnptr change the header's name to match the
|
||||
|
@ -810,7 +821,7 @@ XDOS.UpdateHdr .DO LOWERCASE=1
|
|||
eor #$20
|
||||
bra .1
|
||||
|
||||
.8 jmp XDOS.WriteGBuf write changed header block.
|
||||
.8 jmp XDOS.WriteGBuf write changed header block.
|
||||
|
||||
.ELSE
|
||||
|
||||
|
@ -822,7 +833,7 @@ L4AF5 sta gbuf+4,x
|
|||
lda pathbuf,y
|
||||
bne L4AF5
|
||||
|
||||
jmp XDOS.WriteGBuf write changed header block.
|
||||
jmp XDOS.WriteGBuf write changed header block.
|
||||
.FIN
|
||||
*--------------------------------------
|
||||
getnamptr ldy #$00 return pointer to 1st name of path.
|
||||
|
|
|
@ -106,9 +106,7 @@ L4BCF cmp #$D0 is this a directory file ?
|
|||
jsr fndbmap make sure a buffer available for bitmap
|
||||
bcs L4C1A if error.
|
||||
|
||||
lda d_frst read 1st block of directory into gbuf
|
||||
ldx d_frst+1
|
||||
jsr XDOS.ReadGBufAX
|
||||
jsr XDOS.ReadGBuf_d_frst read 1st block of directory into gbuf
|
||||
bcs L4C1A
|
||||
|
||||
lda gbuf+37 do any files exist in this directory ?
|
||||
|
|
|
@ -127,7 +127,7 @@ K.ReadDir.ROOT ldy #S.FD.DIR.FC did we already returned something ?
|
|||
txa Add ending 0 for C String
|
||||
jsr K.ReadDir.AddToBuf
|
||||
|
||||
jsr SHARED.ClrStat
|
||||
jsr FS.ClrStat
|
||||
|
||||
lda /S.STAT.MODE.BDEV
|
||||
sta K.S.STAT+S.STAT.MODE+1
|
||||
|
|
|
@ -163,7 +163,7 @@ FS.Stat bit CORE.FSID
|
|||
>MLICALL MLIGETFILEINFO
|
||||
bcs FS.OPEN.RTS
|
||||
|
||||
jsr SHARED.ClrStat
|
||||
jsr FS.ClrStat
|
||||
|
||||
lda K.MLI.PARAMS+S.FI.T
|
||||
cmp #S.FI.T.DIR
|
||||
|
@ -198,7 +198,7 @@ FS.StatEX >MLICALL MLIGETFILEINFOEX
|
|||
>LDYAI K.MLI.PARAMS+3
|
||||
>STYA ZPPtr3
|
||||
*--------------------------------------
|
||||
FS.DirEnt2Stat jsr SHARED.ClrStat
|
||||
FS.DirEnt2Stat jsr FS.ClrStat
|
||||
|
||||
lda (ZPPtr3)
|
||||
and #$F0
|
||||
|
@ -250,7 +250,7 @@ FS.DirEnt2Stat jsr SHARED.ClrStat
|
|||
ldx #K.S.STAT+S.STAT.MTIME
|
||||
jmp SHARED.PTime2StatAX
|
||||
*--------------------------------------
|
||||
SHARED.ClrStat ldx #S.STAT-1
|
||||
FS.ClrStat ldx #S.STAT-1
|
||||
|
||||
.1 stz K.S.STAT,x
|
||||
dex
|
||||
|
|
|
@ -304,17 +304,12 @@ K.ChOwn jsr PFT.CheckPath2
|
|||
inc pStack
|
||||
inc pStack
|
||||
|
||||
lda K.MLI.PARAMS+3+S.FIEX.T
|
||||
cmp #S.FI.T.DIR
|
||||
bne .90
|
||||
|
||||
lda #$57
|
||||
sta K.MLI.PARAMS+3+S.FIEX.ACL
|
||||
|
||||
>MLICALL MLISETACL
|
||||
rts
|
||||
|
||||
.90 lda #MLI.E.INVPARAM
|
||||
sec
|
||||
rts
|
||||
|
||||
K.ChOwn.RET4 >RET 4
|
||||
*--------------------------------------
|
||||
SHARED.GetPDrv ldy #S.FD.DEV.DRVPTR
|
||||
|
|
Loading…
Reference in New Issue