A2osX/SYS/KERNEL.S.MOUNT.txt

62 lines
970 B
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
AUTO 3,1
*--------------------------------------
* K.Mount
* ## ASM
* `>PUSHW mountpoint`
* `>PUSHW callback`
*
* Out : A = hMount
*--------------------------------------
K.Mount jsr SHARED.PullP2P1 callback,mountpoint
ldx #1
.1 lda PFTs.pHI-1,x
beq .2
inx
cpx #K.PFT.MAX+1
bne .1
lda #E.OOH
sec
rts
.2 lda ZPPtr1
sta PFTs.pLO-1,x
lda ZPPtr1+1
sta PFTs.pHI-1,x
lda ZPPtr2
sta PFTs.cbLO-1,x
lda ZPPtr2+1
sta PFTs.cbHI-1,x
txa
clc
rts
*--------------------------------------
* K.UMount
* In : A = hMount
* Out :
*--------------------------------------
K.UMount tax
lda PFTs.pHI-1,x
beq .9
stz PFTs.pHI-1,x
clc
rts
.9 lda #E.INVH
sec
rts
*--------------------------------------
MAN
SAVE usr/src/sys/kernel.s.mount
LOAD usr/src/sys/kernel.s
ASM