• comparing signed and unsigned variables
    In the following code:- char a = 0x80; unsigned char b = 0x80; if(a==0x80) printf("a==0x80\n"); if(b==0x80) printf("b==0x80\n"); The first printf isn't executed but the second is. Why is this...
  • EC166 and unsigned char/signed char
    Hi to all, I have in use the EC++ Compiler from Tasking and want to change my whole EC++ project to KEIL. I tried to compile some files with the KEIL EC166 but I always get the following error: ---...
  • cannot compare unsigned char with hexadecimal
    Cannot compare unsigned char with hexadecimal I have a code like that. The program won’t reach if condition when SBUF is 0xAA. if (SBUF==0xaa) { AA_flag=1; config[0]=170; }
  • why does strstr return a pointer to a signed char?
    Sorry for the basic question, but why does it not return a pointer to an unsigned char? I mean, I looked in K&R but it does explain the rational (as far as I could tell...) Thanks
  • [C51]Bug report: signed char divided by power of 2
    Bug fact: Following code cannot get right results. #include "SST89x5xxRD2.H" signed char x,y,z; void main() { x = -15; y = x / 4; z = x % 4; while(1); } y = -4 and z = -3, while y should...