A2osX/SYS/KERNEL.S.MOUNT.txt

62 lines
970 B
Plaintext
Raw Permalink Normal View History

2020-05-17 17:34:32 +00:00
NEW
AUTO 3,1
*--------------------------------------
* K.Mount
2021-01-12 21:14:13 +00:00
* ## ASM
* `>PUSHW mountpoint`
* `>PUSHW callback`
*
* Out : A = hMount
2020-05-17 17:34:32 +00:00
*--------------------------------------
2021-05-04 17:31:21 +00:00
K.Mount jsr SHARED.PullP2P1 callback,mountpoint
2021-01-12 21:14:13 +00:00
ldx #1
2023-10-18 05:41:12 +00:00
.1 lda PFTs.pHI-1,x
2021-01-12 21:14:13 +00:00
beq .2
inx
2023-10-18 05:41:12 +00:00
cpx #K.PFT.MAX+1
2021-01-12 21:14:13 +00:00
bne .1
lda #E.OOH
sec
rts
.2 lda ZPPtr1
2023-10-18 05:41:12 +00:00
sta PFTs.pLO-1,x
2021-01-12 21:14:13 +00:00
lda ZPPtr1+1
2023-10-18 05:41:12 +00:00
sta PFTs.pHI-1,x
2021-01-12 21:14:13 +00:00
lda ZPPtr2
2023-10-18 05:41:12 +00:00
sta PFTs.cbLO-1,x
2021-01-12 21:14:13 +00:00
lda ZPPtr2+1
2023-10-18 05:41:12 +00:00
sta PFTs.cbHI-1,x
2021-01-12 21:14:13 +00:00
txa
clc
rts
2020-05-17 17:34:32 +00:00
*--------------------------------------
* K.UMount
2021-01-12 21:14:13 +00:00
* In : A = hMount
2020-05-17 17:34:32 +00:00
* Out :
*--------------------------------------
2021-01-12 21:14:13 +00:00
K.UMount tax
2023-10-18 05:41:12 +00:00
lda PFTs.pHI-1,x
2021-01-12 21:14:13 +00:00
beq .9
2023-10-18 05:41:12 +00:00
stz PFTs.pHI-1,x
2020-05-17 17:34:32 +00:00
clc
rts
2021-01-12 21:14:13 +00:00
.9 lda #E.INVH
sec
rts
2020-07-30 13:59:04 +00:00
*--------------------------------------
2020-05-17 17:34:32 +00:00
MAN
2020-07-07 13:44:28 +00:00
SAVE usr/src/sys/kernel.s.mount
LOAD usr/src/sys/kernel.s
2020-05-17 17:34:32 +00:00
ASM