We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
sir in my program xdata initialize strating address from 0x20.These external data equalize to some other variable. The example is
unsigned char xdata Dis_data[54] _at_ 0x0200; M_data = xdata (0x200);
is it possible
- If you want to initialize the data as well as give it a fixed memory location: C51 unfortunately does not allow use of both _at_ keyword and a C initializer with the same variable. Use the linker directives to locate your variable.
- If you want another variable to have the same values; Initialize them both the same way. Initializers in C are constants, not executable code, so you cannot write a static declaration such as "U8 myVar = myOtherVar;" Alternatively, you might do the initialization of the second table at runtime, with either assignment or memcpy().
- If you want two names for the same variable; Why? But if you must, consider a #define for the alias.