A2osX/SYS/KERNEL.S.STKOBJ.txt
burniouf 04a83f00f3 SH:new ALIAS cmd, new && operator
MKDIR:completely implemented
LS/RM/MV/CP: combined switches
KERNEL:SList API now handle options to handle several languages/parsers
2022-10-07 21:21:37 +02:00

70 lines
1.4 KiB
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
*/--------------------------------------
* # LoadStkObj
* Load a file in AUX memory (Stock Objects)
* PUSHW = PATH (Handled by....
* PUSHB = MODE ...
* PUSHB = TYPE ...
* PUSHW = AUXTYPE ...FOpen)
* ## RETURN VALUE
* Y,A = File Length
* X = hMem of Loaded Object in AUX mem
*\--------------------------------------
K.LoadStkObj jsr K.LoadFile0 ... ending \0
bcs .99
stx .90+1
sty .81+1 Save File Len
sta .82+1
iny
bne .1
inc +1 for ending 0
.1 jsr MEM.MoveToAux X = AUX hMem
bcs .9
.81 ldy #$ff and file len in Y,A
.82 lda #$ff
* clc
rts
.9 pha
.90 lda #$ff SELF MODIFIED
jsr K.freemem
pla
sec
.99 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.stkobj
LOAD usr/src/sys/kernel.s
ASM