qdosmsq:pe:rpxl

Differences

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

Link to this comparison view

qdosmsq:pe:rpxl [2011/02/18 16:46] (current)
george.gwilt created
Line 1: Line 1:
 +====== IOP.RPXL ======
 +This trap reads a pixel colour.
 +^Call Parameters^^Return Parameters^^
 +|D0.B|$72|D0.L|Error return|
 +|D1.L|x,y coordinates|D1.L|New position/​colour|
 +|D2.L|Scan key/Scan colour|D2.L|Preserved|
 +|A0.L|Window Channel ID|A0.L|Preserved|
 +|A1.L|Unused|A1.L|Corrupted|
 +
 +==== Errors ====
 +|ERR_NI|Not mode 4 or 8|
 +|ERR_NO|Channel not open|
 +|ERR_OR|x,y not in window|
 +==== Notes ====
 +  * All registers not shown above are not used and are preserved.
 +  * This trap only works with mode 4 and 8 colours.
 +  * This trap finds the pixel colour either at the position given in D1.L or scanned from that position.
 +  * The pixel position in D1.L is relative to the window whose ID is in A0.L.
 +  * If the most significant bit of D2 is 0, then the colour of the pixel at position D1.L is returned in D1.W.
 +  * If bit 31 of D2.L is 1 then the window is scanned until a pixel is found which satisfies the rules given in the scan key in bits 16 to 19 of D2.L. The meanings of the scan key are given in a table below.
 +  * The scan takes place in one of the four directions, up, down, left and right and finishes when a pixel is found which meets the conditions relating to the initial colour. The initial colour is either that given in D2.W or the colour of the pixel at the position given in D1.L. If no such pixel meeting the conditions is found before the scan reaches an edge of the window, the upper word of D1 is set to -1. Otherwise the upper word of D1 contains the value of x or y where the pixel is found. The value is that of x when the scan is left or right and that of y otherwise.
 +==== Scan Key ====
 +^Bit^Meaning^
 +|19|1 -> scan until the same  : 0 -> scan until different|
 +|18/17|00 -> scan up : 01 -> scan down : 10 -> scan left : 11 -> scan right|
 +|16|1 -> Initial colour is that in D2.W : 0 -> initial colour is that of the first pixel|
 +
 +
  
  • qdosmsq/pe/rpxl.txt
  • Last modified: 2011/02/18 16:46
  • by george.gwilt