A2osX/LIB/LIBGUI.S.txt

224 lines
4.8 KiB
Plaintext
Raw Normal View History

NEW
2018-11-17 17:17:13 +00:00
PREFIX
2017-12-22 21:24:30 +00:00
AUTO 4,1
.LIST OFF
.OP 65C02
.OR $2000
2018-07-23 15:28:42 +00:00
.TF LIB/LIBGUI.O
*--------------------------------------
2018-07-23 15:28:42 +00:00
.INB INC/MACROS.I
.INB INC/A2OSX.I
.INB INC/GUI.I
.INB INC/LIBGUI.I
.INB INC/GFX.I
2018-05-16 06:02:57 +00:00
*--------------------------------------
WND.MAX .EQ 64
*--------------------------------------
.MA SWAP16
lda ]1
ldx ]2
stx ]1
sta ]2
lda ]1+1
ldx ]2+1
stx ]1+1
sta ]2+1
.EM
.MA NOT16
sec
lda #0
sbc ]1
sta ]1
lda #0
sbc ]1+1
sta ]1+1
.EM
.MA SCMPAX
sec
sbc ]1
txa
sbc ]1+1
bvc :1
eor #$80
:1 .EQ *
.EM
*--------------------------------------
ZPPtr1 .EQ ZPLIB
2017-12-04 07:18:24 +00:00
ZPGCPtr .EQ ZPLIB+2
ZPCBPtr .EQ ZPLIB+4
2018-05-16 06:02:57 +00:00
ZPWNDPtr .EQ ZPLIB+6
2016-06-15 06:21:42 +00:00
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
CS.START cld
jmp (.1,x)
.DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1
.DA 0
.DA CS.END-CS.START
.DA 0
.DA 0
.DA 0
*--------------------------------------
* Relocation Table
*--------------------------------------
.1 .DA LIB.LOAD
.DA LIB.UNLOAD
2017-11-15 16:29:23 +00:00
.DA Draw
.DA SetCursor.A
.DA SetCursorPos
2016-06-15 15:58:45 +00:00
.DA HideCursor
.DA ShowCursor
2017-12-04 07:18:24 +00:00
.DA UpdateCursor
.DA GetScreenGC
2017-12-04 07:18:24 +00:00
J.Cmds .DA DrawLine
.DA DrawText
L.DEVNAME.GFX .DA DEVNAME.GFX
L.DEVNAME.MOUSE .DA DEVNAME.MOUSE
2018-05-16 06:02:57 +00:00
L.SYSX7 .DA SYSX7
L.SYSX7B .DA SYSX7B
L.MouseClamp .DA MouseClamp
2017-12-04 07:18:24 +00:00
L.GC.Screen .DA GC.Screen
L.CB.Cache .DA CB.Cache
L.CUR.CB .DA CUR.CB
L.CUR.SaveBuf .DA CUR.SaveBuf
L.Cursors .DA CUR.Arrow
2017-12-04 07:18:24 +00:00
.DA CUR.ResizeX
.DA CUR.ResizeY
2017-12-05 07:09:16 +00:00
.DA CUR.ResizeXY1
.DA CUR.ResizeXY2
2017-12-04 07:18:24 +00:00
.DA CUR.Cross
.DA CUR.Text
.DA CUR.Wait1
.DA CUR.Wait2
.DA CUR.Wait3
.DA CUR.Wait4
.DA CUR.Wait5
.DA CUR.Wait6
J.Clip .DA CLIP.Point SETPIXEL
.DA CLIP.Point GETPIXEL
.DA CLIP.HLine
.DA CLIP.VLine
.DA CLIP.Rect FILLRECT
.DA CLIP.BitBlt
.DA CLIP.Rect GETRECTBUFSIZE
.DA CLIP.Line
.DA CLIP.Text
.DA 0
*--------------------------------------
2018-05-16 06:02:57 +00:00
LIB.LOAD lda LibCount
bne .8
2017-12-04 07:18:24 +00:00
2018-05-16 06:02:57 +00:00
jsr FON.Init
jsr WND.Init
jsr MOU.Init
2017-12-04 07:18:24 +00:00
2018-05-16 06:02:57 +00:00
.8 inc LibCount
2017-12-04 07:18:24 +00:00
clc
2018-05-16 06:02:57 +00:00
rts
*--------------------------------------
LIB.UNLOAD dec LibCount
bne .8
2018-05-16 06:02:57 +00:00
jsr MOU.Quit
2018-05-16 06:02:57 +00:00
.8 clc
2016-06-15 06:21:42 +00:00
rts
*--------------------------------------
2017-12-04 16:42:08 +00:00
GC.Get >STYA .1+1
ldx #S.GC-1
.1 lda $ffff,x SELF MODIFIED
sta GC.Cache,x
dex
bpl .1
rts
*--------------------------------------
CB.Get >STYA .1+1
ldx #S.CB-1
.1 lda $ffff,x SELF MODIFIED
sta CB.Cache,x
dex
bpl .1
2017-12-04 07:18:24 +00:00
rts
*--------------------------------------
GetScreenGC >LDYA L.GC.Screen
rts
*--------------------------------------
GoDevGfx >LDYA L.CB.Cache
2017-12-14 16:25:03 +00:00
ldx #DEVMGR.WRITE
GoDevGfx.Jmp jmp $ffff
*--------------------------------------
2018-11-17 17:17:13 +00:00
.INB USR/SRC/LIB/LIBGUI.S.BM
.INB USR/SRC/LIB/LIBGUI.S.BUT
.INB USR/SRC/LIB/LIBGUI.S.CLIP
.INB USR/SRC/LIB/LIBGUI.S.CUR
.INB USR/SRC/LIB/LIBGUI.S.DRAW
.INB USR/SRC/LIB/LIBGUI.S.FON
.INB USR/SRC/LIB/LIBGUI.S.MENU
.INB USR/SRC/LIB/LIBGUI.S.MOU
.INB USR/SRC/LIB/LIBGUI.S.PAT
.INB USR/SRC/LIB/LIBGUI.S.WND
*--------------------------------------
CS.END
*--------------------------------------
2018-11-17 17:17:13 +00:00
.INB USR/SRC/LIB/LIBGUI.G.BM
.INB USR/SRC/LIB/LIBGUI.G.CUR
.INB USR/SRC/LIB/LIBGUI.G.FON
.INB USR/SRC/LIB/LIBGUI.G.WND
*--------------------------------------
DEVNAME.GFX .AZ "GFX"
DEVNAME.MOUSE .AZ "MOU1"
*--------------------------------------
2018-05-16 06:02:57 +00:00
SYSX7 .AZ "/A2OSX.BUILD/SBIN/GUI/SYSX7"
SYSX7B .AZ "/A2OSX.BUILD/SBIN/GUI/SYSX7B"
*--------------------------------------
LibCount .BS 1
hDevScreen .BS 1
hDevMouse .BS 1
2016-06-15 06:21:42 +00:00
*--------------------------------------
DX .BS 2
DY .BS 2
IY .BS 1
IE .BS 2
D .BS 2
INE .BS 2
Counter .BS 2
CLIP.Line.P1 .BS 1
CLIP.Line.P2 .BS 1
*--------------------------------------
2017-11-15 16:29:23 +00:00
CB.CmdLen .DA S.CB.Y1+1 SETPIXEL
.DA S.CB.Y1+1 GETPIXEL
.DA S.CB.X2+1 HLINE
.DA S.CB.Y2+1 VLINE
.DA S.CB.Y2+1 FILLRECT
.DA S.CB.DstPtr+1 BITBLT
2017-11-20 06:59:59 +00:00
.DA S.CB.DstPtr+1 GETRECTBUFSIZE
2017-11-15 16:29:23 +00:00
.DA S.CB.Y2+1 DRAWLINE
.DA S.CB.TxtPtr+1 DRAWTEXT
2017-11-15 16:29:23 +00:00
*--------------------------------------
MouseClamp .BS 8
*--------------------------------------
PAT.Buf .BS 1 S.BM.F
.DA #1 S.BM.RowBytes
.DA 8 S.BM.W
.DA 8 S.BM.H
.DA 0 S.BM.MASK.OFS
.BS 8 (data)
*--------------------------------------
GC.Cache .BS S.GC
CB.Cache .BS S.CB
BM.Cache .BS S.BM
*--------------------------------------
MAN
2018-11-17 17:17:13 +00:00
SAVE USR/SRC/LIB/LIBGUI.S
ASM