2021-04-15 20:52:08 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
|
|
|
|
.TF root/tuitest
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.INB inc/macros.i
|
|
|
|
|
.INB inc/a2osx.i
|
|
|
|
|
.INB inc/libtui.i
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
EV.SAVE .EQ $C0
|
2024-01-26 14:05:51 +00:00
|
|
|
|
EV.QUIT .EQ $C1
|
|
|
|
|
EV.CHECKBOX .EQ $C2
|
|
|
|
|
EV.RADIO .EQ $C3
|
|
|
|
|
EV.LBOX1.CHANGED .EQ $C4
|
|
|
|
|
EV.LBOX1.PRESSED .EQ $C5
|
2021-12-02 21:28:26 +00:00
|
|
|
|
EV.OK .EQ $CE
|
|
|
|
|
EV.CANCEL .EQ $CF
|
2021-04-15 20:52:08 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR ZPBIN
|
|
|
|
|
ZS.START
|
2021-09-07 12:32:31 +00:00
|
|
|
|
ZPPtr1 .BS 2
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
hCTX .BS 1
|
2021-09-07 12:32:31 +00:00
|
|
|
|
hSCRN .BS 1
|
2024-01-20 13:13:22 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
hTBOX1 .BS 1
|
2024-01-20 13:13:22 +00:00
|
|
|
|
hRADIO1 .BS 1
|
|
|
|
|
|
|
|
|
|
hDLGSAVE .BS 1
|
2021-04-15 20:52:08 +00:00
|
|
|
|
ZS.END .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 S.PS.F.EVENT
|
|
|
|
|
.DA #0
|
|
|
|
|
.DA CS.END-CS.START Code Size (without Constants)
|
|
|
|
|
.DA DS.END-DS.START Data Segment Size
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.DA #64 Stack Size
|
2021-04-15 20:52:08 +00:00
|
|
|
|
.DA #ZS.END-ZS.START Zero Page Size
|
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
|
|
|
|
L.LIBTUI .DA LIBTUI
|
2021-09-07 12:32:31 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
L.SCRN.Title .DA SCRN.Title
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
L.TBOX1.Title .DA TBOX1.Title
|
|
|
|
|
L.TBOX1.Status .DA TBOX1.Status
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
L.LBOX1.List .DA LBOX1.List
|
|
|
|
|
L.LABEL.Label .DA LABEL.Label
|
2024-01-17 21:04:13 +00:00
|
|
|
|
L.TLINE.Default .DA TLINE.Default
|
2021-12-02 21:28:26 +00:00
|
|
|
|
L.CBOX1.Label .DA CBOX1.Label
|
2024-01-20 13:13:22 +00:00
|
|
|
|
L.RADIO1.List .DA RADIO1.List
|
2021-12-02 21:28:26 +00:00
|
|
|
|
L.BUTQ.Label .DA BUTQ.Label
|
|
|
|
|
L.BUTS.Label .DA BUTS.Label
|
2024-01-20 13:13:22 +00:00
|
|
|
|
L.DLGSAVE.Title .DA DLGSAVE.Title
|
2021-12-02 21:28:26 +00:00
|
|
|
|
L.BUT.OK .DA BUT.OK
|
|
|
|
|
L.BUT.Cancel .DA BUT.Cancel
|
2021-04-15 20:52:08 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.INIT >LDYA L.LIBTUI
|
|
|
|
|
>SYSCALL LoadLib
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bcs CS.INIT.RTS
|
|
|
|
|
|
2021-04-15 20:52:08 +00:00
|
|
|
|
sta hLIBTUI
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
* clc
|
2021-04-15 20:52:08 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
CS.INIT.RTS rts
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
CS.RUN >LIBCALL hLIBTUI,LIBTUI.Init
|
2024-01-20 13:13:22 +00:00
|
|
|
|
bcs CS.INIT.RTS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
sta hCTX
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr CS.SCRN.Init
|
2024-01-20 13:13:22 +00:00
|
|
|
|
bcs CS.INIT.RTS
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
jsr CS.TBOX1.Init
|
2024-01-20 13:13:22 +00:00
|
|
|
|
bcs CS.INIT.RTS
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
jsr CS.LBOX1.Init
|
2024-01-20 13:13:22 +00:00
|
|
|
|
bcs CS.INIT.RTS
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2024-01-20 13:13:22 +00:00
|
|
|
|
jsr CS.TLINE1.Init
|
|
|
|
|
bcs CS.INIT.RTS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2024-01-20 13:13:22 +00:00
|
|
|
|
jsr CS.CBOX1.Init
|
|
|
|
|
bcs CS.INIT.RTS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2024-01-20 13:13:22 +00:00
|
|
|
|
jsr CS.RADIO1.Init
|
|
|
|
|
bcs CS.INIT.RTS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
jsr CS.BUT.Init
|
2024-01-20 13:13:22 +00:00
|
|
|
|
bcs CS.INIT.RTS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
jsr CS.SCRN.Draw Will Call SCRN.Draw
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
lda hTBOX1
|
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.Activate
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
CS.RUN.LOOP lda hSCRN
|
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.Exec
|
|
|
|
|
bcs .9
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
cmp #EV.RESIZE
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
jsr CS.SCRN.Draw
|
2021-08-13 18:34:20 +00:00
|
|
|
|
bcs .9
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bra CS.RUN.LOOP
|
|
|
|
|
|
|
|
|
|
.1 cmp #EV.SAVE
|
|
|
|
|
bne .2
|
2021-08-13 18:34:20 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr CS.RUN.DLGSAVE
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bcc CS.RUN.LOOP
|
2024-01-25 18:44:59 +00:00
|
|
|
|
|
|
|
|
|
rts
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2024-01-20 13:13:22 +00:00
|
|
|
|
.2 cmp #EV.CHECKBOX
|
2024-01-25 18:44:59 +00:00
|
|
|
|
bne .3
|
2024-01-20 13:13:22 +00:00
|
|
|
|
|
|
|
|
|
>LDA.G CBOX1.Var
|
|
|
|
|
bne .20
|
|
|
|
|
|
|
|
|
|
lda hRADIO1
|
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.Hide
|
|
|
|
|
bcc CS.RUN.LOOP
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.20 lda hRADIO1
|
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.Show
|
|
|
|
|
bcc CS.RUN.LOOP
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
|
2024-01-26 14:05:51 +00:00
|
|
|
|
.3 cmp #EV.LBOX1.CHANGED
|
2024-01-25 18:44:59 +00:00
|
|
|
|
bne .8
|
|
|
|
|
|
2024-02-02 18:12:51 +00:00
|
|
|
|
>PUSHB hSCRN
|
|
|
|
|
>PUSHBI S.OBJ.pSTATUS
|
|
|
|
|
>PUSHW.G LBOX1.Var
|
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.SetProp
|
2024-01-25 18:44:59 +00:00
|
|
|
|
bra CS.RUN.LOOP
|
|
|
|
|
|
2024-01-20 13:13:22 +00:00
|
|
|
|
.8 cmp #EV.QUIT
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bne CS.RUN.LOOP
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
lda hSCRN
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.Destroy
|
2021-08-13 18:34:20 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
lda #0
|
|
|
|
|
sec
|
|
|
|
|
.9
|
2021-09-07 12:32:31 +00:00
|
|
|
|
CS.RUN.RTS rts
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
CS.SCRN.Init >PUSHB hCTX hParent
|
|
|
|
|
>PUSHBI S.OBJ.F.bTitle+S.OBJ.F.bStatus
|
2022-09-04 20:12:49 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.NewScrn
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
sta hSCRN
|
|
|
|
|
|
|
|
|
|
>PUSHA
|
|
|
|
|
>PUSHBI S.OBJ.pTITLE
|
|
|
|
|
>PUSHEA.G SCRN.TitleBuf
|
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.SetProp
|
|
|
|
|
|
|
|
|
|
>PUSHB hSCRN
|
|
|
|
|
>PUSHBI S.OBJ.pSTATUS
|
2024-02-02 18:12:51 +00:00
|
|
|
|
>PUSHW L.LBOX1.List
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.SetProp
|
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.TBOX1.Init >LDYAI 1024
|
|
|
|
|
>SYSCALL GetMem
|
|
|
|
|
bcs CS.RUN.RTS
|
|
|
|
|
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
>STA.G TBOX1.hBuf
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
sta (ZPPtr1)
|
|
|
|
|
|
|
|
|
|
>PUSHB hSCRN hParent
|
|
|
|
|
>PUSHBI 1 X1
|
|
|
|
|
>PUSHBI 1 Y1
|
|
|
|
|
>PUSHBI 44 W
|
|
|
|
|
>PUSHBI 20 H
|
2022-09-04 20:12:49 +00:00
|
|
|
|
>LDA.G TBOX1.hBuf
|
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
>PUSHYA
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHWI 1024
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PUSHBI S.OBJ.F.bHBorder+S.OBJ.F.bVBorder+S.OBJ.F.bTitle+S.OBJ.F.bStatus+S.OBJ.F.bEdit
|
2022-09-04 20:12:49 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.NewTBox
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
sta hTBOX1
|
|
|
|
|
|
|
|
|
|
>PUSHA
|
|
|
|
|
>PUSHBI S.OBJ.pTITLE
|
|
|
|
|
>PUSHW L.TBOX1.Title
|
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.SetProp
|
|
|
|
|
|
|
|
|
|
>PUSHB hTBOX1
|
|
|
|
|
>PUSHBI S.OBJ.pSTATUS
|
|
|
|
|
>PUSHW L.TBOX1.Status
|
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.SetProp
|
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
CS.LBOX1.Init >PUSHB hSCRN hParent
|
|
|
|
|
>PUSHBI 50 X1
|
|
|
|
|
>PUSHBI 1 Y1
|
|
|
|
|
>PUSHBI 20 W
|
|
|
|
|
>PUSHBI 9 H
|
2024-01-26 14:05:51 +00:00
|
|
|
|
>PUSHBI EV.LBOX1.CHANGED
|
|
|
|
|
>PUSHBI EV.LBOX1.PRESSED
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHW L.LBOX1.List
|
|
|
|
|
>PUSHEA.G LBOX1.Var
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PUSHBI S.OBJ.F.bHBorder+S.OBJ.F.bVBorder
|
2022-09-04 20:12:49 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.NewLBox
|
2021-12-02 21:28:26 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2024-01-20 13:13:22 +00:00
|
|
|
|
CS.TLINE1.Init >PUSHB hSCRN hParent
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHBI 50 X1
|
|
|
|
|
>PUSHBI 11 Y1
|
|
|
|
|
>PUSHW L.LABEL.Label
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PUSHBI 0
|
2022-09-04 20:12:49 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.NewLabel
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
>PUSHB hSCRN hParent
|
|
|
|
|
>PUSHBI 50 X1
|
|
|
|
|
>PUSHBI 12 Y1
|
|
|
|
|
>PUSHBI 25 W
|
|
|
|
|
>PUSHEA.G TLINE.Buf
|
2022-09-04 20:12:49 +00:00
|
|
|
|
>PUSHWI 65 Len
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PUSHBI 0
|
2022-09-04 20:12:49 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.NewTLine
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2024-01-17 21:04:13 +00:00
|
|
|
|
>PUSHEA.G TLINE.Buf
|
|
|
|
|
>PUSHW L.TLINE.Default
|
|
|
|
|
>SYSCALL StrCpy
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2024-01-20 13:13:22 +00:00
|
|
|
|
CS.CBOX1.Init >PUSHB hSCRN hParent
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHBI 50 X1
|
|
|
|
|
>PUSHBI 14 Y1
|
|
|
|
|
>PUSHBI 0
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PUSHBI EV.CHECKBOX
|
|
|
|
|
>PUSHW L.CBOX1.Label
|
|
|
|
|
>PUSHEA.G CBOX1.Var
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHBI 0
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.NewCBox
|
2021-12-02 21:28:26 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2024-01-20 13:13:22 +00:00
|
|
|
|
CS.RADIO1.Init >PUSHB hSCRN hParent
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHBI 50 X1
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PUSHBI 16 Y1
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHBI 0
|
2024-01-25 18:44:59 +00:00
|
|
|
|
>PUSHBI EV.RADIO
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PUSHW L.RADIO1.List
|
|
|
|
|
>PUSHEA.G RADIO1.Var
|
|
|
|
|
>PUSHBI 0
|
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.NewRadio
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
sta hRADIO1
|
|
|
|
|
|
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.Hide
|
|
|
|
|
|
|
|
|
|
.9 rts
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.BUT.Init >PUSHB hSCRN hParent
|
|
|
|
|
>PUSHBI 50 X1
|
|
|
|
|
>PUSHBI 20 Y1
|
|
|
|
|
>PUSHBI 19 Ctrl-S
|
|
|
|
|
>PUSHBI EV.SAVE
|
|
|
|
|
>PUSHW L.BUTS.Label
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PUSHBI 0
|
2022-09-04 20:12:49 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.NewBut
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bcs .9
|
2022-09-04 20:12:49 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHB hSCRN hParent
|
|
|
|
|
>PUSHBI 65 X1
|
|
|
|
|
>PUSHBI 20 Y1
|
|
|
|
|
>PUSHBI 17 Ctrl-Q
|
|
|
|
|
>PUSHBI EV.QUIT
|
|
|
|
|
>PUSHW L.BUTQ.Label
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PUSHBI 0
|
2022-09-04 20:12:49 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.NewBut
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.9
|
|
|
|
|
CS.BUT.Init.RTS rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.DLGSAVE >PUSHB hCTX hParent
|
|
|
|
|
>PUSHBI 70 W
|
|
|
|
|
>PUSHBI 11 H
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PUSHW L.DLGSAVE.Title
|
|
|
|
|
>PUSHBI 0
|
2022-09-04 20:12:49 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.NewDlg
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bcs CS.BUT.Init.RTS
|
|
|
|
|
|
2024-01-20 13:13:22 +00:00
|
|
|
|
sta hDLGSAVE
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
* >PUSHB hDLGSAVE hParent
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHBI 50 X1
|
|
|
|
|
>PUSHBI 7 Y1
|
|
|
|
|
>PUSHBI C.CR
|
|
|
|
|
>PUSHBI EV.OK
|
|
|
|
|
>PUSHW L.BUT.OK
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PUSHBI 0
|
2022-09-04 20:12:49 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.NewBut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
sta ZPPtr1
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PUSHB hDLGSAVE hParent
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHBI 57 X1
|
|
|
|
|
>PUSHBI 7 Y1
|
|
|
|
|
>PUSHBI 3 Ctrl-C
|
|
|
|
|
>PUSHBI EV.CANCEL
|
|
|
|
|
>PUSHW L.BUT.Cancel
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PUSHBI 0
|
2022-09-04 20:12:49 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.NewBut
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bcs .9
|
2021-08-13 18:34:20 +00:00
|
|
|
|
|
2024-01-20 13:13:22 +00:00
|
|
|
|
lda hDLGSAVE
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.Draw
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
lda ZPPtr1
|
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.Activate
|
|
|
|
|
|
2024-01-20 13:13:22 +00:00
|
|
|
|
.1 lda hDLGSAVE
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.Exec
|
|
|
|
|
|
|
|
|
|
.9 php
|
|
|
|
|
pha
|
2024-01-20 13:13:22 +00:00
|
|
|
|
lda hDLGSAVE
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.Destroy
|
|
|
|
|
|
|
|
|
|
lda hSCRN
|
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.Draw
|
|
|
|
|
pla
|
|
|
|
|
plp
|
|
|
|
|
rts
|
2021-04-15 20:52:08 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.DOEVENT sec do not discard TIMER event
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
CS.QUIT >LDA.G TBOX1.hBuf
|
|
|
|
|
beq .1
|
|
|
|
|
|
|
|
|
|
>SYSCALL FreeMem
|
|
|
|
|
|
|
|
|
|
.1 lda hCTX
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.Close
|
|
|
|
|
|
|
|
|
|
.2 lda hLIBTUI
|
2021-04-15 20:52:08 +00:00
|
|
|
|
beq .8
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-04-15 20:52:08 +00:00
|
|
|
|
>SYSCALL UnloadLib
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-04-15 20:52:08 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
CS.SCRN.Draw lda hSCRN
|
2021-09-07 12:32:31 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHEA.G SCRN.TitleBuf
|
2021-09-07 12:32:31 +00:00
|
|
|
|
>PUSHW L.SCRN.Title
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.X1
|
|
|
|
|
|
|
|
|
|
.1 lda (ZPPtr1),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
iny
|
|
|
|
|
cpy #S.OBJ.InnerH+1
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
>PUSHBI 10
|
|
|
|
|
>SYSCALL sprintf
|
|
|
|
|
|
|
|
|
|
lda hSCRN
|
|
|
|
|
>LIBCALL hLIBTUI,LIBTUI.Draw
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-04-15 20:52:08 +00:00
|
|
|
|
CS.END
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LIBTUI .AZ "libtui"
|
|
|
|
|
hLIBTUI .BS 1
|
|
|
|
|
*--------------------------------------
|
2021-09-07 12:32:31 +00:00
|
|
|
|
SCRN.Title .AZ "Window: X1=%d,Y1=%d, W=%d,H=%d, X2=%d,Y2=%d, iX=%d,iY=%d, iW=%d,iH=%d"
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
TBOX1.Title .AZ "Text Box Title"
|
|
|
|
|
TBOX1.Status .AZ "Text Box Status"
|
2021-08-13 18:34:20 +00:00
|
|
|
|
*--------------------------------------
|
2024-02-02 18:12:51 +00:00
|
|
|
|
LBOX1.List .CZ "Item 1"
|
|
|
|
|
.CZ "Item 2"
|
|
|
|
|
.CZ "Item 3"
|
|
|
|
|
.CZ "Item 4"
|
|
|
|
|
.CZ "Item 5"
|
|
|
|
|
.CZ "Item 6 very long line"
|
|
|
|
|
.CZ "Item 7"
|
|
|
|
|
.CZ "Item 8"
|
|
|
|
|
.CZ "Item 9"
|
|
|
|
|
.CZ "Item 10"
|
|
|
|
|
.CZ "Item 11"
|
|
|
|
|
.CZ "Item 12"
|
|
|
|
|
.CZ "Item 13"
|
|
|
|
|
.CZ "Item 14 last one"
|
|
|
|
|
.HS 00
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
LABEL.Label .AZ "This is a label."
|
|
|
|
|
*--------------------------------------
|
2024-01-17 21:04:13 +00:00
|
|
|
|
TLINE.Default .AZ "This is a Line."
|
|
|
|
|
*--------------------------------------
|
2024-02-02 18:12:51 +00:00
|
|
|
|
RADIO1.List .CZ "\e[91mRed"
|
|
|
|
|
.CZ "\e[92mGreen"
|
|
|
|
|
.CZ "\e[96mBlue"
|
|
|
|
|
.HS 00
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CBOX1.Label .AZ "Check Me"
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
BUTS.Label .AZ "(^S)ave..."
|
|
|
|
|
BUTQ.Label .AZ "(^Q)uit"
|
2024-01-20 13:13:22 +00:00
|
|
|
|
DLGSAVE.Title .AZ "Save As..."
|
2021-12-02 21:28:26 +00:00
|
|
|
|
BUT.OK .AZ " OK "
|
|
|
|
|
BUT.Cancel .AZ "Cancel"
|
2021-04-15 20:52:08 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
|
|
|
|
DS.START
|
2021-12-02 21:28:26 +00:00
|
|
|
|
SCRN.TitleBuf .BS 80
|
|
|
|
|
TLINE.Buf .BS 65
|
2024-01-20 13:13:22 +00:00
|
|
|
|
CBOX1.Var .BS 1
|
2021-12-02 21:28:26 +00:00
|
|
|
|
RADIO1.Var .BS 1
|
2024-02-02 18:12:51 +00:00
|
|
|
|
LBOX1.Var .BS 2
|
2021-12-02 21:28:26 +00:00
|
|
|
|
TBOX1.hBuf .BS 1
|
2021-04-15 20:52:08 +00:00
|
|
|
|
DS.END .ED
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE root/tuitest.s
|
|
|
|
|
ASM
|