8051 - Keil -find the size of the integer value

Status
Not open for further replies.

thannara123

Advanced Member level 5
Joined
Jan 7, 2010
Messages
1,580
Helped
122
Reputation
244
Reaction score
114
Trophy points
1,353
Location
India
Activity points
10,394
I want to know the size ( width of the bit ) of unsigned integer value in 8051 using keil compiler C51 .
their site give as 16 bit https://www.keil.com/support/man/docs/c51/c51_le_datatypes.htm

If yes ,
How to check it in keil simulator . is there any way to see that int value .
My real question is If it is 16 bit How to manipulate ? ( How to extract it to 8 bit because the ort is 8 bit )
.
 

Try this

Code:
unsigned int size = 0;
unsigned int myInt = 0

void main() {

     size = sizeof(myInt);

}
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…