Instruction Set of 8086: Adc Add With Carry Flag
Instruction Set of 8086: Adc Add With Carry Flag
Instruction Set of 8086: Adc Add With Carry Flag
1. The first operand of an instruction is also the destination if there is a resulting value. Divide and
multiply instructions are common exceptions to this rule.
2. There can be at most one memory operand per instruction.
3. There can be at most one immediate operand per instruction.
4. Operands generally must be of the same size (i.e., byte or word).
5. Using a label is the same as using an immediate or constant value.
6. When BP is used in a memory reference, SS is assumed as the segment. Otherwise DS is
assumed.
7. While an instruction is executing, IP refers to the next instruction.
8. Many instructions are smaller if you use the appropriate registers (usually AX or AL).
9. In NASM, all labels are case sensitive but instruction and register names are not.
Terminology Used:
Instructions:
adc Add with carry flag
Syntax: adc dest, src
dest: memory or register
src: memory, register, or immediate
Action: dest = dest + src + CF
Flags Affected: OF, SF, ZF, AF, PF, CF
Notes: This instruction is used to perform 32-bit addition.
dec Decrement by 1
Syntax: dec op
op: register or memory
Action: op = op - 1
Flags Affected: OF, SF, ZF, AF, PF
inc Increment by 1
Syntax: inc op
op: register or memory
Action: op = op + 1
Flags Affected: OF, SF, ZF, AF, PF
All of the ?? suffixes can also be of the form n?? (e.g., jna for
jump if not above). See 8086 documentation for many more ?? conditions.
Note also that rel8 operand greatly limits conditional jump distance
(-127 to +128 bytes from IP). Use the jmp instruction in combination
with j?? to overcome this barrier.
nop No operation
Syntax: nop
Action: None
Flags Affected: None
or Bitwise logical OR
Syntax: or dest, src
dest: register or memory
src: register, memory, or immediate
Action: dest = dest | src
Flags Affected: OF=0, SF, ZF, AF=?, PF, CF=0