mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-04 03:05:43 +00:00
146 lines
2.6 KiB
Plaintext
146 lines
2.6 KiB
Plaintext
NEW
|
||
PREFIX
|
||
AUTO 4,1
|
||
*--------------------------------------
|
||
* K.PFTAdd
|
||
* In :
|
||
* Out :
|
||
*--------------------------------------
|
||
K.PFTAdd
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
* K.PFTRemove
|
||
* In :
|
||
* Out :
|
||
*--------------------------------------
|
||
K.PFTRemove
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
* PFT.CheckPathYA
|
||
* In :
|
||
* Y,A = PATH (C-String)
|
||
* Out :
|
||
*--------------------------------------
|
||
PFT.CheckPathYA stx .71+1 Save SYSCALL #
|
||
jsr K.realpath.I realpath in K.Buf256
|
||
bcs .9
|
||
|
||
>LDYAI Flt.Table
|
||
>STYA ZPPtr1
|
||
|
||
.1 lda (ZPPtr1) Get Filter char....
|
||
beq .80
|
||
|
||
ldy #0
|
||
|
||
.2 lda (ZPPtr1),y
|
||
beq .3 end of filter string....
|
||
|
||
lda K.Buf256,y
|
||
beq .8
|
||
cmp (ZPPtr1),y
|
||
bne .8
|
||
iny
|
||
bne .2
|
||
|
||
.3 lda K.Buf256,y
|
||
cmp #'/'
|
||
bne .8
|
||
|
||
ldy #S.PFT.HANDLER
|
||
lda (ZPPtr1),y get hLib
|
||
jsr K.GetMemPtr
|
||
>STYA .72+1
|
||
|
||
pla discard JSR return @
|
||
pla
|
||
|
||
>LDYAI K.Buf256 pass full path to handler
|
||
.71 ldx #$ff SELF MODIFIED SYSCALL #
|
||
.72 jmp $ffff
|
||
|
||
.9 rts
|
||
|
||
.8 lda ZPPtr1
|
||
clc
|
||
adc (ZPPtr1) Add STR len
|
||
adc #S.PFT
|
||
sta ZPPtr1
|
||
bcc .1
|
||
|
||
.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
|
||
*--------------------------------------
|
||
* PFT.CheckNodeA
|
||
* In :
|
||
* A = hFILE
|
||
* Out :
|
||
*--------------------------------------
|
||
PFT.CheckNodeA stx .80+1 Save SYSCALL #
|
||
sta .81+1 Save hFILE
|
||
|
||
tax
|
||
lda Nod.Table.hFD,x
|
||
beq .9
|
||
|
||
jsr K.GetMemPtr
|
||
>STYA pFD
|
||
|
||
ldy #S.FD.HANDLER
|
||
lda (pFD),y
|
||
beq .8 Handler is 0, back to kernel....
|
||
|
||
jsr K.GetMemPtr
|
||
>STYA .1+1
|
||
|
||
pla discard JSR return @
|
||
pla
|
||
|
||
ldx .80+1 restore SYSCALL #
|
||
lda .81+1 restore passed hFILE
|
||
|
||
.1 jmp $ffff
|
||
|
||
.8 lda (pFD) #S.FD.T
|
||
bne .80
|
||
|
||
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
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE USR/SRC/SYS/KERNEL.S.PFT
|
||
LOAD USR/SRC/SYS/KERNEL.S
|
||
ASM
|