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

Link to this comparison view

qdosmsq:traps:trap_3:spix [2009/05/17 15:05]
george.gwilt created
qdosmsq:traps:trap_3:spix [2011/02/12 11:39] (current)
george.gwilt Expand on when ERR_OR will occur
Line 1: Line 1:
 +====== SD_PIXP/IOW_SPIX ======
 +This trap sets the cursor position by pixel.
 +^Call Parameters^^Return Parameters^^
 +|D0.B|$17|D0.L|Error return.|
 +|D1.W|X-coordinate |D1.L|Corrupted.|
 +|D2.W|Y-coordinate |D2.L|Preserved.|
 +|A0.L|Channel ID |A0.L|Preserved.|
 +|A1.L| |A1.L|Corrupted.|
 +===== Errors =====
 +|ERR_NC|Not complete.|
 +|ERR_NO|Channel not open.|
 +|ERR_OR|Out of window.|
 +===== Notes =====
 +  * All registers not shown above are not used on entry and are preserved on exit.
 +  * The cursor is positioned by reference to the coordinates given in D1.W and D2.W. These are relative to top left of the window, which is at 0,0.
 +  * A pending newline is cancelled.
 +  * If an error is returned the cursor is not moved.
 +  * The cursor must be placed so that there is enough room in the window to print a character at the current size set by sd_setsz. Thus for the standard size, the cursor cannot be set closer than six pixels from the end of a line and no closer than ten pixels from the bottom of the window, otherwise the error ERR_OR is signalled.
 +===== Example =====
 +The example below shows the use of this trap call to set the cursor inside the first character position. It is assumed that A0 contains the window's ID.
 +setp    moveq   #sd_pixp,d0     ; $17
 +        moveq   #4,d1           ; X-position
 +        moveq   #2,d2           ; Y-position
 +        moveq   #-1,d3          ; Timeout
 +        trap    #3              ; Set the cursor position
 +        tst.l   d0              ; OK? . .
 +        bne     error           ; . . no!
  • qdosmsq/traps/trap_3/spix.txt
  • Last modified: 2011/02/12 11:39
  • by george.gwilt