2021-09-07 12:32:31 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
OBJ.Create pha Type
|
|
|
|
|
tax
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy OBJ.SIZES,x
|
|
|
|
|
lda #0
|
|
|
|
|
>SYSCALL2 GetMem
|
|
|
|
|
bcs .9
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>STYA ZPObjPtr
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
stx hObj
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
sta (ZPObjPtr)
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
ldy OBJ.SIZES,x
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
lda #0
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
dey
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.1 sta (ZPObjPtr),y
|
|
|
|
|
dey
|
|
|
|
|
bne .1
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* clc
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 plx
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-09-04 20:12:49 +00:00
|
|
|
|
OBJ.PullBuf ldy #S.OBJ.BufSize
|
|
|
|
|
jsr OBJ.PullWordY
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.pBuf
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
OBJ.PullWordY >PULLA
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
iny
|
|
|
|
|
>PULLA
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.PullHW ldy #S.OBJ.H
|
|
|
|
|
>PULLA
|
|
|
|
|
sta (ZPObjPtr),y
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
dey
|
|
|
|
|
>PULLA
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.PullY1X1hParent
|
|
|
|
|
>PULLA
|
|
|
|
|
ldy #S.OBJ.Y1
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
dey S.OBJ.X1
|
|
|
|
|
>PULLA
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
dey S.OBJ.hParent
|
|
|
|
|
>PULLA
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.SetX2Y2 ldy #S.OBJ.X1
|
|
|
|
|
jsr .7
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #S.OBJ.Y1
|
|
|
|
|
jsr .7
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
and #S.OBJ.F.bHBorder
|
|
|
|
|
beq .1
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #S.OBJ.InnerX
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
inc
|
|
|
|
|
sta (ZPObjPtr),y
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
iny
|
|
|
|
|
iny
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
lda (ZPObjPtr),y S.OBJ.InnerW
|
|
|
|
|
dec
|
|
|
|
|
dec
|
|
|
|
|
sta (ZPObjPtr),y
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.1 ldx #0
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
bit #S.OBJ.F.bVBorder+S.OBJ.F.bTITLE
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
|
|
|
|
|
.2 bit #S.OBJ.F.bVBorder+S.OBJ.F.bSTATUS
|
|
|
|
|
beq .3
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
|
|
|
|
|
.3 txa
|
|
|
|
|
beq .4
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #S.OBJ.InnerY
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
inc
|
2021-09-07 12:32:31 +00:00
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
txa
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
iny
|
|
|
|
|
iny
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
clc
|
|
|
|
|
adc (ZPObjPtr),y S.OBJ.InnerH
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
.4 ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
bit #S.OBJ.F.bMENU
|
|
|
|
|
beq .8
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #S.OBJ.InnerY
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
inc
|
2021-09-07 12:32:31 +00:00
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
iny
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
lda (ZPObjPtr),y S.OBJ.InnerH
|
|
|
|
|
dec
|
2021-09-07 12:32:31 +00:00
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
.8 clc
|
2021-12-02 21:28:26 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.7 lda (ZPObjPtr),y S.OBJ.X1/Y1
|
|
|
|
|
tax
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
iny
|
|
|
|
|
iny S.OBJ.W/H
|
|
|
|
|
phy
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
clc
|
|
|
|
|
adc (ZPObjPtr),y
|
|
|
|
|
dec
|
|
|
|
|
iny
|
|
|
|
|
iny S.OBJ.X2/Y2
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
iny
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
sta (ZPObjPtr),y S.OBJ.InnerX/Y
|
|
|
|
|
|
|
|
|
|
ply S.OBJ.W/H
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
iny
|
|
|
|
|
iny
|
|
|
|
|
iny
|
|
|
|
|
iny
|
|
|
|
|
iny
|
|
|
|
|
iny
|
|
|
|
|
sta (ZPObjPtr),y S.OBJ.InnerW/H
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
rts
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.Exec >PUSHA hOBJ
|
|
|
|
|
jsr LIB.GetOBJ
|
|
|
|
|
jsr LIB.GetCTX
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2023-04-22 18:58:37 +00:00
|
|
|
|
.1 jsr IO.GetC
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bcs .9
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
cmp #EV.RESIZE
|
|
|
|
|
clc
|
|
|
|
|
beq .99
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
tay
|
|
|
|
|
beq .1
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
jsr OBJ.Run
|
|
|
|
|
inc pStack
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
tay
|
|
|
|
|
beq .1 no event, no error
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.9 inc pStack
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.99 rts
|
2021-09-07 12:32:31 +00:00
|
|
|
|
*--------------------------------------
|
2023-02-10 18:19:29 +00:00
|
|
|
|
OBJ.Destroy clc
|
2021-09-07 12:32:31 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.Run ldx ZPObjPtr
|
|
|
|
|
phx
|
|
|
|
|
ldx ZPObjPtr+1
|
|
|
|
|
phx
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
ldy #1
|
|
|
|
|
lda (pStack),y
|
2023-03-26 17:42:38 +00:00
|
|
|
|
jsr LIB.GetOBJ
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
ldy #S.OBJ.S
|
|
|
|
|
lda (ZPObjPtr),y
|
2021-12-02 21:28:26 +00:00
|
|
|
|
and #S.OBJ.S.bDisabled
|
|
|
|
|
bne .9
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
ldy #1
|
|
|
|
|
lda (pStack),y hOBJ
|
|
|
|
|
>PUSHA
|
|
|
|
|
lda (pStack),y Event
|
|
|
|
|
>PUSHA
|
|
|
|
|
jsr .80
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
inc pStack
|
|
|
|
|
inc pStack
|
|
|
|
|
|
|
|
|
|
tax
|
|
|
|
|
bne .8 error / event
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bcc .8
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
ldy #S.OBJ.Childs
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.1 lda (ZPObjPtr),y
|
|
|
|
|
beq .5
|
|
|
|
|
|
|
|
|
|
phy
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
>PUSHA hChild
|
|
|
|
|
ldy #1
|
|
|
|
|
lda (pStack),y Event
|
|
|
|
|
>PUSHA
|
|
|
|
|
jsr OBJ.Run
|
|
|
|
|
|
|
|
|
|
ply
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
inc pStack
|
|
|
|
|
inc pStack
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bcc .8
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
tax
|
|
|
|
|
bne .8
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.5 iny
|
|
|
|
|
cpy #S.OBJ
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.9 sec
|
2021-12-02 21:28:26 +00:00
|
|
|
|
lda #0
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
.8 plx
|
|
|
|
|
stx ZPObjPtr+1
|
|
|
|
|
plx
|
|
|
|
|
stx ZPObjPtr
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
rts
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.80 lda (ZPObjPtr) S.OBJ.T
|
|
|
|
|
tax
|
2023-03-26 17:42:38 +00:00
|
|
|
|
jmp (J.ObjRun,x)
|
2021-09-07 12:32:31 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.Draw >PUSHA hObj
|
|
|
|
|
|
|
|
|
|
jsr OBJ.Draw.Top
|
2022-09-04 20:12:49 +00:00
|
|
|
|
bcs .99
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
jsr OBJ.Draw.Body
|
2022-09-04 20:12:49 +00:00
|
|
|
|
bcs .99
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
jsr OBJ.Draw.Bottom
|
2022-09-04 20:12:49 +00:00
|
|
|
|
bcs .99
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.S
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
and #S.OBJ.S.bHasChilds
|
|
|
|
|
* clc
|
|
|
|
|
beq .99
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
lda #S.OBJ.Childs
|
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
.6 ldy #1
|
|
|
|
|
lda (pStack),y
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LIB.GetOBJ
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
lda (pStack)
|
|
|
|
|
tay
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
beq .7
|
|
|
|
|
|
|
|
|
|
jsr OBJ.Draw
|
2022-09-04 20:12:49 +00:00
|
|
|
|
bcs .98
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
.7 lda (pStack)
|
|
|
|
|
inc
|
|
|
|
|
sta (pStack)
|
|
|
|
|
cmp #S.OBJ
|
|
|
|
|
bne .6
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
.98 inc pStack
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
.99 inc pStack
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
OBJ.Draw.RTS rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.Draw.Top lda (pStack)
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LIB.GetOBJ
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
and #S.OBJ.F.bTITLE+S.OBJ.F.bHBorder
|
|
|
|
|
* clc
|
|
|
|
|
beq OBJ.Draw.RTS
|
|
|
|
|
|
2023-01-31 06:55:01 +00:00
|
|
|
|
OBJ.Draw.Top.I jsr LB.Init
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.X1
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
ldy #S.OBJ.Y1
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tay
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.GotoXY
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
and #S.OBJ.F.bVBorder
|
|
|
|
|
beq .1
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SetColor
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldx #SEQ.BORDERTL-SEQS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SeqOut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
.1 ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bpl .4 S.OBJ.F.bTITLE
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldx #SEQ.BAR-SEQS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SeqOut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.InnerW
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
ldy #S.OBJ.pTitle
|
2021-09-07 12:32:31 +00:00
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sta ZPPtr1
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
beq .3
|
|
|
|
|
|
|
|
|
|
lda #C.SI
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.COut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
|
|
|
|
|
.2 lda (ZPPtr1),y
|
|
|
|
|
beq .3
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.COut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
.3 txa
|
|
|
|
|
beq .31
|
|
|
|
|
|
|
|
|
|
lda #C.SPACE
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.30 jsr LB.COut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
dex
|
|
|
|
|
bne .30
|
|
|
|
|
|
|
|
|
|
.31 ldx #SEQ.BAREND-SEQS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SeqOut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bra .6
|
|
|
|
|
|
|
|
|
|
.4 ldy #S.OBJ.InnerW
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
lda #'q'
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.5 jsr LB.COut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
dex
|
|
|
|
|
bne .5
|
|
|
|
|
|
|
|
|
|
.6 ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
and #S.OBJ.F.bVBorder
|
|
|
|
|
beq .7
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SetColor
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldx #SEQ.BORDERTR-SEQS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SeqOut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2023-03-26 17:42:38 +00:00
|
|
|
|
.7 jmp IO.LBWrite
|
2021-09-07 12:32:31 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.Draw.Body lda (pStack)
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LIB.GetOBJ
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2023-01-31 06:55:01 +00:00
|
|
|
|
OBJ.Draw.Body.I ldy #S.OBJ.InnerY
|
2021-09-07 12:32:31 +00:00
|
|
|
|
lda (ZPObjPtr),y
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHA Start
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.InnerH
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
>PUSHA Count
|
|
|
|
|
|
|
|
|
|
>PUSHBI 0 Relative Y
|
|
|
|
|
|
2023-01-31 06:55:01 +00:00
|
|
|
|
OBJ.Draw.Lines jsr OBJ.CurOff
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.1 jsr LB.Init
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.X1
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
ldy #2 InnerY
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
tay
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.GotoXY
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SetColor
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
and #S.OBJ.F.bVBorder
|
|
|
|
|
php
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
ldx #SEQ.BORDERV-SEQS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SeqOut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
.2 jsr OBJ.Draw.Body.JMP
|
|
|
|
|
|
|
|
|
|
ldx #SEQ.NORMAL-SEQS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SeqOut
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
plp
|
|
|
|
|
beq .4
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.X2
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
ldy #2 InnerY
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
tay
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.GotoXY
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SetColor
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldx #SEQ.BORDERV-SEQS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SeqOut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2023-03-26 17:42:38 +00:00
|
|
|
|
.4 jsr IO.LBWrite
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
lda (pStack) Relative Y
|
|
|
|
|
inc
|
|
|
|
|
sta (pStack)
|
|
|
|
|
|
|
|
|
|
ldy #2 InnerY
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
inc
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
|
|
|
|
|
dey
|
|
|
|
|
|
|
|
|
|
lda (pStack),y Count
|
|
|
|
|
dec
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
bne .1
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr OBJ.CurOn
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
.9 >POP 3
|
|
|
|
|
|
|
|
|
|
OBJ.Draw.Body.RTS
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.Draw.Body.JMP
|
|
|
|
|
lda (ZPObjPtr)
|
|
|
|
|
tax
|
|
|
|
|
jmp (J.ObjDraw,x)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.Draw.Bottom lda (pStack)
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LIB.GetOBJ
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
and #S.OBJ.F.bSTATUS+S.OBJ.F.bHBorder
|
|
|
|
|
* clc
|
|
|
|
|
beq OBJ.Draw.Body.RTS
|
|
|
|
|
|
2023-01-31 06:55:01 +00:00
|
|
|
|
OBJ.Draw.Bottom.I
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.Init
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.X1
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
ldy #S.OBJ.Y2
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tay
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.GotoXY
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
and #S.OBJ.F.bVBorder
|
|
|
|
|
beq .1
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SetColor
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldx #SEQ.BORDERBL-SEQS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SeqOut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
.1 ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
and #S.OBJ.F.bSTATUS
|
|
|
|
|
beq .4
|
|
|
|
|
|
|
|
|
|
ldx #SEQ.BAR-SEQS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SeqOut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.InnerW
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.pSTATUS
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sta ZPPtr1
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
beq .3
|
|
|
|
|
|
|
|
|
|
lda #C.SI
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.COut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
|
|
|
|
|
.2 lda (ZPPtr1),y
|
|
|
|
|
beq .3
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.COut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
.3 txa
|
|
|
|
|
beq .31
|
|
|
|
|
|
|
|
|
|
lda #C.SPACE
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.30 jsr LB.COut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
dex
|
|
|
|
|
bne .30
|
|
|
|
|
|
|
|
|
|
.31 ldx #SEQ.BAREND-SEQS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SeqOut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bra .6
|
|
|
|
|
|
|
|
|
|
.4 ldy #S.OBJ.InnerW
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
lda #'q'
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.5 jsr LB.COut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
dex
|
|
|
|
|
bne .5
|
|
|
|
|
|
|
|
|
|
.6 ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
and #S.OBJ.F.bVBorder
|
|
|
|
|
beq .7
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SetColor
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldx #SEQ.BORDERBR-SEQS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SeqOut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2023-03-26 17:42:38 +00:00
|
|
|
|
.7 jmp IO.LBWrite
|
2021-09-07 12:32:31 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.GetProp ldy #1 hObj
|
|
|
|
|
lda (pStack),y
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LIB.GetOBJ
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
>PULLA
|
|
|
|
|
tay prop
|
|
|
|
|
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
pha
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
ply
|
|
|
|
|
|
|
|
|
|
inc pStack
|
|
|
|
|
* clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2023-03-26 17:42:38 +00:00
|
|
|
|
OBJ.SetProp cpy #S.OBJ.pTitle
|
2023-01-31 06:55:01 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
2023-03-26 17:42:38 +00:00
|
|
|
|
jsr OBJ.Draw.Top.I
|
|
|
|
|
ldy #0
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.1 cpy #S.OBJ.pStatus
|
2023-01-31 06:55:01 +00:00
|
|
|
|
bne .8
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
|
|
|
|
jsr OBJ.Draw.Bottom.I
|
|
|
|
|
ldy #0
|
|
|
|
|
rts
|
2023-01-31 06:55:01 +00:00
|
|
|
|
|
|
|
|
|
.8 clc
|
2021-09-07 12:32:31 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
OBJ.Activate >PUSHA hObj
|
|
|
|
|
jsr OBJ.FindActive
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bcs .1
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHA hObj
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
jsr OBJ.Deactivate
|
2021-12-02 21:28:26 +00:00
|
|
|
|
inc pStack
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.1 lda (pStack)
|
|
|
|
|
jsr OBJ.Activate2
|
|
|
|
|
inc pStack
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2021-09-07 12:32:31 +00:00
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
OBJ.Activate2 jsr LIB.GetOBJ
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.S
|
|
|
|
|
lda (ZPObjPtr),y
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ora #S.OBJ.S.bActive
|
2021-09-07 12:32:31 +00:00
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr .1
|
|
|
|
|
|
|
|
|
|
jmp OBJ.CurOn
|
|
|
|
|
|
|
|
|
|
.1 lda (ZPObjPtr)
|
2021-09-07 12:32:31 +00:00
|
|
|
|
tax
|
|
|
|
|
jmp (J.ObjActivate,x)
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
OBJ.Deactivate jsr LIB.GetOBJ
|
|
|
|
|
|
|
|
|
|
jsr OBJ.CurOff
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.S
|
|
|
|
|
lda (ZPObjPtr),y
|
2021-12-02 21:28:26 +00:00
|
|
|
|
and #S.OBJ.S.bActive^$ff
|
2021-09-07 12:32:31 +00:00
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
lda (ZPObjPtr)
|
|
|
|
|
tax
|
|
|
|
|
jmp (J.ObjDeactivate,x)
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
OBJ.FindActive ldx ZPObjPtr
|
|
|
|
|
phx
|
|
|
|
|
ldx ZPObjPtr+1
|
|
|
|
|
phx
|
|
|
|
|
|
|
|
|
|
jsr LIB.GetOBJ
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.Childs
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.1 phy
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
beq .7
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
>SYSCALL2 GetMemPtr
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
ldy #S.OBJ.S
|
|
|
|
|
lda (ZPPtr1),y S.OBJ.S.bActive
|
|
|
|
|
bmi .8
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
pla
|
|
|
|
|
|
|
|
|
|
.7 ply
|
|
|
|
|
iny
|
|
|
|
|
cpy #S.OBJ
|
|
|
|
|
bne .1
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* sec
|
|
|
|
|
bra .80
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.8 pla
|
|
|
|
|
ply
|
|
|
|
|
clc
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.80 plx
|
|
|
|
|
stx ZPObjPtr+1
|
|
|
|
|
plx
|
|
|
|
|
stx ZPObjPtr
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2023-01-31 06:55:01 +00:00
|
|
|
|
OBJ.CurUpdPos ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
and #S.OBJ.F.bEdit
|
2023-03-26 17:42:38 +00:00
|
|
|
|
* beq .8
|
|
|
|
|
|
2023-01-31 06:55:01 +00:00
|
|
|
|
ldy #S.OBJ.S
|
2023-03-26 17:42:38 +00:00
|
|
|
|
lda (ZPObjPtr),y S.OBJ.S.bActive
|
|
|
|
|
bpl .8
|
2023-01-31 06:55:01 +00:00
|
|
|
|
|
|
|
|
|
jsr LB.Init
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2023-01-31 06:55:01 +00:00
|
|
|
|
ldy #S.OBJ.InnerX
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
clc
|
|
|
|
|
ldy #S.OBJ.CurX
|
|
|
|
|
adc (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.InnerY
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
clc
|
|
|
|
|
ldy #S.OBJ.CurY
|
|
|
|
|
adc (ZPObjPtr),y
|
|
|
|
|
tay
|
|
|
|
|
jsr LB.GotoXY
|
|
|
|
|
|
2023-03-26 17:42:38 +00:00
|
|
|
|
jsr IO.LBWrite
|
|
|
|
|
|
2023-01-31 06:55:01 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
OBJ.CurOn ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
2023-01-31 06:55:01 +00:00
|
|
|
|
and #S.OBJ.F.bEdit
|
2023-04-22 18:58:37 +00:00
|
|
|
|
beq .8
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.S
|
2023-03-26 17:42:38 +00:00
|
|
|
|
lda (ZPObjPtr),y S.OBJ.S.bActive
|
|
|
|
|
bpl .8
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
bit #S.OBJ.S.bCurOn
|
|
|
|
|
bne .8
|
|
|
|
|
|
|
|
|
|
ora #S.OBJ.S.bCurOn
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
jsr LB.Init
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #S.OBJ.InnerX
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
clc
|
|
|
|
|
ldy #S.OBJ.CurX
|
|
|
|
|
adc (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.InnerY
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
clc
|
|
|
|
|
ldy #S.OBJ.CurY
|
|
|
|
|
adc (ZPObjPtr),y
|
|
|
|
|
tay
|
|
|
|
|
jsr LB.GotoXY
|
|
|
|
|
|
|
|
|
|
ldx #SEQ.CURON-SEQS
|
|
|
|
|
jsr LB.SeqOut
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
|
|
|
|
jsr IO.LBWrite
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.8 lda #0
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.CurOff ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
2023-01-31 06:55:01 +00:00
|
|
|
|
and #S.OBJ.F.bEdit
|
2023-04-22 18:58:37 +00:00
|
|
|
|
beq .8
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #S.OBJ.S
|
2023-03-26 17:42:38 +00:00
|
|
|
|
lda (ZPObjPtr),y S.OBJ.S.bActive
|
|
|
|
|
bpl .8
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
bit #S.OBJ.S.bCurOn
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
eor #S.OBJ.S.bCurOn
|
|
|
|
|
sta (ZPObjPtr),y
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.Init
|
|
|
|
|
|
|
|
|
|
ldx #SEQ.CUROFF-SEQS
|
|
|
|
|
jsr LB.SeqOut
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
|
|
|
|
jmp IO.LBWrite
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.8 lda #0
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2023-02-07 07:04:23 +00:00
|
|
|
|
OBJ.ZeroWordAtY lda #0
|
2023-03-26 17:42:38 +00:00
|
|
|
|
sta (ZPObjPtr),y
|
2023-02-07 07:04:23 +00:00
|
|
|
|
iny
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
OBJ.IncWordAtY lda (ZPObjPtr),y
|
|
|
|
|
inc
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
bne .8
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
iny
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
inc
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.DecWordAtY clc
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sbc #0
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
iny
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sbc #0
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-09-04 20:12:49 +00:00
|
|
|
|
OBJ.GetBuf ldy #S.OBJ.pBuf
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sta ZPPtr1
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
OBJ.GetLineXAtY lda (ZPObjPtr),y
|
|
|
|
|
sta ZPPtr1
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sta ZPPtr1+1
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
stz TempI
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.1 lda (ZPPtr1)
|
|
|
|
|
beq .9
|
|
|
|
|
|
|
|
|
|
cpx TempI
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
.2 inc TempI
|
|
|
|
|
|
|
|
|
|
ldy #$ff
|
|
|
|
|
|
|
|
|
|
.4 iny
|
|
|
|
|
lda (ZPPtr1),y
|
2022-09-04 20:12:49 +00:00
|
|
|
|
clc
|
|
|
|
|
beq .5
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
cmp #C.CR
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bne .4
|
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
* sec
|
|
|
|
|
|
|
|
|
|
.5 tya
|
2021-12-02 21:28:26 +00:00
|
|
|
|
adc ZPPtr1
|
|
|
|
|
sta ZPPtr1
|
|
|
|
|
bcc .1
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
inc ZPPtr1+1
|
|
|
|
|
bra .1
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
2023-03-26 17:42:38 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-09-07 12:32:31 +00:00
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/lib/libtui.s.obj
|
|
|
|
|
LOAD usr/src/lib/libtui.s
|
|
|
|
|
ASM
|