ia-32_instruction-set-ref_a-m

Produced a decimal carry the ah register decrements

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: set to 1 if there is a decimal borrow; otherwise, they are cleared to 0. The OF, SF, ZF, and PF flags are undefined. Vol. 2 3-25 INSTRUCTION SET REFERENCE, A-M Protected Mode Exceptions None. Real-Address Mode Exceptions None. Virtual-8086 Mode Exceptions None. Compatibility Mode Exceptions None. 64-Bit Mode Exceptions #UD If in 64-bit mode. 3-26 Vol. 2 INSTRUCTION SET REFERENCE, A-M ADC--Add with Carry Opcode 14 ib 15 iw 15 id REX.W + 15 id 80 /2 ib REX + 80 /2 ib 81 /2 iw 81 /2 id REX.W + 81 /2 id Instruction ADC AL, imm8 ADC AX, imm16 ADC EAX, imm32 ADC RAX, imm32 ADC r/m8, imm8 ADC r/m8*, imm8 ADC r/m16, imm16 ADC r/m32, imm32 ADC r/m64, imm32 ADC r/m16, imm8 ADC r/m32, imm8 ADC r/m64, imm8 ADC r/m8, r8 ADC r/m8*, r8* ADC r/m16, r16 ADC r/m32, r32 ADC r/m64, r64 ADC r8, r/m8 ADC r8*, r/m8* 64-Bit Mode Valid Valid Valid Valid Valid Valid Valid Valid Valid Compat/ Leg Mode Valid Valid Valid N.E. Valid N.E. Valid Valid N.E. Description Add with carry imm8 to AL. Add with carry imm16 to AX. Add with carry imm32 to EAX. Add with carry imm32 sign extended to 64-bits to RAX. Add with carry imm8 to r/m8. Add with carry imm8 to r/m8. Add with carry imm16 to r/m16. Add with CF imm32 to r/m32. Add with CF imm32 sign extended to 64-bits to r/m64. Add with CF sign-extended imm8 to r/m16. Add with CF sign-extended imm8 into r/m32. Add with CF sign-extended imm8 into r/m64. Add with carry byte register to r/m8. Add with carry byte register to r/m64. Add with carry r16 to r/m16. Add with CF r32 to r/m32. Add with CF r64 to r/m64. Add with carry r/m8 to byte register. Add with carry r/m64 to byte register. 83 /2 ib 83 /2 ib REX.W + 83 /2 ib 10 /r REX + 10 /r 11 /r 11 /r REX.W + 11 /r 12 /r REX + 12 /r Valid Valid Valid Valid Valid Valid Valid Valid Valid Valid Valid Valid N.E. Valid N.E. Valid Valid N.E. Valid N.E. Vol. 2 3-27 INSTRUCTION SET REFERENCE, A-M Opcode 13 /r 13 /r REX.W + 13 /r Instruction ADC r16, r/m16 ADC r32, r/m32 ADC r64, r/m64 64-Bit Mode Valid Valid Valid Compat/ Leg Mode Valid Valid N.E. Description Add with carry r/m16 to r16. Add with CF r/m32 to r32. Add with CF r/m64 to r64. NOTES: * In 64-bit mode, r/m8 can not be encoded to access the following byte registers if a REX prefix is used: AH, BH, CH, DH. Description Adds the destination operand (first operand), the source operand (second operand), and the carry (CF) flag and stores the result in the destination operand. The destination operand can be a register or a memory location; the source operand can be an immediate, a register, or a memory location. (However, two memory operands cannot be used in one instruction.) The state of the CF flag represents a carry from a previous addition. When an immediate value is used as an operand, it is signextended to the length of the destination operand format. The ADC instruction does not distinguish between signed or unsigned operands. Instead, the processor evaluates the result for both data types and sets the OF and CF flags to indicate a carry in...
View Full Document

This note was uploaded on 10/01/2013 for the course CPE 103 taught by Professor Watlins during the Winter '11 term at Mississippi State.

Ask a homework question - tutors are online