qdosmsq:traps:trap_3:blkp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

qdosmsq:traps:trap_3:blkp [2009/05/17 14:08] (current)
george.gwilt created
Line 1: Line 1:
 +====== IOW_BLKP etc ======
 +
 +
 +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?|
 +
 +===== Errors =====
 +
 +|ERR_NC|Not complete.|
 +|ERR_NO|Channel not open.|
 +|ERR_OR|Block outside window|
 +
 +
 +===== Notes =====
 +  * All registers not shown above are not used on entry and are probably preserved on exit.
 +  * A1.L points to a set of four words in the usual form:
 +    * X-size
 +    * Y-size
 +    * X-origin (relative to window origin)
 +    * Y-origin (relative to window origin)
 +  * A2.L points to three long words:
 +    * Stipple colour 1
 +    * Stipple colour 2
 +    * Stipple code (-1 to 3)
 +
 +===== Example =====
 +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.
 +
 +<code>
 +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
 +</code>
 +
  
  • qdosmsq/traps/trap_3/blkp.txt
  • Last modified: 2009/05/17 14:08
  • by george.gwilt