qdosmsq:traps:trap_3:blok

Differences

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

Link to this comparison view

qdosmsq:traps:trap_3:blok [2009/05/17 15:26] (current)
george.gwilt created
Line 1: Line 1:
 +====== SD_FILL/​IOW_BLOK ======
 +
 +
 +This trap fills a rectangular block in a window.
 +
 +^Call Parameters^^Return Parameters^^
 +|D0.B|$2E|D0.L|Error return.|
 +|D1.B|Colour |D1.L|Corrupted.|
 +|D3.W|Timeout |D3.L|Preserved.|
 +|A0.L|Channel ID |A0.L|Preserved.|
 +|A1.L|Address of block definition|A1.L|Corrupted.|
 +
 +
 +===== 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 preserved on exit.
 +  * A1.L points to a block definition of four words:
 +    * X-size
 +    * Y-size
 +    * X-origin (relative to window origin)
 +    * Y-origin (relative to window origin)
 +
 +===== Example =====
 +The example below shows the use of this trap call to fill a block with grey stipple. It is assumed that A0 contains the window'​s ID.
 +
 +<​code>​
 +blck    moveq   #​sd_fill,​d0 ​    ; $2E
 +        moveq   #​-1,​d1 ​         ; Grey stipple
 +        moveq   #​-1,​d3 ​         ; Timeout
 +        lea     ​bk,​a1 ​          ; Block definition
 +        trap    #3              ; Draw the block
 +        tst.l   ​d0 ​             ; OK? . .
 +        bne     ​error ​          ; . . no!
 +
 +bk      dc.w    200,​100 ​        ; Size of block
 +        dc.w    10,20           ; Origin in window
 +</​code>​
 +
  
  • qdosmsq/traps/trap_3/blok.txt
  • Last modified: 2009/05/17 15:26
  • by george.gwilt