In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: Let's say you want to subtract $FF01 from $1000 First you would subtract the 1 from zero, and that would cause a underflow (carry clear). Then W would get loaded with $FF +1 (zero), so the final SUB would NOT cause a underflow, but it should. But having the SZ we skip the SUB leaving the carry clear to indicate the underflow and still get the right result. I have fixed the typo. Try this version... Bean. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=361053#m361109 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)