Professional Documents
Culture Documents
Instruction Set of 8086 Microprocessor PDF
Instruction Set of 8086 Microprocessor PDF
POPF none POPF Flags [SP + 1: SP]; Pop the top of the stack into the 16-
SP SP + 2 bit flag word
Table 3 8086 Arithmetic instructions set summary
Opcode Operand Mnemonics Symbolic Operation Comments
ADD destination, ADD SI, AX SI SI+AX Substitute the
source ADD [BX], CL [BX] [BX]+CH destination byte or word
ADD DI, 4000H DI DI+4000H with the sum of the
ADD MEMW, 4000H [0101H:0100H] source and destination
[0101H:0100H]+4000H operands. All flags are
updated.
ADC destination, ADC SI, AX SISI +AX+ CF Replace the destination
source byte or word with the
ADC [BX], CL BX] [BX]+CL+ CF sum of the source and
ADC DI, 4000H destination operands
DI DI+4000H+ CF
plus the carry. All flags
ADC MEMW, 4000H [0101H:0100H] are updated.
[0101H:0100H]+4000H +CF
SUB destination, SUB SI, AX SI SI-AX Substitute the
source destination byte or word
SUB [BX], CL [BX] [BX]-CL with the difference
SUB DI, 4000H DI DI-4000H between of destination
SUB MEMW, 8000H [0101H:0100H] operands & source
[0101H:0100H]-4000H operand. All flags are
updated.
SBB destination, SBB SI, AX SI SI-AX-CF Replace the destination
source SBB [BX], CL [BX] [BX]-CL-CF byte or word with the
SBB DI, 4000H DI DI-4000H-CF difference between of
SBB MEMW, 8000H [0101H:0100H] destination operands &
[0101H:0100H]-4000H-CF source operand plus the
carry. All flags are
updated.
INC destination INC CL CL CL +1 Increment by one or
INC WORD [DI] [DI+ 1:DI] [DI+1:DI]+1 Add one the byte or
INC MEMBS [0100H] [0100H]+1 word destination
operand. Store the result
in the destination
operand. All flags
except CF are updated.
DEC destination DEC CL CL CL -1 Subtract one from byte
or word destination
DEC WORD [DI] [DI+ 1:DI] [DI+1:DI]-1 operand. Store the result
DEC MEMB [0100H] [0100H]-1 in the destination
operand. All flags
except CF are updated.
NEG destination NEG AL AL 0 - AL Find the 2s complement
of the byte or word
NEG WORD [DI] [DI+ 1:DI] 0 -[DI+1:DI] destination operand. All
NEG MEMB [0100H] 0- [0100H] flags except CF are
updated.
CMP AL, BL AL-BL; update flags Subtract the byte or
CMP destination CMP [DI],BX [DI+1:DI]-BX; update flags word source operand
from the similar
CMP MEMW, 4000H [0101H:0100H]-4000H; update destination operand. The
flags operands remain
unchanged. All flags are
CMP DI,4000H DI-4000H; update flags updated.
Table 4 8086 Multiplication and division instructions set summary
CWD none CWD If AX < 8000H, then DX 0 It works as CBW but extends the sign of a
If AX > 7FFFH, then word dividend in AX into double word in
DX FFFFH DX:AX. Flags are not affected
Table 6 8086 Logical instructions set summary
Opcode Operand Mnemonics Symbolic Comments
Operation
NOT Destination NOT AX AX AX Complement all bits of the
byte or word operand;
NOT [SI] [SI] [ SI ] Flags are not affected.
LODS Source LODS MEMB ALDS:[MEMB]. Transfer a byte from the string element
If DF=0, MEMBMEMB+1. addressed by DS:MEMB to register AL.
If DF=1, MEMBMEMB-1. When DF=0, increment MEMB, else
decrement MEMB. Flags are not affected.