• 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...
  • 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...
  • C51: 32 bits unsigned returned values treated as signed 16 bits
    Hi! In a full project a simple unsigned long ( u32 )returned value from a function lead to this (odd) assembler code. It make us think that the u32 is considered as s16 ( signed short ). If...
  • C51: 32 bits unsigned returned values treated as signed 16 bits
    Hi! In a full project a simple unsigned long ( u32 )returned value from a function lead to this (odd) assembler code. It make us think that the u32 is considered as s16 ( signed short ). If...
  • why get error "Type mismatch (arg. no. 1) (ptrs to signed/unsigned)"?
    ------------------------------------------- #define uchar unsigned char uchar xdata lcd_show_buf[20]; uchar num; num = 2; sprintf(lcd_show_buf, "%4d", num); ----------------------------...