diff code_part1/OSTC_code_asm_part1/menu_reset.asm @ 459:770456638c66

fix reset gas with non-initialised eeprom
author heinrichsweikamp
date Thu, 01 Sep 2011 14:39:44 +0200
parents a76c5a3e9e96
children 6ad9af3a5771
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/menu_reset.asm	Thu Sep 01 12:22:46 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/menu_reset.asm	Thu Sep 01 14:39:44 2011 +0200
@@ -437,8 +437,13 @@
 ; Write WREG:lo twice, w/o any type clearing, pre-incrementing EEADR
 reset_gas:
     movwf   lo
-    rcall   reset_eeprom_value      ; First pair
-    goto    reset_eeprom_value      ; Second pair.
+	incf	EEADR,F
+	movff	lo, EEDATA				; Lowbyte Default value
+	call	write_eeprom
+	incf	EEADR,F
+	movff	hi, EEDATA				; Highbyte default value
+	call    write_eeprom
+	return
 
 reset_customfunction:
     tblrd*+