2016-08-24 15:42:33 +00:00
|
|
|
|
PR#3
|
2017-03-29 15:48:15 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
2017-03-15 16:44:15 +00:00
|
|
|
|
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 (PSTR)
|
|
|
|
|
* Out :
|
2016-08-24 15:42:33 +00:00
|
|
|
|
*--------------------------------------
|
2016-09-29 15:30:15 +00:00
|
|
|
|
PFT.CheckPathSTK
|
2016-08-26 15:10:38 +00:00
|
|
|
|
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
|
2016-08-26 15:10:38 +00:00
|
|
|
|
stx S.PFT.SYSCALL save #SYSCALL
|
2017-01-12 17:43:45 +00:00
|
|
|
|
>STYA ZPPtr1
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2016-10-03 06:18:46 +00:00
|
|
|
|
>LDYAI FltMgr.Table
|
2017-01-12 17:43:45 +00:00
|
|
|
|
>STYA ZPPtr2
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2017-01-12 17:43:45 +00:00
|
|
|
|
.1 lda (ZPPtr2) Get Filter Len
|
2016-08-24 15:42:33 +00:00
|
|
|
|
beq .9 End Of Table, Exit
|
|
|
|
|
tay
|
2017-01-12 17:43:45 +00:00
|
|
|
|
lda (ZPPtr1),y is there a "/" at this point in SRC path?
|
2016-08-24 15:42:33 +00:00
|
|
|
|
cmp #'/'
|
|
|
|
|
bne .8
|
|
|
|
|
|
2017-01-12 17:43:45 +00:00
|
|
|
|
.2 lda (ZPPtr1),y
|
|
|
|
|
cmp (ZPPtr2),y
|
2016-08-24 15:42:33 +00:00
|
|
|
|
bne .8
|
|
|
|
|
dey
|
|
|
|
|
bne .2
|
|
|
|
|
|
2016-08-28 20:48:01 +00:00
|
|
|
|
ldy #S.PFT.HANDLER
|
2017-01-12 17:43:45 +00:00
|
|
|
|
lda (ZPPtr2),y get hLib
|
2016-09-21 15:20:37 +00:00
|
|
|
|
jsr K.GetMemPtrA
|
2016-08-24 15:42:33 +00:00
|
|
|
|
>STYA .3+1
|
|
|
|
|
|
2016-08-26 15:10:38 +00:00
|
|
|
|
lda S.PFT.SYSCALL getback #SYSCALL
|
|
|
|
|
sec
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sbc #SYS.FOpen-4 0=Lib.load, 2=Lib.Unload
|
2016-08-26 15:10:38 +00:00
|
|
|
|
tax
|
|
|
|
|
|
2016-08-24 15:42:33 +00:00
|
|
|
|
pla discard JSR return @
|
|
|
|
|
pla
|
|
|
|
|
|
2017-01-12 17:43:45 +00:00
|
|
|
|
>LDYA ZPPtr1 restore passed params
|
2016-08-24 15:42:33 +00:00
|
|
|
|
.3 jmp $ffff
|
|
|
|
|
|
|
|
|
|
|
2017-01-12 17:43:45 +00:00
|
|
|
|
.8 lda ZPPtr2
|
2016-08-24 15:42:33 +00:00
|
|
|
|
clc
|
2017-01-12 17:43:45 +00:00
|
|
|
|
adc (ZPPtr2) Add STR len
|
2016-08-26 15:10:38 +00:00
|
|
|
|
adc #S.PFT
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta ZPPtr2
|
2016-08-26 15:10:38 +00:00
|
|
|
|
bcc .1
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2017-01-12 17:43:45 +00:00
|
|
|
|
.9 >LDYA ZPPtr1 restore passed params
|
2016-08-26 15:10:38 +00:00
|
|
|
|
ldx S.PFT.SYSCALL
|
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
|
|
|
|
*--------------------------------------
|
2016-12-09 16:36:24 +00:00
|
|
|
|
PFT.CheckNodeSTK
|
2016-08-26 15:10:38 +00:00
|
|
|
|
lda (pStack) read hFILE on top of stack
|
2016-12-09 16:36:24 +00:00
|
|
|
|
PFT.CheckNodeA stx S.PFT.SYSCALL save #SYSCALL
|
2016-08-29 15:12:04 +00:00
|
|
|
|
sta S.PFT.hFILE
|
2016-09-21 15:20:37 +00:00
|
|
|
|
jsr K.GetMemPtrA X = unmidified
|
2017-01-12 17:43:45 +00:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
lda (ZPPtr1)
|
2016-08-29 15:12:04 +00:00
|
|
|
|
beq .9 Handler is 0, back to kernel....
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
jsr K.GetMemPtrA
|
2016-08-29 15:12:04 +00:00
|
|
|
|
>STYA .1+1
|
|
|
|
|
|
|
|
|
|
lda S.PFT.SYSCALL getback #SYSCALL
|
|
|
|
|
sec
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sbc #SYS.FOpen-4 0=Lib.load, 2=Lib.Unload
|
2016-08-29 15:12:04 +00:00
|
|
|
|
tax
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2016-08-29 15:12:04 +00:00
|
|
|
|
pla discard JSR return @
|
|
|
|
|
pla
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2016-08-29 15:12:04 +00:00
|
|
|
|
lda S.PFT.hFILE restore passed params
|
|
|
|
|
.1 jmp $ffff
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2016-08-29 15:12:04 +00:00
|
|
|
|
|
|
|
|
|
.9 lda S.PFT.hFILE
|
2016-08-24 15:42:33 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-08-29 15:12:04 +00:00
|
|
|
|
S.PFT.hFILE .BS 1
|
2016-08-26 15:10:38 +00:00
|
|
|
|
S.PFT.SYSCALL .BS 1
|
2016-08-24 15:42:33 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2017-03-29 15:48:15 +00:00
|
|
|
|
SAVE /A2OSX.SRC/SYS/KERNEL.S.PFT
|
|
|
|
|
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
2016-08-24 15:42:33 +00:00
|
|
|
|
ASM
|