I have a number of lookup tabes to represent a number of plot points for a serial graphics controller. These plotting points are the center points of circles that are drawn. The center points are also in a circular formation. The x and y coordinates that are sent to the controller from the pic are each 2 bytes in length and each byte is sent seperately. In the example below lets say we want to plot 4 evenly spaced dots around a circle. The way I do it now is to lookup for position 0 for x1 (x byte 1), x2 (x byte 2), y1 (y byte 1), and then y2 (y byte 2), then the hole process again for positions 1, 2 and 3. I then send those byte hex values out the seriel pin and repeat. Is there a better way?


LOOKUP z, [$00, $00, $00, $01], x1
LOOKUP z, [$00, $33, $88, $FF], x2
LOOKUP z, [$00, $00, $01, $01], y1
LOOKUP z, [$00, $3C, $A1, $FF], y2
SEROUT gpioa.1, 2, [x1,x2,y1,y2]

Thanks