How do we initialize the XDATA memory with dummy data (e.g. 0xDEADBEEF)?
By default all the memory is initialized to 0x00 during debugging (in the IDE). When you burn your firmware on the controller, the memory holds random values. To be able to detect uninitialized variables, I'd like to initialize the XDATA memory space to a predefined (non-zero) value.
Note that I don't want to overwrite the global static variables (i.e. those that are rightly initialized to a value). E.g. static unsigned char foo = 0x00.
I guess what I want must be done in INIT.A51, prior to initializing the static variables. Any idea how? Samples welcomed!
Please read the instructions on how to post source code: www.danlhenry.com/.../keil_code.png
Note that TABs don't work (well) - use spaces instead,
and don't forget to check it in the 'Preview'...