These SMSQ/E traps draw blocks using GD2 colours.
Trap | Value of D0.B | Action |
IOW_BLKP | $5C | Draw palette colour block |
IOW_BLKT | $5D | Draw true colour block |
IOW_BLKN | $5E | Draw native colour block |
Call Parameters | Return Parameters |
D0.B | See above | D0.L | Error return |
D1.L | | D1.L | Corrupted? |
D3.W | Timeout | D3.L | Preserved. |
A0.L | Channel ID | A0.L | Preserved. |
A1.L | Pointer to block definition. | A1.L | Corrupted? |
A2.L | Pointer to colour definition | A2.L | Preserved? |
ERR_NC | Not complete. |
ERR_NO | Channel not open. |
ERR_OR | Block outside window |
The example below shows the use of this trap call to print a block. It is assumed that A0 contains the window's channel ID.
blck moveq #iow_blkt,d0 ; $5D
lea bk,a1 ; Block definition
lea cl,a2 ; Colour definition
moveq #-1,d3 ; Timeout
trap #3 ; Draw block
tst.l d0 ; OK? . .
bne error ; . . no!
bk dc.w 100,48 ; Size
dc.w 10,10 ; Position in window
bk dc.l $B66D6D00 ; Brick (1st stipple colour)
dc.l $00FFFF00 ; Cyan (2nd stipple colour)
dc.l 3 ; Stipple code