2015-03-23 07:28:03 +00:00
|
|
|
|
NEW
|
2020-10-02 14:57:05 +00:00
|
|
|
|
AUTO 3,1
|
2015-03-23 07:28:03 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2020-06-30 15:32:23 +00:00
|
|
|
|
.TF sbin/gui
|
2015-03-23 07:28:03 +00:00
|
|
|
|
*--------------------------------------
|
2020-06-30 15:32:23 +00:00
|
|
|
|
.INB inc/io.i
|
|
|
|
|
.INB inc/macros.i
|
|
|
|
|
.INB inc/a2osx.i
|
2020-09-03 15:19:25 +00:00
|
|
|
|
.INB inc/gfx.i
|
2020-06-30 15:32:23 +00:00
|
|
|
|
.INB inc/libgui.i
|
2015-03-23 07:28:03 +00:00
|
|
|
|
*--------------------------------------
|
2019-01-08 16:29:26 +00:00
|
|
|
|
* Zero Page Segment, up to 32 bytes
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR ZPBIN
|
|
|
|
|
ZS.START
|
|
|
|
|
ZS.END
|
|
|
|
|
.ED
|
2017-06-02 15:14:42 +00:00
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
* File Header (16 Bytes)
|
2015-03-23 07:28:03 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
2019-01-08 16:29:26 +00:00
|
|
|
|
.DA #S.PS.F.EVENT
|
|
|
|
|
.DA #0
|
|
|
|
|
.DA CS.END-CS.START Code Size (without Constants)
|
|
|
|
|
.DA DS.END-DS.START Data SegmentSize
|
|
|
|
|
.DA #64 Stack Size
|
|
|
|
|
.DA #ZS.END-ZS.START Zero Page Size
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
|
|
|
|
*--------------------------------------
|
2015-03-23 07:28:03 +00:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
2017-11-30 16:33:33 +00:00
|
|
|
|
L.LIBGUI .DA LIBGUI
|
2022-11-02 06:54:30 +00:00
|
|
|
|
L.ABOUT.T .DA ABOUT.T
|
|
|
|
|
L.ABOUT.M .DA ABOUT.M
|
2022-10-09 21:22:46 +00:00
|
|
|
|
L.GUITEST1 .DA GUITEST1
|
|
|
|
|
L.GUITEST2 .DA GUITEST2
|
|
|
|
|
L.MSG .DA MSG
|
2015-03-23 07:28:03 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2018-05-04 14:55:29 +00:00
|
|
|
|
CS.INIT >LDYA L.LIBGUI
|
2018-07-19 15:33:55 +00:00
|
|
|
|
>SYSCALL LoadLib
|
2019-01-09 16:42:20 +00:00
|
|
|
|
bcs .9
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2017-11-15 16:29:23 +00:00
|
|
|
|
sta hLIBGUI
|
2016-06-15 06:21:42 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
* clc
|
2023-07-10 04:57:04 +00:00
|
|
|
|
|
|
|
|
|
.9 rts
|
2015-03-23 07:28:03 +00:00
|
|
|
|
*--------------------------------------
|
2020-10-27 16:33:10 +00:00
|
|
|
|
CS.RUN >SLEEP
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2022-10-09 21:22:46 +00:00
|
|
|
|
>PUSHW L.MSG
|
2022-10-18 05:56:59 +00:00
|
|
|
|
>LIBCALL hLIBGUI,LIBGUI.MSG.Get
|
2020-10-27 16:33:10 +00:00
|
|
|
|
bcs CS.RUN
|
2020-09-02 15:47:23 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
lda MSG+S.MSG.T
|
2022-10-09 21:22:46 +00:00
|
|
|
|
cmp #S.MSG.T.ID
|
|
|
|
|
bne CS.RUN
|
2017-12-01 15:53:29 +00:00
|
|
|
|
|
2022-10-09 21:22:46 +00:00
|
|
|
|
lda MSG+S.MSG.ID
|
2022-10-25 06:05:54 +00:00
|
|
|
|
cmp #2
|
|
|
|
|
bne .1
|
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr CS.RUN.MsgBox
|
|
|
|
|
bra CS.RUN
|
2022-10-25 06:05:54 +00:00
|
|
|
|
|
|
|
|
|
.1 cmp #42
|
2022-10-09 21:22:46 +00:00
|
|
|
|
bne .2
|
2020-09-04 15:21:15 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
>LDYA L.GUITEST1
|
|
|
|
|
jsr CS.RUN.Exec
|
2022-10-09 21:22:46 +00:00
|
|
|
|
bra CS.RUN
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2022-10-09 21:22:46 +00:00
|
|
|
|
.2 cmp #44
|
|
|
|
|
bne CS.RUN
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
>LDYA L.GUITEST2
|
|
|
|
|
jsr CS.RUN.Exec
|
2020-10-27 16:33:10 +00:00
|
|
|
|
bra CS.RUN
|
2015-03-23 07:28:03 +00:00
|
|
|
|
*--------------------------------------
|
2022-11-02 06:54:30 +00:00
|
|
|
|
CS.RUN.MsgBox >PUSHW L.ABOUT.T
|
2022-12-07 07:02:29 +00:00
|
|
|
|
>PUSHWI BM.ID.INFO
|
|
|
|
|
>PUSHW L.ABOUT.M
|
|
|
|
|
>PUSHBI 63 BUT.ID.OK
|
2022-11-02 06:54:30 +00:00
|
|
|
|
>LIBCALL hLIBGUI,LIBGUI.MBOX.MsgBox
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.Exec >PUSHYA
|
|
|
|
|
>PUSHBI 0
|
|
|
|
|
>SYSCALL ExecL
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-12-04 07:18:24 +00:00
|
|
|
|
CS.DOEVENT lda (pEvent)
|
|
|
|
|
bpl .9
|
2020-09-03 15:27:28 +00:00
|
|
|
|
|
2022-10-18 05:56:59 +00:00
|
|
|
|
>LIBCALL hLIBGUI,LIBGUI.PTR.Update
|
2020-09-03 15:27:28 +00:00
|
|
|
|
|
2017-12-04 07:18:24 +00:00
|
|
|
|
.9 sec
|
2017-06-02 15:14:42 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2023-07-10 04:57:04 +00:00
|
|
|
|
CS.QUIT lda hLIBGUI
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
>SYSCALL UnloadLib
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
2015-03-23 07:28:03 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.END
|
2020-06-30 15:32:23 +00:00
|
|
|
|
LIBGUI .AZ "libgui"
|
2017-11-15 16:29:23 +00:00
|
|
|
|
hLIBGUI .BS 1
|
2022-11-02 06:54:30 +00:00
|
|
|
|
ABOUT.T .AZ "About GUI"
|
2022-12-07 07:02:29 +00:00
|
|
|
|
ABOUT.M .CS "MsgBox demo with all possible buttons.\r\n"
|
|
|
|
|
.CS "...Line 2...\r\n"
|
|
|
|
|
.CZ "...Line 3.\r\n"
|
2022-10-25 06:05:54 +00:00
|
|
|
|
GUITEST1 .AZ "${ROOT}root/asmtest/testgui"
|
2022-10-09 21:22:46 +00:00
|
|
|
|
GUITEST2 .AZ "${ROOT}root/ctest/testgui"
|
2017-12-14 16:25:03 +00:00
|
|
|
|
*--------------------------------------
|
2022-10-09 21:22:46 +00:00
|
|
|
|
MSG .BS S.MSG
|
2017-11-15 16:29:23 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
|
|
|
|
DS.START
|
2020-10-26 16:32:51 +00:00
|
|
|
|
|
2020-09-04 15:21:15 +00:00
|
|
|
|
DS.END .ED
|
2015-03-23 07:28:03 +00:00
|
|
|
|
MAN
|
2020-06-30 15:32:23 +00:00
|
|
|
|
SAVE usr/src/sbin/gui.s
|
2015-03-23 07:28:03 +00:00
|
|
|
|
ASM
|