Is any direct function is available for the complement of the char variable
the OP mentioned "this is about a bit"
Maybe a function that copies a char to a bdata variable and then inverts each bit separately ? Might be fun.
Hm, maybe the OP can try this:
sbit ACC_0 = ACC^0; unsigned char getComplement(unsigned char input) { register unsigned char i = 8; ACC = input; do { ACC *= 2; ACC_0 = CY ? 0 : 1; } while(--i); return ACC; }
warning: the code above is strictly non-ansi and non-portable.