• Efficiently combining bytes into a long int
    Hi, I'm having problems assembling a set of 4 bytes into a long int. My approach has been this: ulong temp; temp = (temp << SHIFT_BYTE) | getByte(); temp = (temp << SHIFT_BYTE) | getByte();...
  • long int division
    I need a 100% accurate division of any tow 32 bit numbers. So I am using the following code and the (/) operator. However I notice that results are not accurate when the Den (denominator) is shorter...
  • ARM7 printf long long int
    Hi, my program does not do the expected things, printf a unsigned long long int. #include <aduc7026.h> #include"stdio.h" void RS232_init(void); int main (void) { unsigned long long int A; RS232_init...
  • compose a Long of two Ints
    Hello Forum, I want to compose two int variables, which contains the LSW and MSW, respective, into one unsigned long variable. The following code does the right thing: int lo, hi; unsigned long longvar;...
  • Access bytes of a long
    Does the C51 compiler provide a way to access the individual bytes of a long value? I can shift bits around to achieve this if I have to, but I'm looking for something faster and more efficient.