2021-12-02 21:28:26 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LB.Init >LDYA LineBuf
|
|
|
|
|
>STYA ZPLineBufPtr
|
|
|
|
|
stz ZPLineBufCnt
|
|
|
|
|
stz ZPLineBufCnt+1
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LB.SeqOut lda SEQS,x
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
jsr LB.COut
|
|
|
|
|
inx
|
|
|
|
|
bra LB.SeqOut
|
|
|
|
|
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LB.GotoXY >PUSHW ZPLineBufPtr
|
|
|
|
|
>PUSHW L.SEQ.GOTOXY
|
|
|
|
|
|
|
|
|
|
tya
|
|
|
|
|
inc
|
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
inc
|
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
>PUSHBI 2
|
|
|
|
|
jmp LB.PrintF
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LB.SetColor >PUSHW ZPLineBufPtr
|
|
|
|
|
>PUSHW L.SEQ.COLOR
|
|
|
|
|
|
|
|
|
|
lda (ZPObjPtr)
|
|
|
|
|
tax
|
|
|
|
|
>PUSHB OBJ.COLORS,x
|
|
|
|
|
lda OBJ.COLORS+1,x
|
|
|
|
|
bne .7
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.hParent
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
beq .7
|
|
|
|
|
|
|
|
|
|
>SYSCALL2 GetMemPtr
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
|
|
|
|
|
lda (ZPPtr1)
|
|
|
|
|
tax
|
|
|
|
|
lda OBJ.COLORS+1,x
|
|
|
|
|
|
|
|
|
|
.7 >PUSHA
|
|
|
|
|
>PUSHBI 2
|
|
|
|
|
jmp LB.PrintF
|
|
|
|
|
*--------------------------------------
|
2022-09-04 20:12:49 +00:00
|
|
|
|
LB.Ptr1OutEscMaxX
|
|
|
|
|
ldy #0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
.1 lda (ZPPtr1),y
|
|
|
|
|
beq .8
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
cmp #C.CR
|
2021-12-02 21:28:26 +00:00
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
jsr LB.COut
|
2022-09-04 20:12:49 +00:00
|
|
|
|
iny
|
2021-12-02 21:28:26 +00:00
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LB.PrintF >SYSCALL2 SPrintF
|
|
|
|
|
tya
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
adc ZPLineBufPtr
|
|
|
|
|
sta ZPLineBufPtr
|
|
|
|
|
bcc .1
|
|
|
|
|
|
|
|
|
|
inc ZPLineBufPtr+1
|
|
|
|
|
clc
|
|
|
|
|
|
|
|
|
|
.1 tya
|
|
|
|
|
adc ZPLineBufCnt
|
|
|
|
|
sta ZPLineBufCnt
|
|
|
|
|
bcc .8
|
|
|
|
|
|
|
|
|
|
inc ZPLineBufCnt+1
|
|
|
|
|
clc
|
|
|
|
|
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LB.HexOut pha
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
jsr .1
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
and #$0F
|
|
|
|
|
|
|
|
|
|
.1 ora #$30
|
|
|
|
|
cmp #'9'+1
|
|
|
|
|
bcc LB.COut
|
|
|
|
|
|
|
|
|
|
adc #6
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LB.COut sta (ZPLineBufPtr)
|
|
|
|
|
inc ZPLineBufPtr
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
inc ZPLineBufPtr+1
|
|
|
|
|
|
|
|
|
|
.1 inc ZPLineBufCnt
|
|
|
|
|
bne .8
|
|
|
|
|
|
|
|
|
|
inc ZPLineBufCnt+1
|
|
|
|
|
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LB.Out ldx ZPCtxPtr
|
|
|
|
|
phx
|
|
|
|
|
ldx ZPCtxPtr+1
|
|
|
|
|
phx
|
|
|
|
|
ldx ZPObjPtr
|
|
|
|
|
phx
|
|
|
|
|
ldx ZPObjPtr+1
|
|
|
|
|
phx
|
|
|
|
|
|
|
|
|
|
ldy #S.PS.hStdOut
|
|
|
|
|
lda (pPS),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
>PUSHW LineBuf
|
|
|
|
|
>PUSHW ZPLineBufCnt
|
|
|
|
|
>SYSCALL fwrite
|
|
|
|
|
|
|
|
|
|
plx
|
|
|
|
|
stx ZPObjPtr+1
|
|
|
|
|
plx
|
|
|
|
|
stx ZPObjPtr
|
|
|
|
|
plx
|
|
|
|
|
stx ZPCtxPtr+1
|
|
|
|
|
plx
|
|
|
|
|
stx ZPCtxPtr
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/lib/libtui.s.lb
|
|
|
|
|
LOAD usr/src/lib/libtui.s
|
|
|
|
|
ASM
|