QDOS Internals

Anything you never knew you wanted to know about the Sinclair QL.

User Tools

Site Tools



These traps scroll all or part of a window.

TrapValue in D0.BAction
SD_SCROL/IOW_SCRA$18Scroll all of window
SD_SCRTP/IOW_SCRT$19Scroll top of window
SD_SCRBT/IOW_SCRB$1AScroll bottom of window
Call ParametersReturn Parameters
D0.BSee aboveD0.LError return.
D1.WDistance to scroll 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.
  • 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.


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!
qdosmsq/traps/trap_3/pana.txt · Last modified: 2009/05/18 16:53 by george.gwilt