# HG changeset patch
# User mh@mh-THINK
# Date 1406817375 -7200
# Node ID 8531f39eb70aa7e60a827533647ac2b3108fee87
# Parent  9883f30adf10f30f61efafca040b1590304ea66f
option_read and option_write eeprom banking

diff -r 9883f30adf10 -r 8531f39eb70a src/options.asm
--- a/src/options.asm	Thu Jul 31 11:40:48 2014 +0200
+++ b/src/options.asm	Thu Jul 31 16:36:15 2014 +0200
@@ -271,6 +271,8 @@
         addlw   LOW(eeprom_opt_backup)  ; Add offset
         movwf   EEADR
         movlw   HIGH(eeprom_opt_backup)
+        btfsc   STATUS,C                ; >256
+        addlw   .1                      ; Yes: +1
         movwf   EEADRH
 
         movf    opt_type,W              ; Option type is string ?
@@ -343,6 +345,8 @@
         addlw   LOW(eeprom_opt_backup)  ; Add offset
         movwf   EEADR
         movlw   HIGH(eeprom_opt_backup)
+        btfsc   STATUS,C                ; >256
+        addlw   .1                      ; Yes: +1
         movwf   EEADRH
 
         movf    opt_type,W              ; Option type is string ?