In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote: Hi Keith, in your post, you did not mention where execution should go when the variable lies between one of the ranges you have specified, i.e. if the variable would be 110, for example. Without "gaps" between the ranges, the following code might be an alternative: [code] mov w, Value sub w, #81 sc jmp CaseA sub w, #25 sc jmp CaseB sub w, #50 sc jmp CaseC sub w, #50 sc jmp CaseD CaseE ;... CaseA ;... CaseB ;... CaseC ;... CaseD ;... [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=300334#m300443 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)