comparison src/options.asm @ 142:8531f39eb70a

option_read and option_write eeprom banking
author mh@mh-THINK
date Thu, 31 Jul 2014 16:36:15 +0200
parents e0b758865e91
children be997abd1f73
comparison
equal deleted inserted replaced
141:9883f30adf10 142:8531f39eb70a
269 269
270 movf opt_eeprom,W ; Compute backup address in EEPROM 270 movf opt_eeprom,W ; Compute backup address in EEPROM
271 addlw LOW(eeprom_opt_backup) ; Add offset 271 addlw LOW(eeprom_opt_backup) ; Add offset
272 movwf EEADR 272 movwf EEADR
273 movlw HIGH(eeprom_opt_backup) 273 movlw HIGH(eeprom_opt_backup)
274 btfsc STATUS,C ; >256
275 addlw .1 ; Yes: +1
274 movwf EEADRH 276 movwf EEADRH
275 277
276 movf opt_type,W ; Option type is string ? 278 movf opt_type,W ; Option type is string ?
277 xorlw 2 279 xorlw 2
278 bz option_save_string 280 bz option_save_string
341 343
342 movf opt_eeprom,W ; Compute backup address in EEPROM 344 movf opt_eeprom,W ; Compute backup address in EEPROM
343 addlw LOW(eeprom_opt_backup) ; Add offset 345 addlw LOW(eeprom_opt_backup) ; Add offset
344 movwf EEADR 346 movwf EEADR
345 movlw HIGH(eeprom_opt_backup) 347 movlw HIGH(eeprom_opt_backup)
348 btfsc STATUS,C ; >256
349 addlw .1 ; Yes: +1
346 movwf EEADRH 350 movwf EEADRH
347 351
348 movf opt_type,W ; Option type is string ? 352 movf opt_type,W ; Option type is string ?
349 xorlw 2 353 xorlw 2
350 bz option_restore_string 354 bz option_restore_string