Is any direct function is available for the complement of the char variable
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.