UT_CON/OPW_CON and UT_SCR/OPW_SCR - Vectors $C6 and $C8
These vectors open windows.
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 | Unused | A0.L | |
A1.L | Pointer to parameter block. | A1.L | Corrupted. |
A2.L | Unused | A2.L | Corrupted. |
A3.L | Unused | A3.L | Corrupted. |
ERR_OM | Out of memory. |
ERR_NO | Channel not open. |
ERR_OR | Out of range. |
Parameter Block
Address | Size | Item |
$00 | byte | Border colour |
$01 | byte | Border width |
$02 | byte | Paper/strip colour |
$03 | byte | Ink colour |
$04 | word | Window width |
$06 | word | Window height |
$08 | word | X-origin |
$0A | word | Y-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