diff src/options.asm @ 647:357341239438

Merge
author heinrichs weikamp
date Thu, 14 Oct 2021 12:04:12 +0200
parents 5b7fe7777425
children 75e90cd0c2c3
line wrap: on
line diff
--- a/src/options.asm	Mon May 24 18:41:51 2021 +0200
+++ b/src/options.asm	Thu Oct 14 12:04:12 2021 +0200
@@ -422,13 +422,19 @@
 	retlw	.1								;       YES - option not found, abort
 
 option_write_serial_execute:
-	rcall	option_check_loaded				; check if new value is valid
-	btfss	option_value_ok					; value valid?
-	retlw	.2								; NO  - value not valid, abort
-	movff	hi,INDF1						; YES - take new value
-	btfss	opt_eeprom_bank,7				;     - volatile option?
-	bsf		option_changed					;       NO  - flag that EEPROM needs to be updated
-	retlw	.0								;     - done
+	rcall    option_check_loaded                ; check if new value is valid
+        btfss    option_value_ok                    ; value valid?
+        bra      option_write_serial_invalid        ; NO
+        movff    hi,INDF1                           ; YES - take new value
+        btfss    opt_eeprom_bank,7                  ;     - volatile option?
+        bsf        option_changed                   ;       NO  - flag that EEPROM needs to be updated
+        retlw    .0                                 ;     - done
+
+option_write_serial_invalid:
+	movlw    0x32                               ; load serial id of the language option (oLanguage)
+	cpfseq    lo                                ; option to write = language option ?
+	retlw    .2                                 ; NO  - value not valid, abort
+	retlw    .0                                 ; YES - value not valid, but silently ignore
 
 
 ;-----------------------------------------------------------------------------