diff src/options.asm @ 110:d39493c786a2

BUGFIX: OSTC settings via USB issues
author heinrichsweikamp
date Tue, 10 Jun 2014 10:14:18 +0200
parents 223579e905c3
children f3062a611eef
line wrap: on
line diff
--- a/src/options.asm	Thu Jun 05 11:53:21 2014 +0200
+++ b/src/options.asm	Tue Jun 10 10:14:18 2014 +0200
@@ -170,6 +170,10 @@
         xorlw   2
         bz      option_check_string     ; String: Do not reset strings
 
+        movf    opt_type,W              ; Type == ENUM8 ?
+        xorlw   1
+        bz      option_check_enum8      ; ENUM8: Check if lower then max. value only
+
         movf    opt_min,W
         cpfsgt  INDF1                   ; bigger then opt_min?
         bra     option_check_reset      ; No, reset option
@@ -185,6 +189,12 @@
 option_check_string:
         return
 
+option_check_enum8:
+        movf    INDF1,W
+        cpfsgt  opt_max                 ; bigger then INDF1?
+        bra     option_check_reset      ; No, reset option
+        return                          ; in range, return
+
 ;=============================================================================
 ; Reset an option to its default value.
 ; INPUT:  FSR0 = option handle