QDOS Internals

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

User Tools

Site Tools



These traps set on or off flashing and underlining.

TrapValue in D0.BAction
SD_SETFL/IOW_SFLA$2ASet flash mode
SD_SETUL/IOW_SULA$2BSet underline mode
Call ParametersReturn Parameters
D0.BSee aboveD0.LError return.
D1.BSet mode D1.LCorrupted.
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 value in D1.B determines whether the mode is to be on or off. A value of 0 sets it off. Other values set it on.


The example below shows the use of this trap call to print As with the A underlined. It is assumed that A0 contains the window's ID.

udline  moveq   #-1,d3          ; Timeout
        moveq   #1,d1           ; To set underlining on
        bsr     ul              ; Call sd_setul
        moveq   #"A",d1         ; To print A
        bsr     prt             ; Call io_sbyte
        moveq   #0,d1           ; To set underlining off
        bsr     ul
        moveq   #"s",d1         ; To print s
        bsr     prt

ul      moveq   #sd_setul,d0
ul_1    trap    #3
        tst.l   d0              ; OK? . .
        bne     error           ; . . no!

prt     moveq   #io_sbyte,d0
        bra     ul_1
qdosmsq/traps/trap_3/sula.txt · Last modified: 2009/05/19 15:44 by george.gwilt