mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-24 14:31:05 +00:00
164 lines
2.5 KiB
Plaintext
164 lines
2.5 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
*--------------------------------------
|
||
PFT.CheckPath1 ldy #1
|
||
.HS 2C BIT ABS
|
||
PFT.CheckPath2 ldy #2
|
||
.HS 2C BIT ABS
|
||
PFT.CheckPath4 ldy #4
|
||
|
||
lda (pStack),y
|
||
pha
|
||
iny
|
||
lda (pStack),y
|
||
ply
|
||
|
||
PFT.CheckPathYA >PUSHYA
|
||
|
||
stx .6+1 Save SYSCALL #
|
||
|
||
>PUSHWI K.Buf256
|
||
>SYSCALL2 realpath
|
||
bcs PFT.RTS
|
||
|
||
ldx #0
|
||
|
||
.1 inx
|
||
lda PFTs.pHI-1,x
|
||
beq .8
|
||
|
||
sta ZPPtr1+1
|
||
|
||
lda PFTs.pLO-1,x
|
||
sta 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
|
||
beq .4 path is "/FILTER" ?
|
||
|
||
cmp #'/' path is "/FILTER/..." ?
|
||
bne .8
|
||
|
||
iny
|
||
|
||
.4 lda PFTs.cbLO-1,x
|
||
sta .7+1
|
||
|
||
lda PFTs.cbHI-1,x
|
||
sta .7+2
|
||
|
||
stx hHandler
|
||
|
||
pla discard JSR return @
|
||
pla
|
||
|
||
lda /K.Buf256 pass full path to handler
|
||
|
||
.6 ldx #$ff SELF MODIFIED SYSCALL #
|
||
|
||
.7 jmp $ffff SELF MODIFIED
|
||
|
||
.8 cpx #K.PFT.MAX
|
||
bne .1
|
||
|
||
>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
|
||
PFT.RTS rts
|
||
*--------------------------------------
|
||
PFT.CheckNode4 ldy #4
|
||
|
||
PFT.CheckNodeY lda (pStack),y
|
||
|
||
PFT.CheckNodeA stx .80+1 Save SYSCALL #
|
||
sta IO.hFILE
|
||
|
||
tax
|
||
beq .9
|
||
|
||
cpx #K.FILE.MAX+1
|
||
bcs .9
|
||
|
||
ldy FILEs.hFD-1,x
|
||
sty IO.hFD
|
||
lda FDs.pLO-1,y
|
||
sta pFD
|
||
lda FDs.pHI-1,y
|
||
sta pFD+1
|
||
beq .9
|
||
|
||
ldy #S.FD.PFT
|
||
lda (pFD),y
|
||
beq .8 Handler is 0, back to kernel....
|
||
|
||
tax
|
||
|
||
lda PFTs.cbLO-1,x
|
||
sta .7+1
|
||
|
||
lda PFTs.cbHI-1,x
|
||
sta .7+2
|
||
|
||
stx hHandler
|
||
|
||
pla discard JSR return @
|
||
pla
|
||
ldx .80+1 restore SYSCALL #
|
||
lda IO.hFILE
|
||
|
||
.7 jmp $ffff SELF MODIFIED
|
||
|
||
.8 jsr DEV.GetPDrv
|
||
|
||
lda (pFD) #S.FD.T
|
||
cmp #S.FD.T.CDEV
|
||
bcs .80
|
||
|
||
ldy #S.FD.REG.REF REG or DIR
|
||
lda (pFD),y
|
||
sta K.MLI.PARAMS+1
|
||
|
||
.80 ldx #$ff SELF MODIFIED
|
||
.81 lda IO.hFILE
|
||
clc
|
||
|
||
.99 rts
|
||
|
||
.9 lda #E.INVH
|
||
sec
|
||
rts
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE usr/src/sys/kernel.s.pft
|
||
LOAD usr/src/sys/kernel.s
|
||
ASM
|