A2osX/SYS/KERNEL.S.TBUF.txt
2025-01-19 17:12:51 +01:00

117 lines
2.2 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
*/--------------------------------------
* # TBufGetL
* ## ASM
* `>SS`
* `>PUSHW pTBuf`
* `>PUSHW LineNum`
* `>PUSHW DataPtr`
* `>KAPI TBufGetL`
* `>SR`
* ## RETURN VALUE
*\--------------------------------------
K.TBufGetL ldy #0 DataPtr
jsr RAMSW.StkY2FORPNT
ldy #2 LineNum
jsr RAMSW.GetStkYW
>STYA SLIST.ScopeID
ldy #4 pTBuf
jsr RAMSW.GetStkYW
>STYA pIBlk
lda (pIBlk) hlBlk
jsr MEM.GetMemByID
jsr MEM.GetMEMPTR
>STYA pLblk
.1
*/--------------------------------------
* # TBufGetB
* ## ASM
* `>SS`
* `>PUSHW pTBuf`
* `>PUSHW DataOfs`
* `>PUSHW DataPtr`
* `>PUSHW DataLen`
* `>KAPI TBufGetB`
* `>SR`
* ## RETURN VALUE
*\--------------------------------------
K.TBufGetB ldy #6 pTBuf
jsr RAMSW.GetStkYW
>STYA pIBlk
ldy #4 DataOfs
jsr RAMSW.StkY2FORPNT
>STYA ZPSListDataOfs
stz iByte
lda #2
sta iBlk
*/--------------------------------------
* # TBufIns
* ## ASM
* `>SS`
* `>PUSHW pTBuf`
* `>PUSHW DataOfs`
* `>PUSHW DataPtr`
* `>PUSHW DataLen`
* `>KAPI TBufIns`
* `>SR`
* ## RETURN VALUE
*\--------------------------------------
K.TBufIns
*/--------------------------------------
* # TBufDel
* ## ASM
* `>SS`
* `>PUSHW pTBuf`
* `>PUSHW DataOfs`
* `>PUSHW DataLen`
* `>KAPI TBufDel`
* `>SR`
* ## RETURN VALUE
*\--------------------------------------
K.TBufDel
*/--------------------------------------
* # TBufNew
* ## ASM
* `>KAPI TBufNew`
* ## RETURN VALUE
*\--------------------------------------
K.TBufNew >LDYAI 178 hlBlk,bank + 176 hMEMs
ldx #S.MEM.F.INIT0 index
jsr MEM.Malloc.YAX
bcs .9
txa hlBlk
jmp BLIST.New
.9 rts
*/--------------------------------------
* # TBufFree
* ## ASM
* `>LDYA pTBuf`
* `>KAPI TBufFree`
* ## RETURN VALUE
*\--------------------------------------
K.TBufFree >STYA pIBlk
lda (pIBlk) hlBlk
jsr MEM.FreeA
>LDYA pIBlk
jmp BLIST.Free
*--------------------------------------
MAN
SAVE usr/src/sys/kernel.s.tbuf
LOAD usr/src/sys/kernel.s
ASM