• Converting unsigned char[] to long?
    How can you access the individual bytes making up a variable of type long? What I need to do is move a 24-bit (3 bytes) unsigned char array into a long variable. An example: unsigned char a[3]; unsigned...
  • difference between short and char
    Hi all, What is the difference between the data types char and short? According to the book, they are both 8 bits and have the exact same range. Thanks, Steve
  • Unsigned short subtraction
    I don't know what the ANSI/ISO C standard says about this, but I would expect the if block in the example below to be executed when a is 0 and b is 65535: /* a and b are unsigned short (16 bits)...
  • No error when converting unsigned char to pointer?
    I just noticed that my Keil C compiler doesn't flag assignment of an unsigned char to a pointer as an error: unsigned char xdata *src; unsigned char xdata array[10]; src = array[0]; This doesn...
  • Compile char as an unsigned char
    Hello, Can anyone tell me how to instruct Keil to compile char's as unsigned char's by default? I know that there are some help topics on this issue, but they seem to be giving a precompiler...