;
;*****************************************************************************
;
;
;	Read Internal P89LPC938 EEPROM byte
;	Address bit 8 in r6, address bits 0-7 in r7
;	r6,r7 incremented by routine
;
;
ReadIntEEPROM:
	mov	DEECON,r6	;eeprom address (xxxxxxx8)
	mov	DEEADR,r7	;eeprom address (7:0)
RMc:	mov	a,DEECON
	jnb	acc.7,RMc	;poll for "EE read done"
	inc	r7
	mov	a,r7
	jnz	RIMx
	mov	r6,#1
RIMx:	mov	a,DEEDAT	;Put EEPROM data byte into Acc
	ret
;
;
;
;*****************************************************************************