Differences
This shows you the differences between two versions of the page.
— |
qdosmsq:pe:sptr [2009/02/11 15:54] (current) george.gwilt created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== IOP.SPTR ====== | ||
+ | This trap sets the pointer position. | ||
+ | ^Call Parameters^^Return Parameters^^ | ||
+ | | D0.B | $7B | D0.L | Error return | | ||
+ | | D1.L | x,y coordinates | D1.L | x,y coordinates| | ||
+ | | D2.W | Origin key | D2.L | Preserved | | ||
+ | | D3.W | Timeout | D3.L | Preserved | | ||
+ | | A0.L | Channel ID | A0.L | Preserved | | ||
+ | ==== Errors ==== | ||
+ | |ERR_NO|Channel not open| | ||
+ | |ER_OR| Out of range| | ||
+ | |||
+ | ==== Notes ==== | ||
+ | * All registers not mentioned above are preserved. | ||
+ | * The origin key in D2.W has the following effect: | ||
+ | * -1 sets the pointer relative to the current window definition. | ||
+ | * 0 sets the pointer to the absolute position in D1. | ||
+ | * 1 sets the pointer relative to the hit area. | ||
+ | * The position returned in D1 is in absolute coordinates. | ||
+ | ==== Example ==== | ||
+ | The example here shows the pointer set to the top left of the screen. It is assumed that on entry A4 points to the working definition. | ||
+ | |||
+ | < | ||
+ | movea.l | ||
+ | moveq #0,d1 ; Position 0,0 . . | ||
+ | moveq #9,d2 ; . . absolute | ||
+ | moveq # | ||
+ | trap #3 | ||
+ | tst.l d0 ; Errors? . . | ||
+ | bne err ----> | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||