ADC instruction


Could someone explain to me how ADC instruction works?


  • ADC is exactly like ADD, except that it add CF to the sum of the other two operands. It updates CF at the end of the operation like ADD to allow the addition of more ADCs. Example code demonstrating 96-bit addition on a 386+ processor:
    add ecx,edi
    adc ebx,esi
    adc eax,edx
    jc OverFlow
    Simple enough eh?

    Technically, though, there is really an AND mask in the instruction that is ANDed with CF and the result is added to the sum of the other two operands. The z80 and 6510 show this behavior as well.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion