A2osX/LIB/LIBTUI.S.txt
2021-04-15 22:52:08 +02:00

111 lines
2.1 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
.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