• 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...
  • 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...
  • Using unsigned with signed int
    I have a signed integer which I have to assign to an unsigned one after addition with unsigned one. Like int16_t x = -9; uint16_t y = 11; if(x < y) { y = y+x; } How to ensure that...
  • C array index, signed or unsigned
    Firstly, according to the C standard, is the C array index variable interpreted as a signed or unsigned integer? Secondly, what does Keil do?
  • 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: ---...