Peter L. Peres wrote: > On pics carry is cleared on carry or borrow. Therefore carry will be reset > after an add or substract that caused a msb carry or borrow. Or, if that's too hard to remember, just think of the Carry flag after a subtraction as a "non-negative" flag. After a subtract, Carry will be set if the result is positive or zero, and will be clear if the result is negative. E.g., A-B, where A is greater than or equal to B: Carry is set to 1 A-B, where A is less than B: Carry is cleared to 0 -Andy P.S. Sorry I haven't been very active on the list; I really prefer only to respond to HTML messages that have been converted to PDF format, Base-64 encoded, PGP-signed, and MIME-encapsulated using the ISO646 character set... And there just haven't been many of those posted lately. === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.