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
You need to include a copy of "startup.a51" in your project. Modify this so that it doesn't zero the appropriate memory area(s). Stefan
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
I'm sorry, I didn't notice you are using C166. I don't know anything about C166. Stefan