2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2018-11-17 17:17:13 +00:00
|
|
|
|
PREFIX
|
2017-12-22 21:24:30 +00:00
|
|
|
|
AUTO 4,1
|
2016-08-24 15:42:33 +00:00
|
|
|
|
*--------------------------------------
|
2016-09-26 16:00:52 +00:00
|
|
|
|
* K.PFTAdd
|
|
|
|
|
* In :
|
|
|
|
|
* Out :
|
|
|
|
|
*--------------------------------------
|
2018-12-21 14:32:45 +00:00
|
|
|
|
K.PFTAdd
|
2016-09-26 16:00:52 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* K.PFTRemove
|
|
|
|
|
* In :
|
|
|
|
|
* Out :
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
K.PFTRemove
|
|
|
|
|
clc
|
2018-12-21 14:32:45 +00:00
|
|
|
|
K.PFTRemove.RTS rts
|
2016-09-26 16:00:52 +00:00
|
|
|
|
*--------------------------------------
|
2018-09-05 15:22:46 +00:00
|
|
|
|
* PFT.CheckPathYA
|
2016-09-26 16:00:52 +00:00
|
|
|
|
* In :
|
2018-09-05 15:22:46 +00:00
|
|
|
|
* Y,A = PATH (C-String)
|
2016-09-26 16:00:52 +00:00
|
|
|
|
* Out :
|
2016-08-24 15:42:33 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-21 14:32:45 +00:00
|
|
|
|
PFT.CheckPathYA stx .6+1 Save SYSCALL #
|
2018-11-16 16:04:20 +00:00
|
|
|
|
jsr K.realpath.I realpath in K.Buf256
|
2018-12-21 14:32:45 +00:00
|
|
|
|
bcs K.PFTRemove.RTS
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2018-12-21 14:32:45 +00:00
|
|
|
|
ldx #0
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2018-12-21 14:32:45 +00:00
|
|
|
|
.1 lda Flt.Table.hPath,x
|
|
|
|
|
beq .8
|
|
|
|
|
jsr K.GetMemPtr
|
|
|
|
|
>STYA ZPPtr1
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2018-12-21 14:32:45 +00:00
|
|
|
|
ldy #$ff
|
2017-08-24 15:29:22 +00:00
|
|
|
|
|
2018-12-21 14:32:45 +00:00
|
|
|
|
.2 iny
|
|
|
|
|
lda (ZPPtr1),y "/FILTER\0"
|
2017-08-24 15:29:22 +00:00
|
|
|
|
beq .3 end of filter string....
|
|
|
|
|
|
2018-12-21 14:32:45 +00:00
|
|
|
|
cmp K.Buf256,y can be \0
|
|
|
|
|
beq .2
|
|
|
|
|
bra .8
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2018-12-21 14:32:45 +00:00
|
|
|
|
.3 lda K.Buf256,y path is "/FILTER/..." ?
|
2017-08-24 15:29:22 +00:00
|
|
|
|
cmp #'/'
|
|
|
|
|
bne .8
|
|
|
|
|
|
2018-12-21 14:32:45 +00:00
|
|
|
|
lda Flt.Table.hLib,x get hLib
|
2018-06-21 15:12:10 +00:00
|
|
|
|
jsr K.GetMemPtr
|
2018-12-21 14:32:45 +00:00
|
|
|
|
>STYA .7+1
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
|
|
|
|
pla discard JSR return @
|
|
|
|
|
pla
|
|
|
|
|
|
2018-11-16 16:04:20 +00:00
|
|
|
|
>LDYAI K.Buf256 pass full path to handler
|
2018-12-21 14:32:45 +00:00
|
|
|
|
.6 ldx #$ff SELF MODIFIED SYSCALL #
|
|
|
|
|
.7 jmp $ffff SELF MODIFIED
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2018-12-21 14:32:45 +00:00
|
|
|
|
.8 inx
|
|
|
|
|
cpx #K.FLT.MAX
|
|
|
|
|
bne .1
|
2018-11-16 22:43:12 +00:00
|
|
|
|
|
|
|
|
|
.80 >LDYAI K.Buf256
|
2018-11-16 16:04:20 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
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
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2018-11-16 16:04:20 +00:00
|
|
|
|
.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
|
2016-08-24 15:42:33 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-09-05 15:22:46 +00:00
|
|
|
|
* PFT.CheckNodeA
|
2016-09-26 16:00:52 +00:00
|
|
|
|
* In :
|
2018-11-16 16:04:20 +00:00
|
|
|
|
* A = hFILE
|
2016-09-26 16:00:52 +00:00
|
|
|
|
* Out :
|
2016-08-24 15:42:33 +00:00
|
|
|
|
*--------------------------------------
|
2018-11-16 16:04:20 +00:00
|
|
|
|
PFT.CheckNodeA stx .80+1 Save SYSCALL #
|
|
|
|
|
sta .81+1 Save hFILE
|
2018-10-08 05:55:28 +00:00
|
|
|
|
|
2018-11-16 16:04:20 +00:00
|
|
|
|
tax
|
2018-11-19 07:43:00 +00:00
|
|
|
|
lda OF.Table.hFD,x
|
2018-11-16 16:04:20 +00:00
|
|
|
|
beq .9
|
|
|
|
|
|
2018-11-19 21:13:55 +00:00
|
|
|
|
sta IO.hFD
|
2019-01-13 13:10:14 +00:00
|
|
|
|
ldy OF.Table.hPath,x if 0, its a hDEV
|
|
|
|
|
bne .10
|
2018-11-19 21:13:55 +00:00
|
|
|
|
|
2019-01-13 13:10:14 +00:00
|
|
|
|
tax
|
|
|
|
|
lda Dev.Table+1,x
|
|
|
|
|
ldy Dev.Table,x
|
|
|
|
|
bra .11
|
|
|
|
|
|
|
|
|
|
.10 jsr K.GetMemPtr
|
|
|
|
|
.11 >STYA pFD
|
2018-07-20 11:51:08 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.FD.HANDLER
|
2018-11-16 16:04:20 +00:00
|
|
|
|
lda (pFD),y
|
|
|
|
|
beq .8 Handler is 0, back to kernel....
|
|
|
|
|
|
2018-06-21 15:12:10 +00:00
|
|
|
|
jsr K.GetMemPtr
|
2016-08-29 15:12:04 +00:00
|
|
|
|
>STYA .1+1
|
|
|
|
|
|
|
|
|
|
pla discard JSR return @
|
|
|
|
|
pla
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2018-11-16 16:04:20 +00:00
|
|
|
|
ldx .80+1 restore SYSCALL #
|
|
|
|
|
lda .81+1 restore passed hFILE
|
|
|
|
|
|
2018-11-19 07:43:00 +00:00
|
|
|
|
.1 jmp $ffff SELF MODIFIED
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2018-11-16 16:04:20 +00:00
|
|
|
|
.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
|
2016-08-29 15:12:04 +00:00
|
|
|
|
|
2018-11-16 16:04:20 +00:00
|
|
|
|
.9 lda #E.INVH
|
|
|
|
|
sec
|
2016-08-24 15:42:33 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2018-11-17 17:17:13 +00:00
|
|
|
|
SAVE USR/SRC/SYS/KERNEL.S.PFT
|
|
|
|
|
LOAD USR/SRC/SYS/KERNEL.S
|
2016-08-24 15:42:33 +00:00
|
|
|
|
ASM
|