QDOS Internals

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

User Tools

Site Tools



These traps set the colour of paper, strip and ink.

TrapValue of D0.BAction
SD_SETPA/IOW_SPAP$27Sets paper colour
SD_SETST/IOW_SSTR$28Sets strip colour
SD_SETIN/IOW_SINK$29Sets ink colour
Call ParametersReturn Parameters
D0.BSee aboveD0.LCorrupted?
D1.BColour D1.LPreserved.
D3.WTimeout D3.LPreserved.
A0.LChannel ID A0.LPreserved.
A1.L A1.LCorrupted.


ERR_NCNot complete.
ERR_NOChannel not open.


  • All registers not shown above are not used on entry and are preserved on exit.
  • The paper colour is the background colour of a window used in clearing, scrolling and panning. The strip colour is used to highlight text. The ink colour is used for writing characters and printing graphics. Note that the S*BASIC "PAPER" command sets both paper and strip to the same colour unlike SD_SETPAP/IOW_SPAP which sets only the paper colour.


The example below shows the use of this trap call to set the ink to black. It is assumed that A0 contains the channel ID.

ink     moveq   #-1,d3          ; Timeout
        moveq   #sd_setin,d0    ; $29
        moveq   #0,d1           ; Black
        trap    #3              ; Set the ink
        tst.l   d0              ; OK? . .
        bne     error           ; . . no!
qdosmsq/traps/trap_3/spap.txt · Last modified: 2009/05/14 15:05 by george.gwilt