SlideShare a Scribd company logo
Akhila P Das
Asst. Professor
Department of Electronics & Communication
Aryanet Institute of Technology
 Most instructions have 2 operands-
destination & source
eg: MOV AX,BX
 Both cannot be memory operands
 Certain instructions have only 1 operand
eg: DIV BX
 Instructions with no operands
eg: CLC
ECE,Aryanet Institute of Technology 2
 Data transfer instructions
 Arithmetic instructions
 Logical instructions
 String manipulating instructions
 Control transfer instructions
 Processor control instructions
ECE,Aryanet Institute of Technology 3
 Transfer data/address into registers, memory
locations and I/O ports
 Generally involve 2 operands: source &
destination, both of which should be of same
size
 MOV AX, 1504h
 MOV [1504], AX
 MOV AX, [1504]
 Both source and destination cannot be
memory locations
ECE,Aryanet Institute of Technology 4
 Used to perform addition, subtraction,
multiplication & division.
 The source and destination operand should
be of same size except for division.
 Performing arithmetic operation directly on 2
memory data is not possible.
 Arithmetic instructions alter the flags of
8086.
 Flags reflect the status of result.
ECE,Aryanet Institute of Technology 5
 Result is stored in destination register or
memory except in case of CMP (compare)
instruction
 CMP AX,BX: AX-BX is performed and used to alter
the CF. Result is then discarded.
 If AX>BX, CF=0 else CF=1
 ADD AX,BX
 ADC CX,[1500]
 SUB CX,0145h
 MUL BX
 DIV [1600]
 NEG AX: replaces AX with 2’s complement
ECE,Aryanet Institute of Technology 6
 Used for performing AND, OR, XOR,
complement, shift and rotate operations.
 Alters flags.
 AND AX,BX
 OR CX,[1290]
 XOR [1300],DX
 TEST CX,DX: contents are ANDed and result is
used to modify flags, but register contents
remain unaltered.
 NOT AX: I’s complement
ECE,Aryanet Institute of Technology 7
 SHL/SAL AX, 1 SHR AX,1
 SHL/SAL AX, CL SHR AX,CL
 SAR AX, 1: MSB is retained
 CF contains last bit shifted out
 ROR AX, 1: LSB is moved to both CF and MSB
 RCR AX,1: LSB moved to CF and CF moved to
MSB
 Similarly ROL & RCL
ECE,Aryanet Institute of Technology 8
ECE,Aryanet Institute of Technology 9
 A string is a sequence of bytes or words
 Instructions end with SB or SW
 Alters flags
 All instructions have implied source and
destination operand
 MOVS & CMPS : source is in data segment
memory & destination is in extra segment
memory
 STOS & SCAS: source is AX and destination is
in extra segment memory
 LODS: source is in data segment memory and
destination is AX
ECE,Aryanet Institute of Technology 10
 Offset of source operand is stored in SI and that
of destination is stored in DI.
 On execution of string instructions SI & DI are
automatically updated to point to next word or
byte, based on DF
 If DF=0, incremented by 1 for byte and
incremented by 2 for word(16 bits)
 If DF=1, decremented by 1 for byte and
decremented by 2 for word
 Eg: MOVSB : 1 byte of data in data segment
(address in SI) is copied to extra segment
(address in DI). SI & DI are incremented/
decremented by 1 depending on DF
ECE,Aryanet Institute of Technology 11
 Consists of call, jump, loop and software
interrupt instructions.
 Normally a program is executed sequentially.
 When a branch instruction is encountered
the program execution control is transferred
to target instruction.
 If IP alone is modified, target instruction is in
same segment
 If IP & CS are modified, target instruction is
in another segment
 Do not affect flags.
ECE,Aryanet Institute of Technology 12
 Eg: CALL BX
 SP decremented by 2
 IP pushed to stack
 Content of BX is loaded in IP
 RET
 Content of top of stack is transferred to IP
 SP is incremented by 2
ECE,Aryanet Institute of Technology 13
 Includes instructions to set or clear CF, DF
and IF.
 It also includes HLT, NOP, LOCK and ESC
instructions which controls the processor
operation
 CLC: clears CF
 STC: sets CF
 HLT: terminate a program
 WAIT: enters idle state until 𝑇𝐸𝑆𝑇 pin goes
low
ECE,Aryanet Institute of Technology 14

More Related Content

What's hot

Instruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorInstruction Set of 8086 Microprocessor
Instruction Set of 8086 Microprocessor
Ashita Agrawal
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly languageMir Majid
 
Direct memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA ControllerDirect memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA Controller
Muhammed Afsal Villan
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
Gopikrishna Madanan
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor Mustapha Fatty
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
PriyangaKR1
 
8086 Instruction set
8086 Instruction set8086 Instruction set
8086 Instruction set
karthiga selvaraju
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
Dr. AISHWARYA N
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
saurav kumar
 
Instruction set of 8085
Instruction set of 8085Instruction set of 8085
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controllerTech_MX
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
Poojith Chowdhary
 
Instruction set of 8086 Microprocessor
Instruction set of 8086 Microprocessor Instruction set of 8086 Microprocessor
Instruction set of 8086 Microprocessor
Velalar College of Engineering and Technology
 
8086 instruction set
8086 instruction set8086 instruction set
8086 instruction set
Sazzad Hossain
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
Vijay Kumar
 
3 jump, loop and call instructions
3 jump, loop and call instructions3 jump, loop and call instructions
3 jump, loop and call instructions
Channabasappa Kudarihal
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
Mahalakshmiv11
 
Chapter 1 microprocessor introduction
Chapter 1 microprocessor introductionChapter 1 microprocessor introduction
Chapter 1 microprocessor introduction
Shubham Singh
 
8085 instruction set
8085 instruction set8085 instruction set

What's hot (20)

Instruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorInstruction Set of 8086 Microprocessor
Instruction Set of 8086 Microprocessor
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly language
 
Direct memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA ControllerDirect memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA Controller
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 
8086 Instruction set
8086 Instruction set8086 Instruction set
8086 Instruction set
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
Instruction set of 8085
Instruction set of 8085Instruction set of 8085
Instruction set of 8085
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controller
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
 
Instruction set of 8086 Microprocessor
Instruction set of 8086 Microprocessor Instruction set of 8086 Microprocessor
Instruction set of 8086 Microprocessor
 
8086 instruction set
8086 instruction set8086 instruction set
8086 instruction set
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
8086
80868086
8086
 
3 jump, loop and call instructions
3 jump, loop and call instructions3 jump, loop and call instructions
3 jump, loop and call instructions
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
 
Chapter 1 microprocessor introduction
Chapter 1 microprocessor introductionChapter 1 microprocessor introduction
Chapter 1 microprocessor introduction
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 

Similar to Instruction set of 8086

Chap 3_2.ppt
Chap 3_2.pptChap 3_2.ppt
Chap 3_2.ppt
inian2
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
Bathshebaparimala
 
Instruction set
Instruction setInstruction set
Instruction set
Kamini Benare
 
Instructionsetof8086 180224060745(3)
Instructionsetof8086 180224060745(3)Instructionsetof8086 180224060745(3)
Instructionsetof8086 180224060745(3)
AmitPaliwal20
 
instruction-set-of-8086-mr-binu-joy3.ppt
instruction-set-of-8086-mr-binu-joy3.pptinstruction-set-of-8086-mr-binu-joy3.ppt
instruction-set-of-8086-mr-binu-joy3.ppt
ssuser2b759d
 
Assembly language.pptx
Assembly language.pptxAssembly language.pptx
Assembly language.pptx
ShaistaRiaz4
 
Instruction set-of-8086
Instruction set-of-8086Instruction set-of-8086
Instruction set-of-8086
mudulin
 
Assembly language
Assembly languageAssembly language
Assembly language
Bathshebaparimala
 
Intrl 8086 instruction set
Intrl 8086 instruction setIntrl 8086 instruction set
Intrl 8086 instruction set
edwardkiwalabye1
 
8086 microprocessor assembler directives.ppt
8086   microprocessor assembler directives.ppt8086   microprocessor assembler directives.ppt
8086 microprocessor assembler directives.ppt
NaveenKumar5162
 
Unit 3 – assembly language programming
Unit 3 – assembly language programmingUnit 3 – assembly language programming
Unit 3 – assembly language programming
Kartik Sharma
 
Assembly Language Lecture 4
Assembly Language Lecture 4Assembly Language Lecture 4
Assembly Language Lecture 4
Motaz Saad
 
Reversing malware analysis training part4 assembly programming basics
Reversing malware analysis training part4 assembly programming basicsReversing malware analysis training part4 assembly programming basics
Reversing malware analysis training part4 assembly programming basics
Cysinfo Cyber Security Community
 
Unit 2 assembly language programming
Unit 2   assembly language programmingUnit 2   assembly language programming
Unit 2 assembly language programming
Kartik Sharma
 
8086-instruction sets.ppt
8086-instruction sets.ppt8086-instruction sets.ppt
8086-instruction sets.ppt
ShatrughanKumar14
 
Microprocessor.pptx
Microprocessor.pptxMicroprocessor.pptx
Microprocessor.pptx
NishatNishu5
 
Coal (1)
Coal (1)Coal (1)
Coal (1)
talhashahid40
 
system software 16 marks
system software 16 markssystem software 16 marks
system software 16 marks
vvcetit
 

Similar to Instruction set of 8086 (20)

Chap 3_2.ppt
Chap 3_2.pptChap 3_2.ppt
Chap 3_2.ppt
 
Lecture5
Lecture5Lecture5
Lecture5
 
Lecture5(1)
Lecture5(1)Lecture5(1)
Lecture5(1)
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
Instruction set
Instruction setInstruction set
Instruction set
 
Instructionsetof8086 180224060745(3)
Instructionsetof8086 180224060745(3)Instructionsetof8086 180224060745(3)
Instructionsetof8086 180224060745(3)
 
instruction-set-of-8086-mr-binu-joy3.ppt
instruction-set-of-8086-mr-binu-joy3.pptinstruction-set-of-8086-mr-binu-joy3.ppt
instruction-set-of-8086-mr-binu-joy3.ppt
 
Assembly language.pptx
Assembly language.pptxAssembly language.pptx
Assembly language.pptx
 
Instruction set-of-8086
Instruction set-of-8086Instruction set-of-8086
Instruction set-of-8086
 
Assembly language
Assembly languageAssembly language
Assembly language
 
Intrl 8086 instruction set
Intrl 8086 instruction setIntrl 8086 instruction set
Intrl 8086 instruction set
 
8086 microprocessor assembler directives.ppt
8086   microprocessor assembler directives.ppt8086   microprocessor assembler directives.ppt
8086 microprocessor assembler directives.ppt
 
Unit 3 – assembly language programming
Unit 3 – assembly language programmingUnit 3 – assembly language programming
Unit 3 – assembly language programming
 
Assembly Language Lecture 4
Assembly Language Lecture 4Assembly Language Lecture 4
Assembly Language Lecture 4
 
Reversing malware analysis training part4 assembly programming basics
Reversing malware analysis training part4 assembly programming basicsReversing malware analysis training part4 assembly programming basics
Reversing malware analysis training part4 assembly programming basics
 
Unit 2 assembly language programming
Unit 2   assembly language programmingUnit 2   assembly language programming
Unit 2 assembly language programming
 
8086-instruction sets.ppt
8086-instruction sets.ppt8086-instruction sets.ppt
8086-instruction sets.ppt
 
Microprocessor.pptx
Microprocessor.pptxMicroprocessor.pptx
Microprocessor.pptx
 
Coal (1)
Coal (1)Coal (1)
Coal (1)
 
system software 16 marks
system software 16 markssystem software 16 marks
system software 16 marks
 

Recently uploaded

在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 

Instruction set of 8086

  • 1. Akhila P Das Asst. Professor Department of Electronics & Communication Aryanet Institute of Technology
  • 2.  Most instructions have 2 operands- destination & source eg: MOV AX,BX  Both cannot be memory operands  Certain instructions have only 1 operand eg: DIV BX  Instructions with no operands eg: CLC ECE,Aryanet Institute of Technology 2
  • 3.  Data transfer instructions  Arithmetic instructions  Logical instructions  String manipulating instructions  Control transfer instructions  Processor control instructions ECE,Aryanet Institute of Technology 3
  • 4.  Transfer data/address into registers, memory locations and I/O ports  Generally involve 2 operands: source & destination, both of which should be of same size  MOV AX, 1504h  MOV [1504], AX  MOV AX, [1504]  Both source and destination cannot be memory locations ECE,Aryanet Institute of Technology 4
  • 5.  Used to perform addition, subtraction, multiplication & division.  The source and destination operand should be of same size except for division.  Performing arithmetic operation directly on 2 memory data is not possible.  Arithmetic instructions alter the flags of 8086.  Flags reflect the status of result. ECE,Aryanet Institute of Technology 5
  • 6.  Result is stored in destination register or memory except in case of CMP (compare) instruction  CMP AX,BX: AX-BX is performed and used to alter the CF. Result is then discarded.  If AX>BX, CF=0 else CF=1  ADD AX,BX  ADC CX,[1500]  SUB CX,0145h  MUL BX  DIV [1600]  NEG AX: replaces AX with 2’s complement ECE,Aryanet Institute of Technology 6
  • 7.  Used for performing AND, OR, XOR, complement, shift and rotate operations.  Alters flags.  AND AX,BX  OR CX,[1290]  XOR [1300],DX  TEST CX,DX: contents are ANDed and result is used to modify flags, but register contents remain unaltered.  NOT AX: I’s complement ECE,Aryanet Institute of Technology 7
  • 8.  SHL/SAL AX, 1 SHR AX,1  SHL/SAL AX, CL SHR AX,CL  SAR AX, 1: MSB is retained  CF contains last bit shifted out  ROR AX, 1: LSB is moved to both CF and MSB  RCR AX,1: LSB moved to CF and CF moved to MSB  Similarly ROL & RCL ECE,Aryanet Institute of Technology 8
  • 10.  A string is a sequence of bytes or words  Instructions end with SB or SW  Alters flags  All instructions have implied source and destination operand  MOVS & CMPS : source is in data segment memory & destination is in extra segment memory  STOS & SCAS: source is AX and destination is in extra segment memory  LODS: source is in data segment memory and destination is AX ECE,Aryanet Institute of Technology 10
  • 11.  Offset of source operand is stored in SI and that of destination is stored in DI.  On execution of string instructions SI & DI are automatically updated to point to next word or byte, based on DF  If DF=0, incremented by 1 for byte and incremented by 2 for word(16 bits)  If DF=1, decremented by 1 for byte and decremented by 2 for word  Eg: MOVSB : 1 byte of data in data segment (address in SI) is copied to extra segment (address in DI). SI & DI are incremented/ decremented by 1 depending on DF ECE,Aryanet Institute of Technology 11
  • 12.  Consists of call, jump, loop and software interrupt instructions.  Normally a program is executed sequentially.  When a branch instruction is encountered the program execution control is transferred to target instruction.  If IP alone is modified, target instruction is in same segment  If IP & CS are modified, target instruction is in another segment  Do not affect flags. ECE,Aryanet Institute of Technology 12
  • 13.  Eg: CALL BX  SP decremented by 2  IP pushed to stack  Content of BX is loaded in IP  RET  Content of top of stack is transferred to IP  SP is incremented by 2 ECE,Aryanet Institute of Technology 13
  • 14.  Includes instructions to set or clear CF, DF and IF.  It also includes HLT, NOP, LOCK and ESC instructions which controls the processor operation  CLC: clears CF  STC: sets CF  HLT: terminate a program  WAIT: enters idle state until 𝑇𝐸𝑆𝑇 pin goes low ECE,Aryanet Institute of Technology 14