Marcel Kilgus wrote:


      C = 1   : Obvious

Obviously it's not that obvious. ;-)
It is true that the result of an addition with NEG(op) equals an
subtraction with op, but not when it comes to the flags. If you do a
direct subtraction you see that at the end there is no carry involved.

          -127 =   1000 0001      Destination
            +2 =   0000 0010      Source
                 0 1111 1110      Carry bits
            --------------
                   0111 1111

Marcel
As I said, it was due to my learning MC on a 6502 where the C *HAS* to be set before a SBC and the result with a C still set means no carry was required; the 650x series didn't have a subtractor, only an adder [AFAICS], and so it used the add negated method...I was working an example with my 650x manual open. Sawree

Reply via email to