2021-12-02 21:28:26 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2024-01-20 13:13:22 +00:00
|
|
|
|
* TLINE.New hParent,X1,Y1,W,pBuf,MaxLen,F 8
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-09-04 20:12:49 +00:00
|
|
|
|
TLINE.New lda #S.OBJ.T.TLINE
|
|
|
|
|
jsr OBJ.Create
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PULLA
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #S.OBJ.F
|
2024-01-20 13:13:22 +00:00
|
|
|
|
ora #S.OBJ.F.bHScroll+S.OBJ.F.bEdit
|
2021-12-02 21:28:26 +00:00
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
2024-01-20 13:13:22 +00:00
|
|
|
|
jsr OBJ.PullBuf
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PULLA
|
|
|
|
|
ldy #S.OBJ.W
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
iny S.OBJ.H
|
|
|
|
|
lda #1
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.CurX
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
jsr OBJ.PullY1X1hParent
|
|
|
|
|
|
2023-02-10 18:19:29 +00:00
|
|
|
|
jsr CONT.Insert
|
2022-09-04 20:12:49 +00:00
|
|
|
|
bcs .99
|
|
|
|
|
|
|
|
|
|
lda hObj
|
|
|
|
|
* clc
|
|
|
|
|
rts
|
|
|
|
|
|
2024-01-20 13:13:22 +00:00
|
|
|
|
.9 >POP 8
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
.99 rts
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
TLINE.Run ldy #S.OBJ.S
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
bpl .9 S.OBJ.S.bActive
|
|
|
|
|
|
2024-01-25 18:44:59 +00:00
|
|
|
|
jsr OBJ.GetpBufPtr1
|
2024-01-17 21:04:13 +00:00
|
|
|
|
|
|
|
|
|
ldy #$ff
|
|
|
|
|
|
|
|
|
|
.1 iny
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
tya
|
|
|
|
|
ldy #S.TLINE.Len
|
|
|
|
|
sta (ZPObjPtr),y
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
lda (pStack) Event
|
|
|
|
|
cmp #C.DEL
|
|
|
|
|
beq TLINE.RUN.DEL
|
|
|
|
|
|
|
|
|
|
cmp #C.SPACE
|
|
|
|
|
bcs .2
|
|
|
|
|
|
|
|
|
|
cmp #C.BS
|
|
|
|
|
beq TLINE.RUN.BS
|
|
|
|
|
|
2023-04-22 18:58:37 +00:00
|
|
|
|
cmp #21 Forward Space
|
2021-12-02 21:28:26 +00:00
|
|
|
|
beq TLINE.RUN.FS
|
|
|
|
|
|
|
|
|
|
.9 lda #0
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-09-04 20:12:49 +00:00
|
|
|
|
.2 ldy #S.OBJ.BufSize
|
2021-12-02 21:28:26 +00:00
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
ldy #S.TLINE.Len
|
|
|
|
|
cmp (ZPObjPtr),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
inc
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
ldy #S.TLINE.Ptr
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sta TempW
|
|
|
|
|
inc
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
ply
|
|
|
|
|
|
2024-01-17 21:04:13 +00:00
|
|
|
|
.3 dey
|
2021-12-02 21:28:26 +00:00
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
iny
|
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
|
|
|
|
|
dey
|
|
|
|
|
cpy TempW
|
2024-01-17 21:04:13 +00:00
|
|
|
|
bne .3
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
lda (pStack)
|
|
|
|
|
ldy TempW
|
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jmp TLINE.SetViewPort
|
|
|
|
|
|
|
|
|
|
.8 lda #0
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
TLINE.RUN.BS ldy #S.TLINE.Ptr
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
dec
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
jmp TLINE.SetViewPort
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
TLINE.RUN.FS ldy #S.TLINE.Len
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
ldy #S.TLINE.Ptr
|
|
|
|
|
eor (ZPObjPtr),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
inc
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
jmp TLINE.SetViewPort
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
TLINE.RUN.DEL ldy #S.TLINE.Ptr
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
tay
|
|
|
|
|
|
|
|
|
|
.1 lda (ZPPtr1),y
|
|
|
|
|
dey
|
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
tax
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
iny
|
|
|
|
|
bra .1
|
|
|
|
|
|
|
|
|
|
.2 ldy #S.TLINE.Len
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
dec
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
jmp TLINE.RUN.BS
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2024-01-25 18:44:59 +00:00
|
|
|
|
TLINE.Draw jsr OBJ.GetpBufPtr1
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
ldx #C.SPACE
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.S
|
|
|
|
|
lda (ZPObjPtr),y S.OBJ.S.bActive
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
ldx #'['
|
|
|
|
|
|
|
|
|
|
.1 txa
|
|
|
|
|
jsr LB.COut
|
|
|
|
|
|
|
|
|
|
ldy #S.TLINE.HScroll
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
beq .12
|
|
|
|
|
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
.11 jsr TLINE.GetLineChar
|
|
|
|
|
beq .12
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
bne .11
|
|
|
|
|
|
|
|
|
|
.12 ldy #S.OBJ.InnerW
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
dex
|
|
|
|
|
|
|
|
|
|
.2 jsr TLINE.GetLineChar
|
|
|
|
|
beq .3
|
|
|
|
|
|
|
|
|
|
jsr LB.COut
|
|
|
|
|
dex
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
.3 txa
|
|
|
|
|
beq .5
|
|
|
|
|
|
|
|
|
|
lda #C.SPACE
|
|
|
|
|
|
|
|
|
|
.4 jsr LB.COut
|
|
|
|
|
dex
|
|
|
|
|
bne .4
|
|
|
|
|
|
|
|
|
|
.5 ldx #C.SPACE
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.S
|
|
|
|
|
lda (ZPObjPtr),y S.OBJ.S.bActive
|
|
|
|
|
bpl .6
|
|
|
|
|
|
|
|
|
|
ldx #']'
|
|
|
|
|
|
|
|
|
|
.6 txa
|
|
|
|
|
jsr LB.COut
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
TLINE.Activate
|
|
|
|
|
TLINE.Deactivate
|
|
|
|
|
jmp OBJ.Draw.Body
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
TLINE.GetLineChar
|
|
|
|
|
lda (ZPPtr1)
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
inc ZPPtr1
|
|
|
|
|
bne .8
|
|
|
|
|
|
|
|
|
|
inc ZPPtr1+1
|
|
|
|
|
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
TLINE.SetViewPort
|
|
|
|
|
ldy #S.TLINE.Ptr
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
ldy #S.TLINE.HScroll
|
|
|
|
|
sec
|
|
|
|
|
sbc (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.CurX set CurX = Ptr - HScroll
|
|
|
|
|
inc +1
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
bcs .10 yes..
|
|
|
|
|
|
|
|
|
|
ldy #S.TLINE.Ptr no, set HScroll = Ptr
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
ldy #S.TLINE.HScroll
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
lda #0 set CurX = 0+1
|
|
|
|
|
bra .20
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.10 ldy #S.TLINE.HScroll
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.InnerW
|
|
|
|
|
clc
|
|
|
|
|
adc (ZPObjPtr),y
|
|
|
|
|
dec
|
|
|
|
|
dec
|
|
|
|
|
|
|
|
|
|
ldy #S.TLINE.Ptr (HScroll + InnerW-2) > (Ptr + 1) ?
|
|
|
|
|
clc Ptr+1
|
|
|
|
|
sbc (ZPObjPtr),y
|
|
|
|
|
bcs .8 no...
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.InnerW yes, set HScroll = Ptr - (InnerW - 1)
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
dec
|
|
|
|
|
dec
|
|
|
|
|
dec
|
|
|
|
|
sta TempW (InnerW - 1)
|
|
|
|
|
|
|
|
|
|
ldy #S.TLINE.Ptr
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sec
|
|
|
|
|
sbc TempW
|
|
|
|
|
bcc .12 Ptr - (InnerW - 1) < 0
|
|
|
|
|
|
|
|
|
|
ldy #S.TLINE.HScroll
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
lda TempW set CurX = (InnerW - 1)
|
|
|
|
|
bra .20
|
|
|
|
|
|
|
|
|
|
.12 lda #0
|
|
|
|
|
ldy #S.TLINE.HScroll
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
.20 inc
|
|
|
|
|
ldy #S.OBJ.CurX
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
ror bRepaintAll
|
|
|
|
|
|
|
|
|
|
.8 ldy #1 hObj
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
jsr OBJ.Draw.Body
|
|
|
|
|
inc pStack
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
* clc
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/lib/libtui.s.tline
|
|
|
|
|
LOAD usr/src/lib/libtui.s
|
|
|
|
|
ASM
|