comparison src/options.asm @ 646:5b7fe7777425

3.16 release
author heinrichs weikamp
date Thu, 14 Oct 2021 12:03:24 +0200
parents 4050675965ea
children 75e90cd0c2c3
comparison
equal deleted inserted replaced
642:a9a0188091e4 646:5b7fe7777425
420 incfsz opt_end_token,F ; NO - was this the last option (was opt_end_token = 255) ? 420 incfsz opt_end_token,F ; NO - was this the last option (was opt_end_token = 255) ?
421 bra option_write_serial_loop ; NO - try next option 421 bra option_write_serial_loop ; NO - try next option
422 retlw .1 ; YES - option not found, abort 422 retlw .1 ; YES - option not found, abort
423 423
424 option_write_serial_execute: 424 option_write_serial_execute:
425 rcall option_check_loaded ; check if new value is valid 425 rcall option_check_loaded ; check if new value is valid
426 btfss option_value_ok ; value valid? 426 btfss option_value_ok ; value valid?
427 retlw .2 ; NO - value not valid, abort 427 bra option_write_serial_invalid ; NO
428 movff hi,INDF1 ; YES - take new value 428 movff hi,INDF1 ; YES - take new value
429 btfss opt_eeprom_bank,7 ; - volatile option? 429 btfss opt_eeprom_bank,7 ; - volatile option?
430 bsf option_changed ; NO - flag that EEPROM needs to be updated 430 bsf option_changed ; NO - flag that EEPROM needs to be updated
431 retlw .0 ; - done 431 retlw .0 ; - done
432
433 option_write_serial_invalid:
434 movlw 0x32 ; load serial id of the language option (oLanguage)
435 cpfseq lo ; option to write = language option ?
436 retlw .2 ; NO - value not valid, abort
437 retlw .0 ; YES - value not valid, but silently ignore
432 438
433 439
434 ;----------------------------------------------------------------------------- 440 ;-----------------------------------------------------------------------------
435 ; Increment an Option Value based on Type and min/max Boundary 441 ; Increment an Option Value based on Type and min/max Boundary
436 ; 442 ;