QDOS Internals

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

User Tools

Site Tools



This vector opens a window.

Call ParametersReturn Parameters
D0.LUnused D0.LError code.
D1.LUnused D1.LCorrupted.
D2.LUnused D2.LCorrupted.
D3.LUnused D3.LCorrupted.
A0.LPointer to nameA0.LChannel ID.
A1.LPointer to parameter blockA1.LCorrupted.
A2.LUnused A2.LCorrupted.
A3.LUnused A3.LCorrupted.


ERR_BMBad name.
ERR_OMOut of memory.
ERR_NOChannel not opened.
ERR_OROut of range


  • All registers not shown above are not used on entry and are preserved on exit.
  • Must be called in user mode only.
  • A0.L points to the window's name. This is the usual 'con' or 'scr' followed by size and position.
  • A1.L points to a parameter block in the form given below.

Parameter Block

$00ByteBorder colour
$01ByteBorder size
$02BytePaper/strip colour
$03ByteInk colour


The example below shows the use of this vector to open a con channel.

name    dc.w    name_e-name-2   ; Length of name
        dc.b    "con_200x38a10x10"
name_e  ds.b    0
        ds.w    0               ; Align on a word boundary.

parb    dc.b    4,2,7,0         ; Green border size 2
                                ; Paper white, Ink black
Ope     lea     name,a0         ; Name
        lea     parb,a1         ; Parameter block
        movea.w UT_WINDW,a2     ; Vector address.
	jsr	(a2)		; Make the call
	bne.s	Error_handler	; Oops!

; Now the window is open with ID in A0.L
qdosmsq/vectors/wind.txt · Last modified: 2009/02/14 16:59 by george.gwilt