2 ; 2002-06-22, Ullrich von Bassewitz
3 ; 2018-07-27, Greg King
5 ; Helper function for getpixel/setpixel. Load X/Y from arguments;
6 ; and, check if the co-ordinates are valid. Return carry clear if so.
9 .include "tgi-kernel.inc"
17 jsr tgi_popxy ; Pop X/Y into ptr1/ptr2
19 ; Are the co-ordinates out of range? First, check if any coord is negative.
21 txa ; (.X = ptr2+1 from tgi_popxy)
23 sec ; Return carry set if number is negative
24 bmi @L9 ; Bail out if negative
26 ; Check if X is larger than the maximum x coord. If so, bail out.
34 ; Check if Y is larger than the maximum y coord.