A2osX/SYS/KERNEL.S.PFT.txt

131 lines
2.3 KiB
Plaintext
Raw Normal View History

2017-12-22 21:24:30 +00:00
NEW
2019-05-25 19:24:07 +00:00
AUTO 3,1
2016-08-24 15:42:33 +00:00
*--------------------------------------
2020-02-14 07:21:56 +00:00
PFT.CheckPath0 ldy #0
.HS 2C BIT ABS
2020-03-10 16:42:07 +00:00
PFT.CheckPath1 ldy #1
.HS 2C BIT ABS
2020-02-14 07:21:56 +00:00
PFT.CheckPath2 ldy #2
.HS 2C BIT ABS
PFT.CheckPath4 ldy #4
2019-10-10 10:23:02 +00:00
2020-02-14 07:21:56 +00:00
lda (pStack),y
pha
iny
lda (pStack),y
2020-03-16 06:50:15 +00:00
ply
PFT.CheckPathYA >PUSHYA
2020-12-15 13:23:22 +00:00
2020-03-16 06:50:15 +00:00
stx .6+1 Save SYSCALL #
2020-02-14 07:21:56 +00:00
>PUSHWI K.Buf256
>SYSCALL2 realpath
2020-05-17 17:34:32 +00:00
bcs PFT.YAToMLIPATH.RTS
2019-10-10 10:23:02 +00:00
2018-12-21 14:32:45 +00:00
ldx #0
2019-10-10 10:23:02 +00:00
2018-12-21 14:32:45 +00:00
.1 lda Flt.Table.hPath,x
beq .8
2019-10-10 10:23:02 +00:00
2018-12-21 14:32:45 +00:00
jsr K.GetMemPtr
>STYA ZPPtr1
2019-10-10 10:23:02 +00:00
2018-12-21 14:32:45 +00:00
ldy #$ff
2019-10-10 10:23:02 +00:00
2018-12-21 14:32:45 +00:00
.2 iny
lda (ZPPtr1),y "/FILTER\0"
beq .3 end of filter string....
2019-10-10 10:23:02 +00:00
2018-12-21 14:32:45 +00:00
cmp K.Buf256,y can be \0
beq .2
2019-10-10 10:23:02 +00:00
2018-12-21 14:32:45 +00:00
bra .8
2019-10-10 10:23:02 +00:00
2018-12-21 14:32:45 +00:00
.3 lda K.Buf256,y path is "/FILTER/..." ?
cmp #'/'
bne .8
2019-10-10 10:23:02 +00:00
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
2019-10-10 10:23:02 +00:00
2020-12-15 13:23:22 +00:00
.6 ldx #$ff SELF MODIFIED SYSCALL #
2018-12-21 14:32:45 +00:00
.7 jmp $ffff SELF MODIFIED
2019-10-10 10:23:02 +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
2019-12-02 07:09:58 +00:00
>LDYAI K.Buf256
2018-11-16 16:04:20 +00:00
*--------------------------------------
PFT.YAToMLIPATH >STYA .1+1
2019-10-10 10:23:02 +00:00
2018-11-16 16:04:20 +00:00
ldx #0 no filter, prodos path
2019-10-10 10:23:02 +00:00
2018-11-16 16:04:20 +00:00
.1 lda $ffff,x SELF MODIFIED
beq .2
2019-10-10 10:23:02 +00:00
2018-11-16 16:04:20 +00:00
inx
sta K.MLI.PATH,x
cpx #MLI.MAXPATH
bne .1
2019-10-10 10:23:02 +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
2019-10-10 10:23:02 +00:00
2018-11-16 16:04:20 +00:00
clc
2020-05-17 17:34:32 +00:00
PFT.YAToMLIPATH.RTS
2016-08-24 15:42:33 +00:00
rts
*--------------------------------------
2020-08-19 19:39:43 +00:00
PFT.CheckNode4 ldy #4
.HS 2C BIT ABS
PFT.CheckNode2 ldy #2
2020-12-15 13:23:22 +00:00
2020-08-19 19:39:43 +00:00
lda (pStack),y
2020-12-15 13:23:22 +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
2020-12-15 13:23:22 +00:00
jsr DEV.GetPFD
bcs .99
2019-10-10 10:23:02 +00:00
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
>STYA .1+1
pla discard JSR return @
pla
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
2020-09-07 20:40:50 +00:00
cmp #S.FD.T.CDEV
2020-12-15 13:23:22 +00:00
bcs .80
2020-09-07 20:40:50 +00:00
ldy #S.FD.REG.REF REG or DIR
2018-11-16 16:04:20 +00:00
lda (pFD),y
sta K.MLI.PARAMS+1
2019-10-10 10:23:02 +00:00
2018-11-16 16:04:20 +00:00
.80 ldx #$ff SELF MODIFIED
.81 lda #$ff SELF MODIFIED
clc
2019-10-10 10:23:02 +00:00
2020-12-15 13:23:22 +00:00
.99 rts
2016-08-24 15:42:33 +00:00
*--------------------------------------
MAN
2020-12-15 13:23:22 +00:00
SAVE usr/src/sys/kernel.s.pft
LOAD usr/src/sys/kernel.s
2016-08-24 15:42:33 +00:00
ASM