2016-08-24 15:42:33 +00:00
|
|
|
|
PR#3
|
|
|
|
|
PREFIX /A2OSX.SRC
|
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* In :
|
|
|
|
|
* Y,A = PATH (PSTR)
|
|
|
|
|
* Out :
|
|
|
|
|
* CC :
|
|
|
|
|
* CS : A = EC
|
|
|
|
|
*--------------------------------------
|
2016-08-26 15:10:38 +00:00
|
|
|
|
S.PFTCHECKPATHSTK
|
|
|
|
|
lda (pStack) read PTR.LO on top of stack
|
|
|
|
|
pha
|
|
|
|
|
ldy #1
|
|
|
|
|
lda (pStack),y read PTR.HI on top of stack
|
|
|
|
|
ply
|
2016-08-24 15:42:33 +00:00
|
|
|
|
S.PFTCHECKPATHYA
|
2016-08-26 15:10:38 +00:00
|
|
|
|
stx S.PFT.SYSCALL save #SYSCALL
|
2016-08-24 15:42:33 +00:00
|
|
|
|
>STYA ZPQuickPtr1
|
|
|
|
|
|
|
|
|
|
>LDYA FltMgr.Table
|
|
|
|
|
>STYA ZPQuickPtr2
|
|
|
|
|
|
|
|
|
|
.1 lda (ZPQuickPtr2) Get Filter Len
|
|
|
|
|
beq .9 End Of Table, Exit
|
|
|
|
|
tay
|
|
|
|
|
lda (ZPQuickPtr1),y is there a "/" at this point in SRC path?
|
|
|
|
|
cmp #'/'
|
|
|
|
|
bne .8
|
|
|
|
|
|
|
|
|
|
.2 lda (ZPQuickPtr1),y
|
|
|
|
|
cmp (ZPQuickPtr2),y
|
|
|
|
|
bne .8
|
|
|
|
|
dey
|
|
|
|
|
bne .2
|
|
|
|
|
|
2016-08-28 20:48:01 +00:00
|
|
|
|
ldy #S.PFT.HANDLER
|
2016-08-24 15:42:33 +00:00
|
|
|
|
lda (ZPQuickPtr2),y get hLib
|
|
|
|
|
jsr S.GetMemPtrA
|
|
|
|
|
>STYA .3+1
|
|
|
|
|
|
2016-08-26 15:10:38 +00:00
|
|
|
|
lda S.PFT.SYSCALL getback #SYSCALL
|
|
|
|
|
sec
|
|
|
|
|
sbc #SYS.FOPEN-4 0=Lib.load, 2=Lib.Unload
|
|
|
|
|
tax
|
|
|
|
|
|
2016-08-24 15:42:33 +00:00
|
|
|
|
pla discard JSR return @
|
|
|
|
|
pla
|
|
|
|
|
|
|
|
|
|
>LDYA ZPQuickPtr1 restore passed params
|
|
|
|
|
.3 jmp $ffff
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.8 lda ZPQuickPtr2
|
|
|
|
|
clc
|
|
|
|
|
adc (ZPQuickPtr2) Add STR len
|
2016-08-26 15:10:38 +00:00
|
|
|
|
adc #S.PFT
|
2016-08-24 15:42:33 +00:00
|
|
|
|
sta ZPQuickPtr2
|
2016-08-26 15:10:38 +00:00
|
|
|
|
bcc .1
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
2016-08-26 15:10:38 +00:00
|
|
|
|
.9 >LDYA ZPQuickPtr1 restore passed params
|
|
|
|
|
ldx S.PFT.SYSCALL
|
2016-08-28 20:48:01 +00:00
|
|
|
|
>LDYA ZPQuickPtr1
|
2016-08-24 15:42:33 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* In :
|
2016-08-26 15:10:38 +00:00
|
|
|
|
* PUSHB/A = hFILE
|
2016-08-24 15:42:33 +00:00
|
|
|
|
* Out :
|
|
|
|
|
* CC : Y,A = PTR to S.DIRENT
|
|
|
|
|
* CS : A = EC
|
|
|
|
|
*--------------------------------------
|
2016-08-26 15:10:38 +00:00
|
|
|
|
S.PFTCHECKFILESTK
|
|
|
|
|
lda (pStack) read hFILE on top of stack
|
|
|
|
|
S.PFTCHECKFILEA
|
2016-08-28 20:48:01 +00:00
|
|
|
|
jsr S.GetMemPtrA X = unmidified
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* In :
|
2016-08-26 15:10:38 +00:00
|
|
|
|
* hDIR
|
2016-08-24 15:42:33 +00:00
|
|
|
|
*--------------------------------------
|
2016-08-26 15:10:38 +00:00
|
|
|
|
S.PFTCHECKDIRA lda (pStack) read hDIR on top of stack
|
2016-08-24 15:42:33 +00:00
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
*--------------------------------------
|
2016-08-26 15:10:38 +00:00
|
|
|
|
S.PFT.SYSCALL .BS 1
|
2016-08-24 15:42:33 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE SYS/KERNEL.S.PFT
|
|
|
|
|
LOAD SYS/KERNEL.S
|
|
|
|
|
ASM
|