qdosmsq:traps:trap_3:scra

SD_PAN/IOW_PANA etc

These traps pan all or part of a window.

TrapValue in D0.BAction
SD_PAN/IOW_PANA$1BPan all of window
SD_PANLN/IOW_PANL$1EPan cursor line
SD_PANRT/IOW_PANR$1FPan right hand end of cursor line
Call ParametersReturn Parameters
D0.BSee aboveD0.LError return.
D1.WDistance to pan D1.LCorrupted.
D3.WTimeout D3.LPreserved.
A0.LChannel ID A0.LPreserved.
ERR_NCNot complete.
ERR_NOChannel not open.
  • 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.

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.

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
  • qdosmsq/traps/trap_3/scra.txt
  • Last modified: 2009/05/18 17:21
  • by george.gwilt