qdosmsq:vectors:con

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

qdosmsq:vectors:con [2009/02/14 17:36] (current)
george.gwilt created
Line 1: Line 1:
 +====== 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|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_OM|Out of memory.|
 +|ERR_NO|Channel not open.|
 +|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.
 +  * The parameter block to which A1.L points has the form shown below.
 +
 +=== 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|
 +===== Example =====
 +The example below shows the use of this vector to open a window.
 +
 +<​code>​
 +
 +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
 +</​code>​
 +
  
  • qdosmsq/vectors/con.txt
  • Last modified: 2009/02/14 17:36
  • by george.gwilt