Hi Jim,
Hmmm, still having a bit of a problem. Got it to compile, but it
doesn't init the values. It blows up when enters into the for loop.
Here's the code:
void Initialize_variables(void);
//*************************
// init variables
//*************************
void Initialize_variables(void){
static int number[3] = {1,2,3};
volatile int a;
int i;
for (i = 0 ;i < 3 ;++i)
a = number[i];
}
if I use:
unsigned char number[3] = {1,2,3};
(without any code), then it fills below
the stack. If I put a bunch of the arrays
into the code, then the arrays will bump
into the machine registers, giving me a
read error.
Not sure how to make it put the arrays above
the stack. Anyhow, think the static is the one
I want, because I need to manipulate the arrays
from other functions.
Thanks,
tim