qdosmsq:vectors:con

UT_CON/OPW_CON and UT_SCR/OPW_SCR - Vectors $C6 and $C8

These vectors open windows.

Call ParametersReturn Parameters
D0.LUnused D0.LError code.
D1.LUnused D1.LCorrupted.
D2.LUnused D2.LCorrupted.
D3.LUnused D3.LCorrupted.
A0.LUnused A0.L
A1.LPointer to parameter block.A1.LCorrupted.
A2.LUnused A2.LCorrupted.
A3.LUnused A3.LCorrupted.
ERR_OMOut of memory.
ERR_NOChannel not open.
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.
  • The parameter block to which A1.L points has the form shown below.

Parameter Block

AddressSizeItem
$00byteBorder colour
$01byteBorder width
$02bytePaper/strip colour
$03byteInk colour
$04wordWindow width
$06wordWindow height
$08wordX-origin
$0AwordY-origin

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

parb    dc.b    2               ; Red border . .
        dc.b    1               ; . . size 1
        dc.b    7               ; Paper/strip colour white
        dc.b    0               ; Ink black
        dc.w    200,30          ; Window size . .
        dc.w    10,10           ; . . and origin

Ope     lea     parb,a1         ; Point to parameter block        
        move.w  UT_SCR,a2       ; Vector address.        
	jsr	(a2)		; Make the call
	bne.s	Error_handler	; Oops!

; The channel ID is now in A0
  • qdosmsq/vectors/con.txt
  • Last modified: 2009/02/14 17:36
  • by george.gwilt