2021-12-02 21:28:26 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2024-01-20 13:13:22 +00:00
|
|
|
|
* BUT.New hParent,X1,Y1,HK,EV,pLabel,F 8
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-09-04 20:12:49 +00:00
|
|
|
|
BUT.New lda #S.OBJ.T.BUT
|
|
|
|
|
jsr OBJ.Create
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bcs .9
|
2024-01-20 13:13:22 +00:00
|
|
|
|
|
|
|
|
|
>PULLA
|
|
|
|
|
ldy #S.OBJ.F
|
|
|
|
|
sta (ZPObjPtr),y
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.BUT.pLabel
|
|
|
|
|
jsr OBJ.PullWordY
|
|
|
|
|
stx ZPPtr1
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
|
|
|
|
|
ldy #$ff
|
|
|
|
|
|
|
|
|
|
.1 iny
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
tya
|
|
|
|
|
inc
|
|
|
|
|
inc
|
|
|
|
|
ldy #S.OBJ.W
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.H
|
|
|
|
|
lda #1
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
>PULLA
|
|
|
|
|
ldy #S.BUT.EV
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
>PULLA
|
|
|
|
|
ldy #S.BUT.HotKey
|
|
|
|
|
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
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
.9 >POP 7
|
|
|
|
|
|
|
|
|
|
.99 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
BUT.Run lda (pStack) Event
|
|
|
|
|
ldy #S.BUT.HotKey
|
|
|
|
|
cmp (ZPObjPtr),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.S
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
bpl .9
|
|
|
|
|
|
|
|
|
|
lda (pStack) Event
|
|
|
|
|
cmp #C.SPACE
|
|
|
|
|
bne .9
|
|
|
|
|
|
|
|
|
|
.8 ldy #S.BUT.EV
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 lda #0
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
BUT.Draw ldy #S.BUT.pLabel
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sta ZPPtr1
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
|
|
|
|
|
ldx #SEQ.INVERSE-SEQS
|
|
|
|
|
jsr LB.SeqOut
|
|
|
|
|
|
|
|
|
|
ldx #C.SPACE
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.S
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
ldx #'['
|
|
|
|
|
|
|
|
|
|
.1 txa
|
|
|
|
|
jsr LB.COut
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.InnerW
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
dex
|
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
|
|
|
|
|
.2 lda (ZPPtr1),y
|
|
|
|
|
beq .3
|
|
|
|
|
|
|
|
|
|
jsr LB.COut
|
|
|
|
|
iny
|
|
|
|
|
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
|
|
|
|
|
bpl .20
|
|
|
|
|
|
|
|
|
|
ldx #']'
|
|
|
|
|
|
|
|
|
|
.20 txa
|
|
|
|
|
jsr LB.COut
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/lib/libtui.s.but
|
|
|
|
|
LOAD usr/src/lib/libtui.s
|
|
|
|
|
ASM
|