#define OUT_RS232 Drapeaux.Lcd=0;
#define OUT_LCD Drapeaux.Lcd=1;
unsigned char Entree[17]="1234567890123456";
unsigned char *valtxt;
struct chbits { // 8 flags
unsigned FrameErr:1;
unsigned Over:1;
unsigned Elligible:1;
unsigned Togle:1;
unsigned Blc:1;
unsigned standby:1;
unsigned Fill:1;
unsigned Lcd:1;
}Drapeaux ;
union
{ unsigned char Fanion;
struct chbits Drapeaux ;
} Flags;
void Write_Word_(unsigned int M,char Sign)
{
unsigned int i,k,l;
unsigned long M1;
valtxt=&Entree[0];
if (Sign>1) return;
if (Sign==0)
{ M1=M;
ultoa(M1,&Entree[0]);
}
else itoa(M,&Entree[0]);
if (Flags.Drapeaux.Fill)
{
k=strlen(Entree);
for (i=0;i<k;i++) Entree[4+Sign-i]=Entree[k-i-1];
for (i=0;i<(5+Sign-k);i++)
{if (Flags.Drapeaux.Blc) Entree[i]='0'; else Entree[i]=' ';}
}
Entree[5+Sign]=0;
#ifdef LCD2x16
if (Flags.Drapeaux.Lcd==1) LCD_PutRamString(valtxt); else k=PutStr_RS(valtxt);
#else
k=PutStr_RS(valtxt);
#endif
}