kumeemb
Junior Member level 3
- Joined
- Nov 12, 2006
- Messages
- 26
- Helped
- 1
- Reputation
- 2
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,502
Hi,
please look into this code
the value of data1 i expect is 0x000000A0, but when i execute the above code, it shows a value of 0xFFFFFFA0. I am not understanding why it should add 0xFFFFFF in previous byte.
I am using Keil IDE-Version: µVision3 V3.60 and C Compiler: C51.Exe V8.12
Can anyone tell me, if something is wrong ?
regards,
Kume
please look into this code
Code:
#include "REG52.h"
#include "intrins.h"
void main()
{
long int data1 = 0xFF000000;
char shift = 0xA0;
data1 = _lrol_(data1,8);
data1 = data1 & 0xFFFFFF00;
data1 = data1 + shift;
}
the value of data1 i expect is 0x000000A0, but when i execute the above code, it shows a value of 0xFFFFFFA0. I am not understanding why it should add 0xFFFFFF in previous byte.
I am using Keil IDE-Version: µVision3 V3.60 and C Compiler: C51.Exe V8.12
Can anyone tell me, if something is wrong ?
regards,
Kume