#define _XTAL_FREQ 4000000 
volatile int x;
extern unsigned char __resetbits;
extern bit __powerdown;
extern bit __timeout;

void main(void)
{

    if(__powerdown == 1)
    {
        x=0x05;
        x++;
    }
    else
        x=0x01;

    if(__timeout == 1)
    {
        x=0x09;
        x++;
    }
    else 
        x=0x02;

    if(__resetbits == 1)
    {
        x=0x06;
        x++;
    }
    else 
        x=0x03;
    __delay_ms(18); 
}