SD_SCROL/IOW_SCRA etc
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. |
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.
Scrolling means that the area selected will be moved up or down by an integral number of pixels. A positive number in D1.W will cause a downward movement. The vacated rows of pixels will be filled with paper colour.
The top of a window is defined as all the rows above the line on which the cursor lies (the cursor line).
The bottom of the window is defined as all the rows below the cursor line.
Example
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!