mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 20:33:13 +00:00
dad22dfc30
ASM:added \% KERNEL:BUGFIX in DevMgr LIBGUI:New API
114 lines
2.2 KiB
Plaintext
114 lines
2.2 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
.LIST OFF
|
||
.OP 65C02
|
||
.OR $2000
|
||
.TF sbin/gui
|
||
*--------------------------------------
|
||
.INB inc/io.i
|
||
.INB inc/macros.i
|
||
.INB inc/a2osx.i
|
||
.INB inc/gfx.i
|
||
.INB inc/libgui.i
|
||
*--------------------------------------
|
||
* Zero Page Segment, up to 32 bytes
|
||
*--------------------------------------
|
||
.DUMMY
|
||
.OR ZPBIN
|
||
ZS.START
|
||
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 #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
|
||
.DA 0
|
||
*--------------------------------------
|
||
* Relocation Table
|
||
*--------------------------------------
|
||
.1 .DA CS.INIT
|
||
.DA CS.RUN
|
||
.DA CS.DOEVENT
|
||
.DA CS.QUIT
|
||
L.LIBGUI .DA LIBGUI
|
||
L.GUITEST1 .DA GUITEST1
|
||
L.GUITEST2 .DA GUITEST2
|
||
L.MSG .DA MSG
|
||
.DA 0
|
||
*--------------------------------------
|
||
CS.INIT >LDYA L.LIBGUI
|
||
>SYSCALL LoadLib
|
||
bcs .9
|
||
|
||
sta hLIBGUI
|
||
|
||
* clc
|
||
.9
|
||
CS.INIT.RTS rts
|
||
*--------------------------------------
|
||
CS.RUN >SLEEP
|
||
|
||
>PUSHW L.MSG
|
||
>LIBCALL hLIBGUI,LIBGUI.MSG.Get
|
||
bcs CS.RUN
|
||
|
||
.1 lda MSG+S.MSG.T
|
||
cmp #S.MSG.T.ID
|
||
bne CS.RUN
|
||
|
||
lda MSG+S.MSG.ID
|
||
cmp #42
|
||
bne .2
|
||
|
||
>PUSHW L.GUITEST1
|
||
>PUSHBI 0
|
||
>SYSCALL ExecL
|
||
bra CS.RUN
|
||
|
||
.2 cmp #44
|
||
bne CS.RUN
|
||
|
||
>PUSHW L.GUITEST2
|
||
>PUSHBI 0
|
||
>SYSCALL ExecL
|
||
bra CS.RUN
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
CS.DOEVENT lda (pEvent)
|
||
bpl .9
|
||
|
||
>LIBCALL hLIBGUI,LIBGUI.PTR.Update
|
||
|
||
.9 sec
|
||
rts
|
||
*--------------------------------------
|
||
CS.QUIT clc
|
||
CS.QUIT.RTS rts
|
||
*--------------------------------------
|
||
CS.END
|
||
LIBGUI .AZ "libgui"
|
||
hLIBGUI .BS 1
|
||
GUITEST1 .AZ "${ROOT}root/asmtest/guitest1"
|
||
GUITEST2 .AZ "${ROOT}root/ctest/testgui"
|
||
*--------------------------------------
|
||
MSG .BS S.MSG
|
||
*--------------------------------------
|
||
.DUMMY
|
||
.OR 0
|
||
DS.START
|
||
|
||
DS.END .ED
|
||
MAN
|
||
SAVE usr/src/sbin/gui.s
|
||
ASM
|