Hello ! By default, any C variables are cleared to zero on startup. However, I desired for some data that they are not be cleared on startup. How can I do this ? Thanks Michael
Can you use NOINIT ? Hello, may be you can use the NOINIT pragma as follows:
#define ELEMENTMAX 16 #pragma NOINIT unsigned char idata LOC_ARRAY [ELEMENTMAX]; #pragma INIT unsigned char idata LOC_SARRAY [ELEMENTMAX];
That seems to be a "big iron C" at least startup.a51 does not look for it. Erik
There's a line in your startup assembler file, that controls this: $SET (CLR_MEMORY = 1) If you have this set to 0 $SET (CLR_MEMORY = 0) your memory won't be cleared at startup. Holger