A2osX/SYS/KERNEL.S.PFT.txt

112 lines
2.1 KiB
Plaintext
Raw Normal View History

2016-08-24 15:42:33 +00:00
PR#3
PREFIX /A2OSX.BUILD
LOMEM $A00
2016-08-24 15:42:33 +00:00
INC 1
AUTO 6
*--------------------------------------
2016-09-26 16:00:52 +00:00
* K.PFTAdd
* In :
* Out :
*--------------------------------------
K.PFTAdd
clc
rts
*--------------------------------------
* K.PFTRemove
* In :
* Out :
*--------------------------------------
K.PFTRemove
clc
rts
*--------------------------------------
2016-09-29 15:30:15 +00:00
* PFT.CheckPath___
2016-09-26 16:00:52 +00:00
* In :
* PULLW/Y,A = PATH (C-String)
2016-09-26 16:00:52 +00:00
* Out :
2016-08-24 15:42:33 +00:00
*--------------------------------------
2016-09-29 15:30:15 +00:00
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
2016-09-29 15:30:15 +00:00
PFT.CheckPathYA
2017-01-12 17:43:45 +00:00
>STYA ZPPtr1
2016-08-24 15:42:33 +00:00
>LDYAI FltMgr.Table
2017-01-12 17:43:45 +00:00
>STYA ZPPtr2
2016-08-24 15:42:33 +00:00
.1 lda (ZPPtr2) Get Filter char....
2016-08-24 15:42:33 +00:00
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
2016-08-24 15:42:33 +00:00
bne .8
iny
2016-08-24 15:42:33 +00:00
bne .2
.3 lda (ZPPtr1),y
cmp #'/'
bne .8
2016-08-28 20:48:01 +00:00
ldy #S.PFT.HANDLER
lda (ZPPtr2),y get hLib
jsr K.GetMemPtr.A
>STYA .7+1
2016-08-24 15:42:33 +00:00
pla discard JSR return @
pla
>LDYA ZPPtr1 restore passed params
.7 jmp $ffff X unmodified
2016-08-24 15:42:33 +00:00
2017-01-12 17:43:45 +00:00
.8 lda ZPPtr2
2016-08-24 15:42:33 +00:00
clc
adc (ZPPtr2) Add STR len
adc #S.PFT
2017-01-12 17:43:45 +00:00
sta ZPPtr2
bcc .1
2016-08-24 15:42:33 +00:00
.9 >LDYA ZPPtr1 restore passed params
2016-08-24 15:42:33 +00:00
rts
*--------------------------------------
2016-09-29 15:30:15 +00:00
* PFT.Check___
2016-09-26 16:00:52 +00:00
* In :
* PULLB/A = hFILE/hDIR
* Out :
2016-08-24 15:42:33 +00:00
*--------------------------------------
PFT.CheckNodeSTK
lda (pStack) read hFILE on top of stack
PFT.CheckNodeA sta .9+1 save hFILE
jsr K.GetMemPtr.A X = unmodified
2017-01-12 17:43:45 +00:00
>STYA ZPPtr1
lda (ZPPtr1)
beq .9 Handler is 0, back to kernel....
jsr K.GetMemPtr.A
>STYA .1+1
pla discard JSR return @
pla
2016-08-24 15:42:33 +00:00
lda .9+1 restore passed hFILE
.1 jmp $ffff
2016-08-24 15:42:33 +00:00
.9 lda #$ff Self Modified
2016-08-24 15:42:33 +00:00
rts
*--------------------------------------
MAN
SAVE /A2OSX.SRC/SYS/KERNEL.S.PFT
LOAD /A2OSX.SRC/SYS/KERNEL.S
2016-08-24 15:42:33 +00:00
ASM