mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-23 07:35:19 +00:00
127 lines
2.5 KiB
Plaintext
127 lines
2.5 KiB
Plaintext
PR#3
|
||
PREFIX /A2OSX.BUILD
|
||
LOMEM $A00
|
||
INC 1
|
||
AUTO 6
|
||
*--------------------------------------
|
||
* K.PFTAdd
|
||
* In :
|
||
* Out :
|
||
*--------------------------------------
|
||
K.PFTAdd
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
* K.PFTRemove
|
||
* In :
|
||
* Out :
|
||
*--------------------------------------
|
||
K.PFTRemove
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
* PFT.CheckPath___
|
||
* In :
|
||
* PULLW/Y,A = PATH (C-String)
|
||
* Out :
|
||
*--------------------------------------
|
||
PFT.CheckPathSTK
|
||
lda (pStack) read PTR.LO on top of stack
|
||
pha
|
||
ldy #1
|
||
lda (pStack),y read PTR.HI on top of stack
|
||
ply
|
||
PFT.CheckPathYA
|
||
stx S.PFT.SYSCALL save #SYSCALL
|
||
>STYA ZPPtr1
|
||
|
||
>LDYAI FltMgr.Table
|
||
>STYA ZPPtr2
|
||
|
||
.1 lda (ZPPtr2) Get Filter char....
|
||
beq .9 End Of Table, Exit
|
||
|
||
ldy #0
|
||
|
||
.2 lda (ZPPtr2),y
|
||
beq .3 end of filter string....
|
||
|
||
lda (ZPPtr1),y
|
||
beq .8
|
||
cmp (ZPPtr2),y
|
||
bne .8
|
||
iny
|
||
bne .2
|
||
|
||
.3 lda (ZPPtr1),y
|
||
cmp #'/'
|
||
bne .8
|
||
|
||
ldy #S.PFT.HANDLER
|
||
lda (ZPPtr2),y get hLib
|
||
jsr K.GetMemPtr.A
|
||
>STYA .7+1
|
||
|
||
lda S.PFT.SYSCALL getback #SYSCALL
|
||
sec
|
||
sbc #SYS.FOpen-4 0=Lib.load, 2=Lib.Unload
|
||
tax
|
||
|
||
pla discard JSR return @
|
||
pla
|
||
|
||
>LDYA ZPPtr1 restore passed params
|
||
.7 jmp $ffff
|
||
|
||
|
||
.8 lda ZPPtr2
|
||
clc
|
||
adc (ZPPtr2) Add STR len
|
||
adc #S.PFT
|
||
sta ZPPtr2
|
||
bcc .1
|
||
|
||
.9 >LDYA ZPPtr1 restore passed params
|
||
ldx S.PFT.SYSCALL
|
||
rts
|
||
*--------------------------------------
|
||
* PFT.Check___
|
||
* In :
|
||
* PULLB/A = hFILE/hDIR
|
||
* Out :
|
||
*--------------------------------------
|
||
PFT.CheckNodeSTK
|
||
lda (pStack) read hFILE on top of stack
|
||
PFT.CheckNodeA stx S.PFT.SYSCALL save #SYSCALL
|
||
sta S.PFT.hFILE
|
||
jsr K.GetMemPtr.A X = unmidified
|
||
>STYA ZPPtr1
|
||
lda (ZPPtr1)
|
||
beq .9 Handler is 0, back to kernel....
|
||
|
||
jsr K.GetMemPtr.A
|
||
>STYA .1+1
|
||
|
||
lda S.PFT.SYSCALL getback #SYSCALL
|
||
sec
|
||
sbc #SYS.FOpen-4 0=Lib.load, 2=Lib.Unload
|
||
tax
|
||
|
||
pla discard JSR return @
|
||
pla
|
||
|
||
lda S.PFT.hFILE restore passed params
|
||
.1 jmp $ffff
|
||
|
||
|
||
.9 lda S.PFT.hFILE
|
||
rts
|
||
*--------------------------------------
|
||
S.PFT.hFILE .BS 1
|
||
S.PFT.SYSCALL .BS 1
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE /A2OSX.SRC/SYS/KERNEL.S.PFT
|
||
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
||
ASM
|