Dear Daniel:
About sprintf already I solved the problem using a simple code that convert Binary to BCD and then convert to ASCII so it let me free a lot of RAM memory.
With "non statics" I refer to variables declared in the same function that only are used when this function is working and then this espace of RAM is free for another variables.
When I need to keep the data in variables declared as local, I use "static" so I understand tha the space for this variable has to be in My_zero_page like Global variables. But I don't know why CW use My_zero_page to locate local/automatic variables.
I declare my variables like this:
For Global I use the same Header included in all my code files with the diference that I define Global in the Main and Extern in the other ones.
#if VariableGlobal
// --------- Global Variable Define ---------- //
#pragma DATA_SEG __SHORT_SEG _DATA_ZEROPAGE
unsigned char Output_SCI_Buffer [5] = 0;
unsigned char Input_SCI_Buffer [5] = 0;
unsigned char Input_Buffer = 0;
unsigned char Time_Base_Div1 = 5;
// and so on...
#pragma DATA_SEG DEFAULT
#endif
#if VariableExtern
// --------- Extern Variable Define ---------- //
#pragma DATA_SEG __SHORT_SEG _DATA_ZEROPAGE
extern unsigned char Output_SCI_Buffer [5];
extern unsigned char Input_SCI_Buffer [5];
extern unsigned char Input_Buffer;
extern unsigned char Time_Base_Div1;
// and so on...
#pragma DATA_SEG DEFAULT
#endif
For local variables:
static unsigned char My_Static_Variable = 0;
unsigned char My_Local_Variable = 1;
void My_Function (void)
{
My_Static_Variable = 1;
My_Local_Variable = 2;
}
This is my third program using CW and I had to learn about it for my self so maybe I'm wrong whit some thing.
Thank you for your interest in my problem.
Pablo