mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 20:33:13 +00:00
145 lines
2.1 KiB
Plaintext
145 lines
2.1 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
*--------------------------------------
|
||
CB.InitCacheA sta CB.Cache+S.CB.CMD
|
||
*--------------------------------------
|
||
CB.ClearCache ldx #S.CB-1
|
||
|
||
.1 stz CB.Cache,x
|
||
dex
|
||
bne .1
|
||
|
||
rts
|
||
*--------------------------------------
|
||
CB.GetInCache >STYA .1+1
|
||
|
||
ldx #S.CB-1
|
||
|
||
.1 lda $ffff,x SELF MODIFIED
|
||
sta CB.Cache,x
|
||
dex
|
||
bpl .1
|
||
|
||
rts
|
||
*--------------------------------------
|
||
CB.GetBuf clc
|
||
|
||
ldx hCBBuf
|
||
bne .9
|
||
|
||
>LDYAI 512
|
||
>SYSCALL2 GetMem
|
||
bcs .9
|
||
|
||
stx hCBBuf
|
||
>STYA ZPCBPtr
|
||
>STYA ZPCBBufPtr
|
||
|
||
.9 rts
|
||
*--------------------------------------
|
||
CB.Cache2CBBuf
|
||
lda CB.Cache
|
||
lsr
|
||
tax
|
||
ldy CB.CmdLen-1,x
|
||
|
||
ldx #0
|
||
|
||
.1 lda CB.Cache,x
|
||
sta (ZPCBBufPtr)
|
||
inc ZPCBBufPtr
|
||
bne .2
|
||
|
||
inc ZPCBBufPtr+1
|
||
|
||
.2 inx
|
||
dey
|
||
bpl .1
|
||
|
||
rts
|
||
*--------------------------------------
|
||
CB.FlushBufToYA ldx hCBBuf
|
||
beq .8
|
||
|
||
pha
|
||
phy
|
||
|
||
bit PTR.bVisible
|
||
bpl .1
|
||
|
||
jsr PTR.Hide.I
|
||
|
||
.1 lda #0
|
||
sta (ZPCBBufPtr)
|
||
|
||
ply
|
||
pla
|
||
|
||
jsr OBJ.GetInCache
|
||
|
||
.2 lda (ZPCBPtr)
|
||
beq .7
|
||
|
||
>LDYA ZPCBPtr
|
||
jsr CB.GetInCache A = CB.CMD
|
||
|
||
cmp #S.CB.CMD.DRAWTEXT2
|
||
bne .4
|
||
|
||
lda #S.CB.CMD.DRAWTEXT+S.CB.CMD.OSD
|
||
sta CB.Cache+S.CB.CMD
|
||
jsr CB.GFXWrite
|
||
bcs .9
|
||
|
||
jsr CLIP.CB.Cache
|
||
bcs .3
|
||
|
||
jsr CB.GFXWrite
|
||
|
||
.3 lda CB.Cache+S.CB.SrcPtr
|
||
>SYSCALL2 FreeStkObj
|
||
bra .5
|
||
|
||
.4 jsr CLIP.CB.Cache
|
||
bcs .5
|
||
|
||
jsr CB.GFXWrite
|
||
|
||
.5 lda (ZPCBPtr) Get Cmd
|
||
lsr
|
||
tax
|
||
lda CB.CmdLen-1,x
|
||
sec +1
|
||
adc ZPCBPtr
|
||
sta ZPCBPtr
|
||
bcc .2
|
||
|
||
inc ZPCBPtr+1
|
||
bra .2
|
||
|
||
.7 lda hCBBuf
|
||
stz hCBBuf
|
||
>SYSCALL2 FreeMem
|
||
|
||
bit PTR.bVisible
|
||
bpl .8
|
||
|
||
jmp PTR.Show.I
|
||
|
||
.8 clc
|
||
.9 rts
|
||
*--------------------------------------
|
||
CB.GFXWrite >PUSHB WND.Screen+S.OBJ.hPARENT
|
||
>PUSHBI IOCTL.WRITE
|
||
>PUSHW L.CB.Cache
|
||
>SYSCALL2 IOCTL
|
||
rts
|
||
*--------------------------------------
|
||
|
||
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE usr/src/lib/libgui.s.cb
|
||
LOAD usr/src/lib/libgui.s
|
||
ASM
|