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. |
ERR_NC | Not complete. |
ERR_NO | Channel not open. |
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