AnsweredAssumed Answered

Crazy function for local scope: help!

Question asked by ciccio unico on Sep 26, 2008
Latest reply on Sep 30, 2008 by ciccio unico
I use MC9S08LC36.
I have make a function defined in funcs.h :
void CaricoOre(unsigned char );

I use this function and I pass it a global var defined in ram.h with:

#ifdef _MAIN_C
   #define g_var
   #define g_var extern

g_var unsigned char ore;

My problem is: when I call My function, the var passed is 0 but insiede the function is random value!!
The screen shot: call function

Inside the function: