8086 - Instruction Set
8086 - Instruction Set
8086 - Instruction Set
in
8086 Microprocessor
8086 Microprocessor
Instruction Set
2. Arithmetic Instructions
3. Logical Instructions
2
8086 Microprocessor
Instruction Set
3
8086 Microprocessor
Instruction Set
4
8086 Microprocessor
Instruction Set
:روش اول
MOV [OPR1], BL
MOV [OPR2], AL
:روش دوم
5
8086 Microprocessor
Instruction Set
7
8086 Microprocessor
Instruction Set
بهData_In بایت داده از بلوک مبدا به آدرس شروع6 زیربرنامه انتقال:2 مثال
. Copy بلوک مقصد به آدرس شروع
MOV CX, 6
INC SI
INC DI
DEC CX
JNZ Again
8
8086 Microprocessor
Instruction Set
2. Arithmetic Instructions
Mnemonics: ADD, ADC, SUB, SBB, INC, DEC, MUL, DIV, CMP…
ADD A, data
9
8086 Microprocessor
Instruction Set
:روش اول
:روش دوم
10
8086 Microprocessor
Instruction Set
2. Arithmetic Instructions
Mnemonics: ADD, ADC, SUB, SBB, INC, DEC, MUL, DIV, CMP…
ADDC A, data
11
8086 Microprocessor
Instruction Set
. Data_In بایت داده موجود در حافظه به آدرس شروع5 زیربرنامه جمع:4 مثال
JNZ Again
MOV [SUM], AL
12
8086 Microprocessor
Instruction Set
مثال :5زیربرنامه جمع دو عملوند 32بیتی موجود در خانه هایی از حافظه به
آدرس های شروع OPR1و OPR2و نیز ذخیره سازی در خانه هایی از حافظه به
آدرس شروع .SUM
13
8086 Microprocessor
Instruction Set
2. Arithmetic Instructions
Mnemonics: ADD, ADC, SUB, SBB, INC, DEC, MUL, DIV, CMP…
SUB A, data
14
8086 Microprocessor
Instruction Set
2. Arithmetic Instructions
Mnemonics: ADD, ADC, SUB, SBB, INC, DEC, MUL, DIV, CMP…
SBB A, data
15
8086 Microprocessor
Instruction Set
2. Arithmetic Instructions
Mnemonics: ADD, ADC, SUB, SBB, INC, DEC, MUL, DIV, CMP…
16
8086 Microprocessor
Instruction Set
2. Arithmetic Instructions
Mnemonics: ADD, ADC, SUB, SBB, INC, DEC, MUL, DIV, CMP…
17
8086 Microprocessor
Instruction Set
MOV AL, 2
MUL [A]
MOV BX, AX
MOV AL, 5
MUL [C]
SUB BX, AX
ADD BX, 7
MOV [D], BX
18
8086 Microprocessor
Instruction Set
19
8086 Microprocessor
Instruction Set
2. Arithmetic Instructions
Mnemonics: ADD, ADC, SUB, SBB, INC, DEC, MUL, DIV, CMP…
20
8086 Microprocessor
Instruction Set
2. Arithmetic Instructions
Mnemonics: ADD, ADC, SUB, SBB, INC, DEC, MUL, DIV, CMP…
21
8086 Microprocessor
Instruction Set
2. Arithmetic Instructions
Mnemonics: ADD, ADC, SUB, SBB, INC, DEC, MUL, DIV, CMP…
22
8086 Microprocessor
Instruction Set
2. Arithmetic Instructions
Mnemonics: ADD, ADC, SUB, SBB, INC, DEC, MUL, DIV, CMP…
23
8086 Microprocessor
Instruction Set
2. Arithmetic Instructions
Mnemonics: ADD, ADC, SUB, SBB, INC, DEC, MUL, DIV, CMP…
CMP A, data
24
8086 Microprocessor
Instruction Set
3. Logical Instructions
Mnemonics: AND, OR, XOR, TEST, SHR, SHL, RCR, RCL …
25
8086 Microprocessor
Instruction Set
3. Logical Instructions
Mnemonics: AND, OR, XOR, TEST, SHR, SHL, RCR, RCL …
26
8086 Microprocessor
Instruction Set
3. Logical Instructions
Mnemonics: AND, OR, XOR, TEST, SHR, SHL, RCR, RCL …
27
8086 Microprocessor
Instruction Set
3. Logical Instructions
Mnemonics: AND, OR, XOR, TEST, SHR, SHL, RCR, RCL …
28
8086 Microprocessor
Instruction Set
3. Logical Instructions
Mnemonics: AND, OR, XOR, TEST, SHR, SHL, RCR, RCL …
29
8086 Microprocessor
Instruction Set
3. Logical Instructions
Mnemonics: AND, OR, XOR, TEST, SHR, SHL, RCR, RCL …
30
8086 Microprocessor
Instruction Set
31
8086 Microprocessor
Instruction Set
3. Logical Instructions
Mnemonics: AND, OR, XOR, TEST, SHR, SHL, RCR, RCL …
32
8086 Microprocessor
Instruction Set
3. Logical Instructions
Mnemonics: AND, OR, XOR, TEST, SHR, SHL, RCR, RCL …
33
8086 Microprocessor
Instruction Set
34
8086 Microprocessor
Instruction Set
بیتی موجود در8 زیربرنامه شبیه سازی پرچم توازن برای یک عملوند:11 مثال
. DATA خانه ای در حافظه به آدرس
MOV DL, 8
MOV BL, 0
JNC NEXT
INC BL
NEXT: DEC DL
JNZ Again
35
8086 Microprocessor
Instruction Set
تمرین :2زیربرنامه شبیه سازی پرچم توازن برای یک عملوند 16بیتی موجود در
خانه هایی در حافظه به آدرس های DATAو . DATA+1
36
8086 Microprocessor
Instruction Set
37
8086 Microprocessor
Instruction Set
REP
38
8086 Microprocessor
Instruction Set
MOVS
(MAE) (MA)
39
8086 Microprocessor
Instruction Set
CLD
REP MOVSB
40
8086 Microprocessor
Instruction Set
CMPS
41
8086 Microprocessor
Instruction Set
CLD
MOV CX, 6
REPE CMPSB
JZ Equal
Not_Equal: …
Equal: …
42
8086 Microprocessor
Instruction Set
CLD
MOV CX, 4
REPNE SCASB
JE Find
Not_Find: …
Find: …
44
8086 Microprocessor
Instruction Set
LODS
45
8086 Microprocessor
Instruction Set
STOS
46
8086 Microprocessor
Instruction Set
47
8086 Microprocessor
Instruction Set
CLC Clear CF 0
NOP No operation
Mnemonics Explanation
CALL reg/ mem/ disp16 Call subroutine
49
8086 Microprocessor
Instruction Set
Checks flags.
50
8086 Microprocessor
Instruction Set
Mnemonics Explanation
JC disp8 Jump if CF = 1
JP disp8 Jump if PF = 1
JO disp8 Jump if OF = 1
JS disp8 Jump if SF = 1
52
8086 Microprocessor
Instruction Set
MOV AX, 0
MOV BX, 0
L1: INC BX
JA EXIT
ADD AX, BX
JMP L1
53
8086 Microprocessor
Instruction Set
MOV DX, 0
MOV BL, 1
JG EXIT
MOV AL, BL
MUL BL
ADD DX, AX
INC BL
CMP L2