QDOS Internals

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

User Tools

Site Tools


Table of Contents


This trap redefines a window.

Call ParametersReturn Parameters
D0.B$0DD0.LError return.
D1.BBorder colour D1.LCorrupted.
D2.WBorder width D2.LPreserved.
A0.LChannel ID A0.LPreserved.
A1.LWindow block A1.LCorrupted.


ERR_NCNot complete.
ERR_NOChannel not open.


  • All registers not shown above are not used on entry and are preserved on exit.
  • This call allows the size, position and border of a window to be redefined. The old window contents are not moved or modified, but the cursor is repositioned to the top left of the window.
  • The size and position of the window are in the four word block to which A1 points:
    • block+0 Window width
    • block+2 Window height
    • block+4 X origin
    • block+6 Y origin


The example below shows the use of this trap call. It is assumed that A0 contains the window's ID.

wndw    moveq   #sd_wdef,d0     ; $0D
        moveq   #2,d1           ; Red border
        moveq   #4,d2           ; Border size 4
        moveq   #-1,d3          ; Timeout
        lea     neww,a1         ; -> New window
        trap    #3              ; Alter window
        tst.l   d0              ; OK? . .
        bne     error           ; . . no!

neww    dc.w    250,300         ; New size . .
        dc.w    10,20           ; . . and position
qdosmsq/traps/trap_3/defw.txt · Last modified: 2009/05/19 15:19 by george.gwilt