In SX Microcontrollers, SX/B Compiler and SX-Key Tool, davehein wrote: Joe, You could use the following code: myValue1 VAR Byte myValue2 VAR Byte diff VAR Byte myValue1=0 myValue2=0 DEC myValue2 diff = myValue2 - myValue1 IF diff >= 128 THEN 'some code ENDIF The MSB of diff will be set if myValue2 is less than myValue1. Dave ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=136064#m136135 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)