
unsigned char rdeeprom(unsigned char xdata *ads)
{
	unsigned char c;
        EECON = 2;        	/* EEE */
        AUXR |= (1<<5);         /* MO */
	c = *ads;               /* needs no cast cos in signature */
	AUXR &= ~(1<<5);        /* MO = 0 */
        EECON = 0;		/* brute force */
        return c;
}

void wreeprom(unsigned char xdata *ads, unsigned char c)
{
	EECON = 2;        	/* EEE */
	*ads = c;               /* needs no cast cos in signature */
	EECON = 0x52;		/* SPECIAL SEQUENCE */
	EECON = 0xA2;           /* I had written wrong sequence */
	while (EECON & 1);      /* EEBUSY */
	EECON = 0;		/* brute force */
}

