Keith Burzinski wrote: > What's the quickest way to check if a number is negative? Can I > just test bit 7? Yes. > I just tried subtracting 0 from the register using 'subwf', but > that seems to _always_ leave the C flag set. Of course it does; SUBWF treats the two numbers as UNSIGNED (i.e., non-negative), so subtracting 0 always gives (as far as SUBWF is concerned) a non-negative result. > And if I add 0 using 'addwf', it always leaves the C flag clear. This happens because the ADDWF instruction only sets the carry flag if the result is greater than 255, and adding 0 to an 8-bit number can NEVER result in an answer that's greater than 255. > Will just tesing bit 7 of the reg always work? Yes. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499