qdosmsq:traps:trap_3:scra

Differences

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

Link to this comparison view

qdosmsq:traps:trap_3:scra [2009/05/18 17:21] (current)
george.gwilt created
Line 1: Line 1:
 +====== SD_PAN/​IOW_PANA etc ======
 +
 +
 +These traps pan all or part of a window.
 +^Trap^Value in D0.B^Action^
 +|SD_PAN/​IOW_PANA|$1B|Pan all of window|
 +|SD_PANLN/​IOW_PANL|$1E|Pan cursor line|
 +|SD_PANRT/​IOW_PANR|$1F|Pan right hand end of cursor line|
 +
 +^Call Parameters^^Return Parameters^^
 +|D0.B|See above|D0.L|Error return.|
 +|D1.W|Distance to pan |D1.L|Corrupted.|
 +|D3.W|Timeout |D3.L|Preserved.|
 +|A0.L|Channel ID |A0.L|Preserved.|
 +
 +===== Errors =====
 +
 +
 +|ERR_NC|Not complete.|
 +|ERR_NO|Channel not open.|
 +
 +
 +===== Notes =====
 +  * All registers not shown above are not used on entry and are preserved on exit.
 +   * The number in D1.W is the number of pixels to pan. A positive distance implies that the pixels will move to the right. The space created will be filled with the paper colour.
 +  * For SD_PANRT/​IOW_PANR the right hand end includes the character at the cursor position. ​
 +
 +===== Example =====
 +The example below shows the use of this trap call to jiggle part of the cursor line. It is assumed that A0 contains the window'​s ID.
 +
 +<​code>​
 +jiggle  ​
 +        moveq   #​-1,​d3 ​         ; Timeout
 +        moveq   #​2,​d1 ​          ; Move right 2 pixels
 +        bsr     pan
 +        moveq   #​10,​d2 ​         ; Delay a bit
 +loop    dbf     ​d2,​loop
 +        moveq   #​-2,​d1 ​         ; Move left 2 pixels
 +        bsr     pan
 +
 +pan     ​moveq ​  #​sd_panrt,​d0 ​   ; $1F
 +        trap    #3              ; Pan
 +        tst.l   ​d0 ​             ; OK? . .
 +        bne     ​error ​          ; . . no!
 +        rts
 +</​code>​
 +
  
  • qdosmsq/traps/trap_3/scra.txt
  • Last modified: 2009/05/18 17:21
  • by george.gwilt