mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-22 16:31:07 +00:00
111 lines
2.1 KiB
Plaintext
111 lines
2.1 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
.LIST OFF
|
||
.OP 65C02
|
||
.OR $2000
|
||
.TF lib/libtui
|
||
*--------------------------------------
|
||
.INB inc/macros.i
|
||
.INB inc/a2osx.i
|
||
.INB inc/kernel.i
|
||
.INB inc/libtui.i
|
||
*--------------------------------------
|
||
.DUMMY
|
||
.OR ZPLIB
|
||
ZPObjPtr .BS 2
|
||
ZPPtr1 .BS 2
|
||
.ED
|
||
*--------------------------------------
|
||
* File Header (16 Bytes)
|
||
*--------------------------------------
|
||
CS.START cld
|
||
jmp (.1,x)
|
||
.DA #$61 6502,Level 1 (65c02)
|
||
.DA #1 BIN Layout Version 1
|
||
.DA 0
|
||
.DA CS.END-CS.START
|
||
.DA 0
|
||
.DA 0
|
||
.DA 0
|
||
*--------------------------------------
|
||
* Relocation Table
|
||
*--------------------------------------
|
||
.1 .DA LIB.LOAD
|
||
.DA LIB.UNLOAD
|
||
.DA LIBTUI.Init
|
||
.DA LIBTUI.Close
|
||
.DA 0
|
||
*--------------------------------------
|
||
LIB.LOAD clc
|
||
rts
|
||
*--------------------------------------
|
||
LIB.UNLOAD clc
|
||
rts
|
||
*--------------------------------------
|
||
LIBTUI.Init clc
|
||
rts
|
||
*--------------------------------------
|
||
LIBTUI.Close clc
|
||
rts
|
||
*--------------------------------------
|
||
LIBTUI.LBOXNew >STYA ZPPtr1
|
||
|
||
>LDYAI S.LBOX
|
||
>SYSCALL GetMem
|
||
bcs .9
|
||
|
||
>STYA ZPObjPtr
|
||
|
||
lda #S.OBJ.T.LBOX
|
||
sta (ZPObjPtr)
|
||
|
||
ldy #S.OBJ.F
|
||
|
||
.1 lda (ZPPtr1),y
|
||
sta (ZPObjPtr),y
|
||
|
||
cpy #S.OBJ.H+1
|
||
bne .1
|
||
|
||
.8 txa
|
||
clc
|
||
.9 rts
|
||
*--------------------------------------
|
||
LIBTUI.LBOXLoad
|
||
*--------------------------------------
|
||
LIBTUI.LBOXFocus
|
||
*--------------------------------------
|
||
LIBTUI.LBOXRun
|
||
*--------------------------------------
|
||
LIBTUI.LBOXClose
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
LIBGUI.SetupX2Y2
|
||
ldy #S.OBJ.X1
|
||
jsr .1
|
||
|
||
ldy #S.OBJ.Y1
|
||
|
||
.1 clc
|
||
|
||
lda (ZPObjPtr),y
|
||
iny
|
||
iny S.OBJ.W/H
|
||
adc (ZPObjPtr),y
|
||
iny
|
||
iny S.OBJ.X2/Y2
|
||
sta (ZPObjPtr),y
|
||
rts
|
||
*--------------------------------------
|
||
LIBTUI.DrawFrame
|
||
|
||
*--------------------------------------
|
||
CS.END
|
||
*--------------------------------------
|
||
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE usr/src/lib/libtui.s
|
||
ASM
|