A2osX/DRV/DHGR.DRV.S.RECT.txt

67 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

PR#3
PREFIX /A2OSX.BUILD
LOMEM $A00
INC 1
AUTO 6
.LIST OFF
*--------------------------------------
* FILLRECT
* 1 : OP (XOR,SET,ORA)
* 2 : Mode
* 3 : Color
* 4 : SrcX1
* 6 : SrcY1
* 8 : SrcX2
* 10 : SrcY2
*--------------------------------------
FILLRECT jsr HLINE
ldy CB.Cache+S.CB.Y1
cpy CB.Cache+S.CB.Y2
beq .8
.2 iny
phy
jsr LBUF.DrawAtY
ply
cpy CB.Cache+S.CB.Y2
bne .2
.8 rts
*--------------------------------------
* 4 : SrcX1
* 6 : SrcY1
* 8 : SrcX2
* 10 : SrcY2
* 18 : S.CB.DstPtr = Size in Bytes to save this RECT
*--------------------------------------
GETRECTBUFSIZE >LDYA CB.Cache+S.CB.X1
jsr DIVMOD7YA
sta GBYTE
>LDYA CB.Cache+S.CB.X2
jsr DIVMOD7YA
inc COL2 + 1
sec
sbc GBYTE (COL2+1)-COL1
tax
>LDYA CB.Cache+S.CB.Y1
jsr YAMultX
phy
ldy #S.CB.DstPtr+1
sta (ZPCmdPtr),y
pla
dey
sta (ZPCmdPtr),y
rts
*--------------------------------------
MAN
SAVE /A2OSX.SRC/DRV/DHGR.DRV.S.BLT
LOAD /A2OSX.SRC/DRV/DHGR.DRV.S
ASM