mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-29 17:50:18 +00:00
83 lines
1.4 KiB
Plaintext
83 lines
1.4 KiB
Plaintext
NEW
|
||
PREFIX
|
||
AUTO 4,1
|
||
*--------------------------------------
|
||
WND.Init >LDYA L.DEVNAME.GFX
|
||
>SYSCALL GetDevByName.YA
|
||
bcs .9
|
||
|
||
stx hDevScreen
|
||
txa
|
||
>SYSCALL GetDevStatus
|
||
bcs .9
|
||
>STYA ZPPtr1
|
||
|
||
ldy #S.DIB.GFX.W
|
||
|
||
lda (ZPPtr1),y
|
||
sta WND.Cache+S.OBJ.W
|
||
iny
|
||
lda (ZPPtr1),y
|
||
sta WND.Cache+S.OBJ.W+1
|
||
|
||
lda SYSFONB.H
|
||
clc
|
||
adc #6
|
||
sta WND.TB.H
|
||
|
||
iny #S.DIB.GFX.H
|
||
|
||
lda (ZPPtr1),y
|
||
sec
|
||
sbc SYSFONB.H
|
||
sta WND.Cache+S.OBJ.H
|
||
|
||
iny
|
||
lda (ZPPtr1),y
|
||
sbc #0
|
||
sta WND.Cache+S.OBJ.H+1
|
||
|
||
lda #S.WND.F.NOBORDER
|
||
sta WND.Cache+S.OBJ.F
|
||
|
||
lda #CUR.T.ARROW
|
||
sta WND.Cache+S.WND.hCUR
|
||
>LDYA L.WND.CACHE
|
||
jsr WND.New
|
||
bcs .9
|
||
|
||
stx WND.Stack
|
||
|
||
.9 rts
|
||
*--------------------------------------
|
||
WND.Quit
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
WND.New >STYA ZPPtr1
|
||
>SYSCALL getmem
|
||
bcs .9
|
||
|
||
>STYA ZPWNDPtr
|
||
|
||
ldy #S.WND-1
|
||
|
||
.1 lda (ZPPtr1),y
|
||
sta (ZPWNDPtr),y
|
||
dey
|
||
bpl .1
|
||
|
||
.9 rts
|
||
*--------------------------------------
|
||
WND.Paint >STYA ZPPtr1
|
||
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
WND.Close
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE USR/SRC/LIB/LIBGUI.S.WND
|
||
LOAD USR/SRC/LIB/LIBGUI.S
|
||
ASM
|