Kernel 0.93+

This commit is contained in:
Rémy GIBERT 2019-10-10 12:23:02 +02:00
parent 9180188da7
commit cc5d919c5d
4 changed files with 110 additions and 21 deletions

Binary file not shown.

View File

@ -75,6 +75,7 @@ CMD.CD.0 >LDYA ZPArgVBufPtr
bra CMD.CD.YA
CMD.CD.HOME >LDYA L.HOME
CMD.CD.YA >SYSCALL realpath
bcs CMD.POPD.RTS
>STYA ZPPtr1
@ -480,24 +481,6 @@ CMD.PWD ldy #S.PS.hCWD
>SYSCALL puts
rts
*--------------------------------------
CMD.REN lda (ZPArgVBufPtr)
beq .9
>PUSHW ZPArgVBufPtr
>LDYA ZPArgVBufPtr
>SYSCALL puts
jsr CORE.ArgV.Next
lda (ZPArgVBufPtr)
beq .90
>LDYA ZPArgVBufPtr
>SYSCALL puts
>LDYA ZPArgVBufPtr
>SYSCALL Rename
rts
.90 >PULLYA
.9
CMD.REN.CSYN jmp CMD.E.CSYN
*--------------------------------------
CMD.RD lda (ZPArgVBufPtr)
beq CMD.REN.CSYN
>PUSHEA.G StatBuf
@ -511,6 +494,90 @@ CMD.RD lda (ZPArgVBufPtr)
>SYSCALL Remove
.99 rts
*--------------------------------------
CMD.REN.CSYN jmp CMD.E.CSYN
CMD.REN lda (ZPArgVBufPtr)
beq CMD.REN.CSYN
jsr CORE.ArgV.Next
lda (ZPArgVBufPtr)
beq CMD.REN.CSYN
>LDYA ZPArgVBufPrev old path
>SYSCALL realpath
bcs CMD.REN.CSYN
>STYA ZPPtr1
stx ZPTmpW
ldy #$ff
.1 iny
lda (ZPPtr1),y
beq .2
cmp #'/'
bne .1
tya
tax
bra .1
.2 ldy #$ff
.3 iny
inx
lda (ZPArgVBufPtr),y
bne .3
txa
tay
lda #0
>SYSCALL getmem
bcs .90
>STYA ZPPtr2
stx ZPTmpW+1
ldy #$ff
.4 iny
lda (ZPPtr1),y
beq .5
sta (ZPPtr2),y
cmp #'/'
bne .4
tya
inc
tax
bra .4
.5 txa
tay
lda #0
sta (ZPPtr2),y
>PUSHW ZPArgVBufPtr
>LDYA ZPPtr2
>SYSCALL strcat
lda ZPTmpW
>SYSCALL freemem
lda ZPTmpW+1
sta ZPTmpW
>PUSHW ZPPtr2
>LDYA ZPArgVBufPrev
>SYSCALL Rename
.90 php
pha
lda ZPTmpW
>SYSCALL freemem
pla
plp
rts
*--------------------------------------
CMD.FUNCTION lda (ZPArgVBufPtr)
beq .9
jsr CORE.StkGetCtx

View File

@ -21,31 +21,43 @@ K.PFTRemove.RTS rts
* Out :
*--------------------------------------
PFT.CheckPathYA stx .6+1 Save SYSCALL #
jsr STDLIB.realpath.I realpath in K.Buf256
bcs K.PFTRemove.RTS
ldx #0
.1 lda Flt.Table.hPath,x
beq .8
jsr K.GetMemPtr
>STYA ZPPtr1
ldy #$ff
.2 iny
lda (ZPPtr1),y "/FILTER\0"
beq .3 end of filter string....
cmp K.Buf256,y can be \0
beq .2
bra .8
.3 lda K.Buf256,y path is "/FILTER/..." ?
cmp #'/'
bne .8
lda Flt.Table.hLib,x get hLib
jsr K.GetMemPtr
>STYA .7+1
pla discard JSR return @
pla
>LDYAI K.Buf256 pass full path to handler
.6 ldx #$ff SELF MODIFIED SYSCALL #
.7 jmp $ffff SELF MODIFIED
.8 inx
cpx #K.FLT.MAX
bne .1
@ -53,19 +65,24 @@ PFT.CheckPathYA stx .6+1 Save SYSCALL #
.80 >LDYAI K.Buf256
*--------------------------------------
PFT.YAToMLIPATH >STYA .1+1
ldx #0 no filter, prodos path
.1 lda $ffff,x SELF MODIFIED
beq .2
inx
sta K.MLI.PATH,x
cpx #MLI.MAXPATH
bne .1
.2 stx K.MLI.PATH
inx
stz K.MLI.PATH,x Make ending 0 for /dev/xxx path
>LDYAI K.MLI.PATH
>STYA K.MLI.PARAMS+1
clc
rts
*--------------------------------------
@ -80,13 +97,16 @@ PFT.CheckNodeA stx .80+1 Save SYSCALL #
tax
lda OF.Table.hFD-1,x
beq .9
sta IO.hFD
ldy OF.Table.hPath-1,x if 0, its a hDEV
bne .10
tax
ldy Dev.Table-1,x
lda Dev.Table,x
bra .11
.10 jsr K.GetMemPtr
.11 >STYA pFD
ldy #S.FD.HANDLER
@ -107,10 +127,12 @@ PFT.CheckNodeA stx .80+1 Save SYSCALL #
ldy #S.FD.REG.REF
lda (pFD),y
sta K.MLI.PARAMS+1
.80 ldx #$ff SELF MODIFIED
.81 lda #$ff SELF MODIFIED
clc
rts
.9 lda #E.INVH
sec
rts

View File

@ -1191,12 +1191,13 @@ K.Remove jsr PFT.CheckPathYA
K.Rename jsr PFT.CheckPathYA
bcs .9
>PULLW .1+1
>PULLW ZPPtr1
ldy #0
.1 lda $ffff,y Self Modified
.1 lda (ZPPtr1),y
beq .8
iny
sta K.Buf256,y
cpy #MLI.MAXPATH
@ -1205,7 +1206,6 @@ K.Rename jsr PFT.CheckPathYA
.8 sty K.Buf256
>LDYAI K.Buf256
>STYA K.MLI.PARAMS+3
>MLICALL MLIRENAME
rts
.9 >RET 2