Professional Documents
Culture Documents
Instruction Set of 8086 Handouts
Instruction Set of 8086 Handouts
www.eazynotes.com
21-Nov-2010
www.eazynotes.com
Arithmetic Instructions
www.eazynotes.com
21-Nov-2010
www.eazynotes.com
PUSH Operand:
operand.
time.
POP Des:
E.g.:
MOV AL, BL
21-Nov-2010
www.eazynotes.com
21-Nov-2010
www.eazynotes.com
11/23/2010
register.
21-Nov-2010
www.eazynotes.com
www.eazynotes.com
21-Nov-2010
21-Nov-2010
www.eazynotes.com
10
LAHF:
It copies the lower byte of flag register to AH.
SAHF:
It copies the contents of AH to lower byte of flag register.
PUSHF:
POPF:
www.eazynotes.com
www.eazynotes.com
21-Nov-2010
21-Nov-2010
11
21-Nov-2010
www.eazynotes.com
12
11/23/2010
Arithmetic Instructions
Arithmetic Instructions
E.g.:
E.g.:
ADD DX, AX
ADC DX, AX
21-Nov-2010
www.eazynotes.com
13
21-Nov-2010
Arithmetic Instructions
www.eazynotes.com
Arithmetic Instructions
E.g.:
E.g.:
SUB DX, AX
SBB DX, AX
21-Nov-2010
www.eazynotes.com
15
21-Nov-2010
Arithmetic Instructions
www.eazynotes.com
16
Arithmetic Instructions
INC Src:
DEC Src:
location.
location.
CF is not effected.
CF is not effected.
E.g.: INC AX
E.g.: DEC AX
21-Nov-2010
14
www.eazynotes.com
17
21-Nov-2010
www.eazynotes.com
18
11/23/2010
Arithmetic Instructions
Arithmetic Instructions
www.eazynotes.com
19
21-Nov-2010
Arithmetic Instructions
www.eazynotes.com
20
Arithmetic Instructions
CMP Des, Src:
NEG Src:
location.
number.
time.
number.
21-Nov-2010
www.eazynotes.com
21
21-Nov-2010
Arithmetic Instructions
www.eazynotes.com
22
Arithmetic Instructions
MUL Src:
DIV Src:
DX : AX = AX * Src
AX = AL * Src
AL = quotient
IDIV Src:
IMUL Src:
21-Nov-2010
AH = remainder
23
21-Nov-2010
www.eazynotes.com
24
11/23/2010
Arithmetic Instructions
throughout AH.
DX : AX.
The conversion is done by extending the sign bit of AX
throughout DX.
21-Nov-2010
www.eazynotes.com
25
21-Nov-2010
www.eazynotes.com
26
NOT Src:
location.
time.
CF and OF become zero after the operation.
PF, SF and ZF are updated.
21-Nov-2010
www.eazynotes.com
27
21-Nov-2010
www.eazynotes.com
OR Des, Src:
location.
location.
time.
time.
21-Nov-2010
28
www.eazynotes.com
29
21-Nov-2010
www.eazynotes.com
30
11/23/2010
www.eazynotes.com
21-Nov-2010
www.eazynotes.com
21-Nov-2010
www.eazynotes.com
32
33
21-Nov-2010
www.eazynotes.com
34
execution of instruction.
CALL Des:
This instruction is used to call a subroutine or function
or procedure.
unconditional.
stack.
RET:
It returns the control from procedure to calling program.
Every CALL instruction should have a RET.
21-Nov-2010
www.eazynotes.com
35
21-Nov-2010
www.eazynotes.com
36
11/23/2010
JMP Des:
JA
Meaning
Jump Condition
Jump if Above
CF = 0 and ZF = 0
JAE
CF = 0
JB
Jump if Below
CF = 1
JBE
CF = 1 or ZF = 1
JC
Jump if Carry
CF = 1
JE
Jump if Equal
ZF = 1
JNC
CF = 0
JNE
ZF = 0
JNZ
ZF = 0
JPE
PF = 1
JPO
PF = 0
Jump if Zero
ZF = 1
JZ
21-Nov-2010
www.eazynotes.com
37
21-Nov-2010
www.eazynotes.com
38
String Instructions
CX register.
decremented.
ZF is checked whether to loop again or not.
21-Nov-2010
www.eazynotes.com
39
21-Nov-2010
String Instructions
www.eazynotes.com
40
String Instructions
another.
In this instruction, the source string is in Data Segment
SCAS String:
It scans a string.
destination index.
AX.
21-Nov-2010
www.eazynotes.com
41
21-Nov-2010
www.eazynotes.com
42
11/23/2010
String Instructions
REP (Repeat):
becomes zero.
21-Nov-2010
www.eazynotes.com
microprocessor attached.
43
21-Nov-2010
www.eazynotes.com
44
CLC:
It clears the carry flag to 0.
CLD:
It clears the direction flag to 0.
CMC:
21-Nov-2010
www.eazynotes.com
45
www.eazynotes.com
23-Nov-10
47
21-Nov-2010
www.eazynotes.com
46