I am designing for the MC9S12E128. I am working with the input and ouput port of PORTA.
I have a variable that is 2 bytes. In C, how do I perform a complement on both bytes of the variable?
XResult = ~XResult only complements the byte in memory at the higher address.
I need to complement the byte in the lower memory address as well.
XResult is an unsigned int.