|
ADC -- Add with Carry
Opcode | Instruction | Clocks |
Description | Example |
14 ib | adcb imm8,al | 2 |
Add with carry immediate byte to AL | adcb $0x7f,%al |
15 iw | adcw imm16,ax | 2 |
Add with carry immediate word to AX | adcw $0x7fff,%ax |
15 id | adcl imm32,eax | 2 |
Add with carry immediate dword to EAX | adcl $0x7fffffff,%eax |
80 /2 ib | adcb imm8,r/m8 | 2/7 |
Add with carry immediate byte to r/m byte | adcb $0x7f,%dl
adcb $0x7f,(%ebx,1)
adcb $0x7f,m8(%ebx,1)
adcb $0x7f,m8(%ebx,%ebp,1) |
81 /2 iw | adcw imm16,r/m16 | 2/7 |
Add with carry immediate word to r/m word | adcw $0x7fff,%cx
adcw $0x7fff,(%ebx,1)
adcw $0x7fff,(%ebx,2)
adcw $0x7fff,(%ebx,%ebp,1) |
81 /2 id | adcl imm32,r/m32 | 2/7 |
Add with CF immediate dword to r/m dword | adcl $0x7fffffff,%ecx
adcl $0x7fffffff,(%ebx,2)
adcl $0x7fffffff,(%ebx,4)
adcl $0x7fffffff,(%ebx,%ebp,1) |
83 /2 ib | adcw imm8,r/m16 | 2/7 |
Add with CF sign-extended immediate byte to r/m word | adcw $0x7f,%cx
adcw $0x7f,(%ebx,1)
adcw $0x7f,(%ebx,2)
adcw $0x7f,(%ebx,%ebp,1) |
83 /2 ib | adcl imm8,r/m32 | 2/7 |
Add with CF sign-extended immediate byte into r/m dword | adcl $0x7f,%ecx
adcl $0x7f,(%ebx,2)
adcl $0x7f,(%ebx,4)
adcl $0x7f,(%ebx,%ebp,1) |
10 /r | adcb r8,r/m8 | 2/7 |
Add with carry byte register to r/m byte | adcb %bh,%dl
adcb %bh,(%ebx,1)
adcb %bh,m8(%ebx,1)
adcb %bh,m8(%ebx,%ebp,1) |
11 /r | adcw r16,r/m16 | 2/7 |
Add with carry word register to r/m word | adcw %bx,%cx
adcw %bx,(%ebx,1)
adcw %bx,(%ebx,2)
adcw %bx,(%ebx,%ebp,1) |
11 /r | adcl r32,r/m32 | 2/7 |
Add with CF dword register to r/m dword | adcl %ebx,%ecx
adcl %ebx,(%ebx,2)
adcl %ebx,(%ebx,4)
adcl %ebx,(%ebx,%ebp,1) |
12 /r | adcb r/m8,r8 | 2/6 |
Add with carry r/m byte to byte register | adcb %dl,%bh
adcb (%ebx,1),%bh
adcb m8(%ebx,1),%bh
adcb m8(%ebx,%ebp,1),%bh |
13 /r | adcw r/m16,r16 | 2/6 |
Add with carry r/m word to word register | adcw %cx,%bx
adcw (%ebx,1),%bx
adcw (%ebx,2),%bx
adcw (%ebx,%ebp,1),%bx |
13 /r | adcl r/m32,r32 | 2/6 |
Add with CF r/m dword to dword register | adcl %ecx,%ebx
adcl (%ebx,2),%ebx
adcl (%ebx,4),%ebx
adcl (%ebx,%ebp,1),%ebx |
Operation
DEST := DEST + SRC + CF;
Description
ADC performs an integer addition of the two operands DEST and SRC and the carry flag, CF. The result of the addition is assigned to the first operand (DEST), and the flags are set accordingly. ADC is usually executed as part of a multi-byte or multi-word addition operation. When an immediate byte value is added to a word or doubleword operand, the immediate value is first sign-extended to the size of the word or doubleword operand.
Flags Affected
OF, SF, ZF, AF, CF, and PF as described in Appendix C
Protected Mode Exceptions
#GP(0) if the result is in a nonwritable segment; #GP(0) for an illegal memory operand effective address in the CS, DS, ES, FS, or GS segments; #SS(0) for an illegal address in the SS segment; #PF(fault-code) if page fault
Real Address Mode Exceptions
Interrupt 13 if any part of the operand would lie outside of the effective address space from 0 to 0FFFFH
Virtual 8086 Mode Exceptions
Same exceptions as in Real Address Mode; #PF(fault-code) for a page fault
[Home Page dell'ITIS "Fermi"]
[80386 Programmer's Reference Manual Index]
[Previous]
[Next]
|