This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DATA to XDATA issue

Hi people,

I've some troubles with some variables declaration.
I'm using the old Keil compîler C51 V5.50.

When writing :

U8 u8CommandIndex=0;
with U8 = unsigned char, it's ok.

Now I want to relocate the variable into the XDATA segment. The declaration becomes :
xdata U8 u8CommandIndex=0;
But in this case, my variable isn't initialized to 0. The value is the last one before the reset.

Why the initialization isn't done in this case ?

Regards
Stephane

Parents Reply Children
No data