UT_WINDW/OPW_WIND - Vector $C4
This vector opens a window.
Call Parameters | Return Parameters |
D0.L | Unused | D0.L | Error code. |
D1.L | Unused | D1.L | Corrupted. |
D2.L | Unused | D2.L | Corrupted. |
D3.L | Unused | D3.L | Corrupted. |
A0.L | Pointer to name | A0.L | Channel ID. |
A1.L | Pointer to parameter block | A1.L | Corrupted. |
A2.L | Unused | A2.L | Corrupted. |
A3.L | Unused | A3.L | Corrupted. |
Errors
ERR_BM | Bad name. |
ERR_OM | Out of memory. |
ERR_NO | Channel not opened. |
ERR_OR | Out of range |
Notes
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
Address | Size | Item |
$00 | Byte | Border colour |
$01 | Byte | Border size |
$02 | Byte | Paper/strip colour |
$03 | Byte | Ink colour |
Example
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