GARTHWILSON wrote:
The inverted carry makes perfect sense if you think about how the 65xx processors do subtraction (and a compare is just a subtraction that neither uses C as an input nor keeps the answer, only the flags). The process was described on the first page of this topic. When you do A minus B, it inverts all the bits of B and adds them, with carry, to A, using the same circuitry. If you don't add 1, the answer will be short by 1, and that's what happens if C was clear because of a previous instruction's result.[/color]
It is perfectly clear. Why have you repeated this? There is another thing which is unclear. The 6502 was probably the first processor which used the inverted carry after subtraction and comparison. So when Intel's, Zilog's, DEC's, Moto's people check the carry equality to zero, the 6502's people have to check the carry equality to 1. So Chuck broke a kind of concept. The time shows that he was right but we still don't know his motivation. I hoped that Bill Mensch can remember it.
You have written that in order to do a subtraction/comparison we need to invert the subtrahend but we can invert the carry in the same time. It costs us only several transistors more. It is too little, about 0.1% of the total transistor count. So I can assume that there might be other reasons for this breaking of the concept than this almost absent advantage.