2015-03-23 07:28:03 +00:00
|
|
|
|
NEW
|
2017-12-22 21:24:30 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
|
|
|
|
AUTO 4,1
|
2015-03-23 07:28:03 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2017-12-14 16:25:03 +00:00
|
|
|
|
.TF /A2OSX.BUILD/SBIN/GUI/GUI
|
2015-03-23 07:28:03 +00:00
|
|
|
|
*--------------------------------------
|
2017-03-29 15:48:15 +00:00
|
|
|
|
.INB /A2OSX.BUILD/INC/IO.I
|
|
|
|
|
.INB /A2OSX.BUILD/INC/MACROS.I
|
|
|
|
|
.INB /A2OSX.BUILD/INC/A2OSX.I
|
2017-12-22 21:24:30 +00:00
|
|
|
|
.INB /A2OSX.BUILD/INC/GUI.I
|
2017-11-14 16:57:34 +00:00
|
|
|
|
.INB /A2OSX.BUILD/INC/LIBGUI.I
|
2015-03-23 07:28:03 +00:00
|
|
|
|
*--------------------------------------
|
2017-06-02 15:14:42 +00:00
|
|
|
|
ZPPtr1 .EQ ZPBIN
|
|
|
|
|
*--------------------------------------
|
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
|
|
|
|
|
.DA 0
|
2017-11-15 16:29:23 +00:00
|
|
|
|
.DA CS.END-CS.START CS
|
|
|
|
|
.DA DS.END-DS.START DS
|
|
|
|
|
.DA #16 SS
|
|
|
|
|
.DA #2 ZP
|
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
|
2016-06-07 06:10:18 +00:00
|
|
|
|
L.MSG.INIT .DA MSG.INIT
|
2017-11-30 16:33:33 +00:00
|
|
|
|
L.LIBGUI .DA LIBGUI
|
2017-12-14 16:25:03 +00:00
|
|
|
|
L.SYSFONT .DA SYSFONT
|
2017-11-30 16:33:33 +00:00
|
|
|
|
L.Filename .DA Filename
|
2017-06-02 15:14:42 +00:00
|
|
|
|
L.MouseData .DA MouseData
|
2017-12-30 22:14:05 +00:00
|
|
|
|
L.CB.Paint .DA CB.Paint
|
2017-12-18 07:17:58 +00:00
|
|
|
|
L.BM.Apple .DA BM.Apple
|
2017-12-30 22:14:05 +00:00
|
|
|
|
L.TXT.Sample .DA TXT.Sample
|
2017-12-22 21:24:30 +00:00
|
|
|
|
L.CB.Marylin .DA CB.Marylin
|
2017-12-01 15:53:29 +00:00
|
|
|
|
L.CB.DrawLine .DA CB.DrawLine
|
2017-12-05 16:33:06 +00:00
|
|
|
|
L.GC.Clip .DA GC.Clip
|
2015-03-23 07:28:03 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2016-06-07 06:10:18 +00:00
|
|
|
|
CS.INIT >LDYA L.MSG.INIT
|
2017-08-25 15:02:16 +00:00
|
|
|
|
>SYSCALL PrintF.YA
|
2017-11-15 16:29:23 +00:00
|
|
|
|
|
|
|
|
|
>LDYA L.LIBGUI
|
|
|
|
|
>SYSCALL LoadLib.YA
|
2017-12-14 16:25:03 +00:00
|
|
|
|
bcs .99
|
2017-11-15 16:29:23 +00:00
|
|
|
|
sta hLIBGUI
|
2016-06-15 06:21:42 +00:00
|
|
|
|
|
2017-11-30 16:33:33 +00:00
|
|
|
|
>LIBCALL hLIBGUI,LIBGUI.InitGUI
|
2017-12-14 16:25:03 +00:00
|
|
|
|
bcs .99
|
2015-03-23 07:28:03 +00:00
|
|
|
|
|
2017-12-14 16:25:03 +00:00
|
|
|
|
>PUSHWI 0 Aux type
|
|
|
|
|
>PUSHBI $CC Type
|
|
|
|
|
>PUSHBI SYS.FOpen.R
|
|
|
|
|
>PUSHW L.SYSFONT
|
|
|
|
|
>SYSCALL LoadStkObj
|
|
|
|
|
bcs .99
|
|
|
|
|
sta hSYSFONT
|
2017-12-30 22:14:05 +00:00
|
|
|
|
sta CB.DrawText+S.CB.hFont
|
2017-12-14 16:25:03 +00:00
|
|
|
|
|
2017-11-29 06:59:27 +00:00
|
|
|
|
>PUSHWI 0 Aux type
|
|
|
|
|
>PUSHBI $CB Type
|
|
|
|
|
>PUSHBI SYS.FOpen.R
|
|
|
|
|
>PUSHW L.FILENAME
|
2017-12-07 16:33:39 +00:00
|
|
|
|
>SYSCALL LoadStkObj
|
2017-12-14 16:25:03 +00:00
|
|
|
|
.99 bcs .9
|
2017-11-29 06:59:27 +00:00
|
|
|
|
|
2017-12-22 21:24:30 +00:00
|
|
|
|
sta CB.Marylin+S.CB.SrcPtr
|
2017-12-05 07:09:16 +00:00
|
|
|
|
|
2017-12-30 22:14:05 +00:00
|
|
|
|
>LDYA L.TXT.Sample
|
|
|
|
|
>STYA CB.DrawText+S.CB.TxtPtr
|
|
|
|
|
|
|
|
|
|
>LDYA L.BM.Apple
|
|
|
|
|
>STYA CB.Apple+S.CB.SrcPtr
|
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
jsr Destop.Paint
|
|
|
|
|
|
2017-12-05 07:09:16 +00:00
|
|
|
|
lda #CUR.T.ARROW
|
|
|
|
|
>STA.G CUR.T
|
2017-12-04 07:18:24 +00:00
|
|
|
|
>LIBCALL hLIBGUI,LIBGUI.SetCursor.A
|
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
>LIBCALL hLIBGUI,LIBGUI.ShowCursor
|
2017-11-29 06:59:27 +00:00
|
|
|
|
|
2017-11-30 16:33:33 +00:00
|
|
|
|
lda (pPs)
|
|
|
|
|
ora #S.PS.F.EVENT Now accept events
|
|
|
|
|
sta (pPs)
|
|
|
|
|
|
2015-03-23 07:28:03 +00:00
|
|
|
|
clc
|
2017-11-29 06:59:27 +00:00
|
|
|
|
.9 rts
|
2015-03-23 07:28:03 +00:00
|
|
|
|
*--------------------------------------
|
2017-06-09 15:36:05 +00:00
|
|
|
|
CS.RUN lda A2osX.ASCREEN GUI screen active ?
|
2016-07-22 14:11:13 +00:00
|
|
|
|
cmp #3
|
2017-06-02 15:14:42 +00:00
|
|
|
|
bne .8 no, exit....
|
2016-07-22 14:11:13 +00:00
|
|
|
|
|
2017-11-30 16:33:33 +00:00
|
|
|
|
>PUSHW L.MouseData
|
|
|
|
|
>LIBCALL hLIBGUI,LIBGUI.ReadMouse
|
|
|
|
|
bcs .4
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2017-11-30 16:33:33 +00:00
|
|
|
|
lda MouseData+S.MOUSE.S
|
2017-11-28 16:32:38 +00:00
|
|
|
|
bit #S.MOUSE.S.MOVE
|
2017-06-02 15:14:42 +00:00
|
|
|
|
beq .1
|
2017-12-01 15:53:29 +00:00
|
|
|
|
|
2017-11-30 16:33:33 +00:00
|
|
|
|
>PUSHW L.MouseData
|
|
|
|
|
>LIBCALL hLIBGUI,LIBGUI.SetCursorPos
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2017-11-30 16:33:33 +00:00
|
|
|
|
lda MouseData+S.MOUSE.S
|
2017-11-28 16:32:38 +00:00
|
|
|
|
|
2017-12-04 16:42:08 +00:00
|
|
|
|
.1 bit #S.MOUSE.S.CLK
|
2017-06-02 15:14:42 +00:00
|
|
|
|
beq .4
|
2016-11-27 21:59:46 +00:00
|
|
|
|
|
2017-12-06 07:28:30 +00:00
|
|
|
|
>LDA.G CUR.T
|
|
|
|
|
inc
|
|
|
|
|
inc
|
|
|
|
|
cmp #CUR.T.WAIT+2
|
|
|
|
|
bne .2
|
2017-12-06 16:26:36 +00:00
|
|
|
|
|
2017-12-06 07:28:30 +00:00
|
|
|
|
lda #CUR.T.ARROW
|
|
|
|
|
|
|
|
|
|
.2 >STA.G CUR.T
|
|
|
|
|
>LIBCALL hLIBGUI,LIBGUI.SetCursor.A
|
2017-12-05 07:09:16 +00:00
|
|
|
|
|
2017-12-04 16:42:08 +00:00
|
|
|
|
lda MouseData+S.MOUSE.X1
|
2017-12-22 21:24:30 +00:00
|
|
|
|
sta CB.Marylin+S.CB.DstX
|
2017-12-04 16:42:08 +00:00
|
|
|
|
lda MouseData+S.MOUSE.X1+1
|
2017-12-22 21:24:30 +00:00
|
|
|
|
sta CB.Marylin+S.CB.DstX+1
|
2017-12-01 15:53:29 +00:00
|
|
|
|
|
2017-12-04 16:42:08 +00:00
|
|
|
|
lda MouseData+S.MOUSE.Y1
|
2017-12-22 21:24:30 +00:00
|
|
|
|
sta CB.Marylin+S.CB.DstY
|
2017-12-04 16:42:08 +00:00
|
|
|
|
lda MouseData+S.MOUSE.Y1+1
|
2017-12-22 21:24:30 +00:00
|
|
|
|
sta CB.Marylin+S.CB.DstY+1
|
2017-06-02 15:14:42 +00:00
|
|
|
|
|
2017-12-04 16:42:08 +00:00
|
|
|
|
jsr Destop.Paint
|
|
|
|
|
|
2017-06-02 15:14:42 +00:00
|
|
|
|
.4
|
|
|
|
|
|
|
|
|
|
.8 clc
|
2015-06-03 18:30:57 +00:00
|
|
|
|
rts
|
2015-03-23 07:28:03 +00:00
|
|
|
|
*--------------------------------------
|
2017-12-04 07:18:24 +00:00
|
|
|
|
CS.DOEVENT lda (pEvent)
|
|
|
|
|
bpl .9
|
2017-12-04 16:42:08 +00:00
|
|
|
|
asl
|
|
|
|
|
bpl .9
|
2017-12-04 07:18:24 +00:00
|
|
|
|
|
|
|
|
|
>LIBCALL hLIBGUI,LIBGUI.UpdateCursor
|
|
|
|
|
|
|
|
|
|
.9 sec
|
2017-06-02 15:14:42 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2015-03-23 07:28:03 +00:00
|
|
|
|
CS.QUIT clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-12-04 16:42:08 +00:00
|
|
|
|
Destop.Paint >LIBCALL hLIBGUI,LIBGUI.HideCursor
|
|
|
|
|
|
2017-12-05 16:33:06 +00:00
|
|
|
|
>LIBCALL hLIBGUI,LIBGUI.GetScreenGC
|
|
|
|
|
>PUSHYA
|
2017-12-30 22:14:05 +00:00
|
|
|
|
>PUSHW L.CB.Paint
|
2017-11-15 16:29:23 +00:00
|
|
|
|
>LIBCALL hLIBGUI,LIBGUI.Draw
|
2017-11-17 16:16:05 +00:00
|
|
|
|
|
2017-12-05 16:33:06 +00:00
|
|
|
|
* >LIBCALL hLIBGUI,LIBGUI.GetScreenGC
|
|
|
|
|
* >PUSHYA
|
|
|
|
|
|
|
|
|
|
>PUSHW L.GC.Clip
|
|
|
|
|
|
2017-12-22 21:24:30 +00:00
|
|
|
|
>PUSHW L.CB.Marylin
|
2017-11-29 06:59:27 +00:00
|
|
|
|
>LIBCALL hLIBGUI,LIBGUI.Draw
|
2017-12-01 15:53:29 +00:00
|
|
|
|
|
2017-12-04 16:42:08 +00:00
|
|
|
|
>LIBCALL hLIBGUI,LIBGUI.ShowCursor
|
2017-11-20 06:59:59 +00:00
|
|
|
|
rts
|
2016-07-22 14:11:13 +00:00
|
|
|
|
*--------------------------------------
|
2015-03-23 07:28:03 +00:00
|
|
|
|
CS.END
|
2018-04-11 15:35:51 +00:00
|
|
|
|
LIBGUI .AZ "libgui.o"
|
|
|
|
|
MSG.INIT .AZ "GUI:Init...\r\n"
|
2017-11-15 16:29:23 +00:00
|
|
|
|
hLIBGUI .BS 1
|
2017-12-14 16:25:03 +00:00
|
|
|
|
hSYSFONT .BS 1
|
2017-11-30 16:33:33 +00:00
|
|
|
|
*--------------------------------------
|
2018-04-11 15:35:51 +00:00
|
|
|
|
Filename .AZ "/A2OSX.BUILD/ROOT/MARILYN"
|
2017-11-30 16:33:33 +00:00
|
|
|
|
*--------------------------------------
|
2018-04-11 15:35:51 +00:00
|
|
|
|
SYSFONT .AZ "/A2OSX.BUILD/SBIN/GUI/SYSTEM"
|
2017-12-14 16:25:03 +00:00
|
|
|
|
*--------------------------------------
|
2017-12-04 16:42:08 +00:00
|
|
|
|
MouseData .BS S.MOUSE
|
2017-06-09 15:36:05 +00:00
|
|
|
|
*--------------------------------------
|
2017-12-30 22:14:05 +00:00
|
|
|
|
CB.Paint .DA #S.CB.CMD.FILLRECT
|
2017-11-20 06:59:59 +00:00
|
|
|
|
.DA #S.CB.OP.SET
|
2017-12-22 21:24:30 +00:00
|
|
|
|
.DA #S.CB.M.MONO
|
2017-12-06 07:28:30 +00:00
|
|
|
|
.DA #1
|
2017-12-01 15:53:29 +00:00
|
|
|
|
.DA 0 X1
|
|
|
|
|
.DA 0 Y1
|
|
|
|
|
.DA 559 X2
|
|
|
|
|
.DA 191 Y2
|
2017-11-16 16:46:18 +00:00
|
|
|
|
|
2017-12-06 07:28:30 +00:00
|
|
|
|
.DA #S.CB.CMD.FILLRECT
|
|
|
|
|
.DA #S.CB.OP.SET
|
2017-12-22 21:24:30 +00:00
|
|
|
|
.DA #S.CB.M.C16
|
2017-12-19 07:39:24 +00:00
|
|
|
|
.DA #4
|
2017-12-07 07:42:58 +00:00
|
|
|
|
.DA 40 X1
|
2017-12-22 21:24:30 +00:00
|
|
|
|
.DA 20 Y1
|
2017-12-07 07:42:58 +00:00
|
|
|
|
.DA 519 X2
|
2017-12-22 21:24:30 +00:00
|
|
|
|
.DA 171 Y2
|
2017-12-18 07:17:58 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CB.Apple .DA #S.CB.CMD.BITBLT
|
|
|
|
|
.DA #S.CB.OP.SET
|
2017-12-22 21:24:30 +00:00
|
|
|
|
.DA #S.CB.M.C16
|
2017-12-18 07:17:58 +00:00
|
|
|
|
.DA #0
|
|
|
|
|
.DA 0 X1
|
|
|
|
|
.DA 0 Y1
|
|
|
|
|
.DA 16 W
|
2017-12-30 22:14:05 +00:00
|
|
|
|
.DA 7 H
|
2017-12-18 07:17:58 +00:00
|
|
|
|
.DA 28 DestX
|
2017-12-22 21:24:30 +00:00
|
|
|
|
.DA 180 DestY
|
2017-12-18 07:17:58 +00:00
|
|
|
|
.BS 2 SrcPtr
|
2017-12-30 22:14:05 +00:00
|
|
|
|
.DA 0 DstPtr
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CB.DrawText .DA #S.CB.CMD.DRAWTEXT
|
|
|
|
|
.DA #S.CB.OP.SET OP
|
|
|
|
|
.DA #S.CB.M.MONO M
|
|
|
|
|
.BS 1 hFont
|
|
|
|
|
.DA 0 X1
|
|
|
|
|
.DA 0 Y1
|
|
|
|
|
.DA 0 SrcW
|
|
|
|
|
.DA 0 SrcH
|
|
|
|
|
.DA 4 DstX
|
|
|
|
|
.DA 7 DstY
|
|
|
|
|
.BS 2 TxtPtr
|
|
|
|
|
*--------------------------------------
|
2017-11-29 06:59:27 +00:00
|
|
|
|
.DA #0
|
2017-12-01 15:53:29 +00:00
|
|
|
|
*--------------------------------------
|
2017-12-18 07:17:58 +00:00
|
|
|
|
BM.Apple .DA #S.BM.F.BBP4
|
|
|
|
|
.DA #2 RowBytes
|
|
|
|
|
.DA 16 W
|
2017-12-30 22:14:05 +00:00
|
|
|
|
.DA 7 H
|
2017-12-18 07:17:58 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
|
|
|
|
|
.HS FFF6 green (8)
|
|
|
|
|
.HS 6FF6 green (8)
|
|
|
|
|
.HS EEEE yellow (15)
|
|
|
|
|
.HS CCFC orange (14)
|
|
|
|
|
.HS 88F8 magenta (10)
|
|
|
|
|
.HS 9999 violet (11)
|
|
|
|
|
.HS 1FF1 Dark blue (4)
|
|
|
|
|
*--------------------------------------
|
2018-04-11 15:35:51 +00:00
|
|
|
|
TXT.Sample .AZ "@@@@@@@@@ This Is A Sample Text with System Font Height=7px, Variable Width {}[] #0123456789$ @@@@@@@@@"
|
2017-12-30 22:14:05 +00:00
|
|
|
|
*--------------------------------------
|
2017-12-22 21:24:30 +00:00
|
|
|
|
CB.Marylin .DA #S.CB.CMD.BITBLT
|
2017-11-27 07:11:31 +00:00
|
|
|
|
.DA #S.CB.OP.SET
|
2017-12-22 21:24:30 +00:00
|
|
|
|
.DA #S.CB.M.MONO
|
2017-11-27 07:11:31 +00:00
|
|
|
|
.DA #0
|
2017-12-01 15:53:29 +00:00
|
|
|
|
.DA 0 X1
|
|
|
|
|
.DA 0 Y1
|
2017-12-07 16:33:39 +00:00
|
|
|
|
.DA 141 W
|
|
|
|
|
.DA 150 H
|
2017-12-07 07:42:58 +00:00
|
|
|
|
.DA 200 DestX
|
2017-12-30 22:14:05 +00:00
|
|
|
|
.DA 21 DestY
|
2017-12-01 15:53:29 +00:00
|
|
|
|
.BS 2 SrcPtr
|
2017-12-30 22:14:05 +00:00
|
|
|
|
.DA 0 DstPtr
|
2017-11-16 16:46:18 +00:00
|
|
|
|
|
2017-11-15 16:29:23 +00:00
|
|
|
|
.DA #0
|
2017-12-01 15:53:29 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CB.DrawLine .DA #0
|
2017-11-16 16:46:18 +00:00
|
|
|
|
.DA #S.CB.CMD.DRAWLINE
|
2017-11-17 16:16:05 +00:00
|
|
|
|
.DA #S.CB.OP.XOR
|
2017-12-22 21:24:30 +00:00
|
|
|
|
.DA #S.CB.M.MONO
|
2017-11-16 16:46:18 +00:00
|
|
|
|
.DA #1
|
2017-12-01 15:53:29 +00:00
|
|
|
|
.BS 2 X1
|
|
|
|
|
.BS 2 Y1
|
|
|
|
|
.BS 2 X2
|
|
|
|
|
.BS 2 Y2
|
2017-11-16 16:46:18 +00:00
|
|
|
|
|
2017-11-15 16:29:23 +00:00
|
|
|
|
.DA #0
|
2017-12-05 16:33:06 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
GC.Clip .DA #0
|
|
|
|
|
.DA #0
|
|
|
|
|
.DA #0
|
|
|
|
|
.DA #0
|
|
|
|
|
|
2017-12-07 07:42:58 +00:00
|
|
|
|
.DA 40 X1
|
2017-12-22 21:24:30 +00:00
|
|
|
|
.DA 20 Y1
|
2017-12-07 07:42:58 +00:00
|
|
|
|
.DA 519 X2
|
2017-12-22 21:24:30 +00:00
|
|
|
|
.DA 171 Y2
|
2017-11-15 16:29:23 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
|
|
|
|
DS.START
|
2017-12-05 07:09:16 +00:00
|
|
|
|
CUR.T .BS 1
|
2017-11-15 16:29:23 +00:00
|
|
|
|
DS.END
|
|
|
|
|
.ED
|
2015-03-23 07:28:03 +00:00
|
|
|
|
MAN
|
2017-11-14 16:57:34 +00:00
|
|
|
|
SAVE /A2OSX.SRC/SBIN/GUI.S
|
2015-03-23 07:28:03 +00:00
|
|
|
|
ASM
|