ADC, SBB 

Adding and Subtracting in Multiple Registers:

Numbers larger than the register size on your processor can be added and subtracted with the ADC (Add with Carry) and SBB (Subtract with Borrow) instructions.

These instructions work as follows:
	ADC Dest, Source	; Dest = Dest + Source + Carry Flag
	SBB Dest, Source	; Dest = Dest - Source - Carry Flag

If the operations prior to an ADC or SBB instruction do not set the carry flag, these instructions are identical to ADD and SUB. While operating on large values in more than one register, ADD and SUB are used for the least significant part of the number and ADC or SBB for the most significant part.
The following example illustrates multiple-register addition and subtraction.

Use of ADC and SBB Instructionson the 8086 Processor

        .DATA
mem32   DWORD   316423
mem32a  DWORD   316423
mem32b  DWORD   156739
        .CODE
        .
        .
        .
; Addition
        mov     ax, 43981               ; Load immediate     43981
        sub     dx, dx                  ;   into DX:AX
        add     ax, WORD PTR mem32[0]   ; Add to both     + 316423
        adc     dx, WORD PTR mem32[2]   ;   memory words    ------
                                        ; Result in DX:AX   360404

; Subtraction
        mov     ax, WORD PTR mem32a[0]  ; Load mem32        316423
        mov     dx, WORD PTR mem32a[2]  ;   into DX:AX
        sub     ax, WORD PTR mem32b[0]  ; Subtract low    - 156739
        sbb     dx, WORD PTR mem32b[2]  ;   then high       ------
                                        ; Result in DX:AX   159684

Adding and Subtracting on 64 bit Operands:

This technique can also be used with 64-bit operands on the 80386/486 processors. For 32-bit registers on the 80386/486 processors, only two steps are necessary. If your program needs to be assembled for more than one processor, you can assemble the statements conditionally, as shown in this example:

Use of ADC and SBB Instructionson 80386/486 processors
        .DATA
mem32   DWORD   316423
mem32a  DWORD   316423
mem32b  DWORD   156739
p386    TEXTEQU (@Cpu AND 08h)
        .CODE
        .
        .
        .
; Addition
        IF      p386
        mov     eax, 43981  ; Load immediate
        add     eax, mem32  ; Result in EAX
        ELSE
        .
        .       ; do steps in previous example
        .
        ENDIF

; Subtraction
        IF      p386
        mov     eax, mem32a ; Load memory
        sub     eax, mem32b ; Result in EAX
        ELSE
        .
        .       ; do steps in previous example
        .
        ENDIF

Since the status of the carry flag affects the results of calculations with ADC and SBB, be sure to turn off the carry flag with the CLC (Clear Carry Flag) instruction or use ADD or SUB for the first calculation, when appropriate.