* HC11 EEPROM ERASE BYTE AND WRITE BYTE ROUTINES

E2BE	LDAB	#$16	;BYTE=1, ERASE=1, EELAT=1
	STAB	PPROG	
	STAB	0,X	;write operation to latch ;address
	LDAB	#$17	;make EEPGM=1
	STAB	PPROG	;start Vpp charge pump
	JSR	DLY10	;wait 10 ms
	CLR	PPROG	;stop Vpp and return to read ;mode
	RTS		;return to main program

E2W	LDAB	#$02	;BYTE=0, ERASE=0, EELAT=1
	STAB	PPROG	
	STAA	0,X	;write operation to latch the 
;address and data
	LDAB	#$03	;make EEPGM=1
	STAB	PPROG	;start Vpp charge pump
	JSR	DLY10	;wait 10 ms
	CLR	PPROG	;stop Vpp and return to read ;mode
	RTS		;return to main program
	END
