|
Re: [gbadev] Re: The carry flag
> > sub was infact a + ~b (and as we all know -b is (~b +1))
>
> You must mean that SBC was (A + ~B + C) = (A - B - 1 + C) = (A - B -
> borrow). SUB has to include the 1 adjustment or else its just *wrong* :-)
>
yes, I was taking about the old 6502 (history of the Arm being the
replacement for the 6502 in acorn computers)
(still it was sbc without the sub etc etc).
SUB is A + ~b + 1; SBC A+~b+C (RSB ~A + B + 1) etc
not Idea why anyone would consider that retarded, just different from the
Z80. (GB)
was a pain on the 6502 having to clear and set the carry flag b4 all add/sub
ops, thankfully the Arm has add/sub with carry/borrow in/out.
is there any reason to want to borrow carry, or carry borrow ?
|