A2osX/SYS/KERNEL.S.MOUNT.txt
2021-01-12 22:14:13 +01:00

94 lines
1.6 KiB
Plaintext
Raw 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 >PULLW ZPPtr2 callback
>PULLW ZPPtr1 mountpoint
ldx #1
.1 lda Flt.Table.pftHI-1,x
beq .2
inx
cpx #K.FLT.MAX+1
bne .1
lda #E.OOH
sec
rts
.2 lda ZPPtr1
sta Flt.Table.pftLO-1,x
lda ZPPtr1+1
sta Flt.Table.pftHI-1,x
lda ZPPtr2
sta Flt.Table.cbLO-1,x
lda ZPPtr2+1
sta Flt.Table.cbHI-1,x
txa
clc
rts
*--------------------------------------
* K.UMount
* In : A = hMount
* Out :
*--------------------------------------
K.UMount tax
lda Flt.Table.pftHI-1,x
beq .9
stz Flt.Table.pftHI-1,x
clc
rts
.9 lda #E.INVH
sec
rts
*--------------------------------------
K.Online >PULLW K.MLI.PARAMS+2
>PULLB K.MLI.PARAMS+1
>MLICALL MLIONLINE
rts
*/--------------------------------------
* # GetStkObj
* ## C
* `int *ptr getstkobj (short int hStkObj);`
* ## ASM
* `lda hStkObj`
* `>SYSCALL GetStkObj`
* ## RETURN VALUE
* CC : success
* X = hMem
* Y,A = ptr
* CS : error
* A = EC
*\--------------------------------------
K.GetStkObj tax hMem for CopyToMain
jsr MEM.GetMemByID
ldy #S.MEM.LEN
lda (ZPMemMgrSPtr),y
pha
iny
lda (ZPMemMgrSPtr),y
ply YA = Len
jmp MEM.CopyToMain
*--------------------------------------
MAN
SAVE usr/src/sys/kernel.s.mount
LOAD usr/src/sys/kernel.s
ASM