Hi, I`m need to do something in assembler like the following pseudo code does: unsigned char a; // Byte holds value to be compared unsigned char state; // Byte holds kind of result const state_1 = 1; const state_2 = 2; ( ... ) case ((a < const1) AND (a > const2)) then state = state_1 else case ((a < const3) AND (a > const4)) then state = state_2 else case ((a < const5) AND (a > const64)) then state = state_3 default: state = err; The "<" and ">" could also be ">=" or "<=". The primary need is to check for "a" being within a range. Target Pic 16C84 Ideas ?