Name: | »Get pixel« |
Line-A number: | $A002 |
Syntax: | See 'Bindings for get_pixel' |
Description: | This Line-A function obtains the colour register at the specified coordinates. |
Return value: | The function returns in d0 the colour register at the specified coordinates. |
Availability: | All TOS versions. |
See also: | Binding LINEA Put Pixel |
Pure-C: | int16_t get_pixel( int x, int y ); |
Assembler: | movem.l D0-D2/A0-A2,-(A7) ; Save registers move.l pParamblk,A0 ; Pointer parameter block LINEA move.l (12,A0),A1 ; Address of ptsin move.w x,(A1) ; X-coordinate in ptsin[0] move.w y,(2,A1) ; Y-coordinate in ptsin[1] dc.w $A002 ; Line-A opcode move.w D0,color ; d0 contains colour movem.l (A7)+,D0-D2/A0-A2 ; Restore registers |