Eric Smith email (remove spam text)
> I need to check that a value, which will be a slightly variable code value,
> is between an upper and a lower threshold (or not).
Here's an excerpt from a "comparison" tip page I'm working on:
Testing that a value lies within a range
In this example, the value in the W register will be tested to determine
whether it lies within the range specified by the constants loval and hival
(inclusive). In other words, we're testing loval <= W <= hival.
It might seem that this would take six instructions (using the methods
previously described), but it can actually be done in four:
Of course, you can change the last two lines to:
In reply to: <m0tO078-00026hC@goonsquad.spies.com> (message from Steven Addison on Fri, 8 Dec 1995 10:39:42 +0000)
See also: www.piclist.com/techref/index.htm?key=negative+numbers
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the