mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 05:32:20 +00:00
04a83f00f3
MKDIR:completely implemented LS/RM/MV/CP: combined switches KERNEL:SList API now handle options to handle several languages/parsers
70 lines
1.4 KiB
Plaintext
70 lines
1.4 KiB
Plaintext
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
|