These traps scroll all or part of a window.
Trap | Value in D0.B | Action |
SD_SCROL/IOW_SCRA | $18 | Scroll all of window |
SD_SCRTP/IOW_SCRT | $19 | Scroll top of window |
SD_SCRBT/IOW_SCRB | $1A | Scroll bottom of window |
Call Parameters | Return Parameters |
D0.B | See above | D0.L | Error return. |
D1.W | Distance to scroll | 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 scroll text up by one line. It is assumed that A0 contains the correct channel ID.
scroll moveq #sd_scrol,d0 ; $18
moveq #-10,d1 ; Up one line
moveq #-1,d3 ; Timeout
trap #3 ; Scroll up a line
tst.l d0 ; OK? . .
bne error ; . . no!