(xFirst - 255) * -1)
It looks like you are trying to invert the bits. You should probably use the bit inversion operator:
~xFirst
And since these are 8-bit registers, you should probably use 'byte' values rather than 'int'.
(xFirst - 255) * -1)
It looks like you are trying to invert the bits. You should probably use the bit inversion operator:
~xFirst
And since these are 8-bit registers, you should probably use 'byte' values rather than 'int'.