SlideShare a Scribd company logo
Chapter 3
Machine Language instruction format:
A machine language instruction format has one or more number of fields
associated with it.
The first field is called the opcode field, which indicate the type of
operation performed by the CPU. The second field is called as an operand field
which specifies the data on which the operation is to be performed.
The general format of 8086 instruction with different fields is as given below.
8086 Instructions arerepresented as binary numbers Instructions require
between 1 and 6 bytes.
Opcode byte
Addressing mode byte
low disp, addr, or data
high disp, addr, or data
low data
high data
This is the general instruction
format used by the majority of 2-operand instructions. Bytes 1 and 2 are divided
up into 6 fields:
opcode
d -direction (or s = sign extension)
w -word/byte
mod -mode
reg -register
r/m -register/memory
opcode field specifies the operation performed (mov, xchg,etc)
d (direction) field specifies the direction of data movement:
d = 1 data moves from operand specified by R/M field to operand specified by
REG field
d = 0 data moves from operand specified by REG field to operand specified by
R/M field
W (word/byte) specifies operand size
W = 1 data is word
W = 0 data is byte
The tables below show the operands chosen for each fields.
Addressing modes of 8086:
1. Immediate addressing mode:
An instruction in which 8-bit or 16-bit operand(data ) is specified in the
instruction, then the addressing mode of such instruction is known as
Immediate addressing mode.
Example:
MOV AX,67D3H
AX  67D3H
ADD AL,5CH
AL 5CH
- Immediate data can be 8-bit or 16-bit
Immediate data cannot be the destination
2. Register addressing mode
An instruction in which an operand(data) is specified in general purpose
registers, then the addressing mode is known as register addressing mode.
Example:
MOV AX,CX
AX  CX
MOV BL,DL
BL  DL
Both source and destination should be of the same size
Data is copied to destination, source value is retained
3. Direct addressing mode
-an instruction in which 16 bit effective address of an operand is specified
in the instruction, then the addressing mode of such instruction is known as
direct addressing mode.
Example:
MOV CL,[2000H]
CL  byte from memory location [10H x DS + 2000H]
MOV AX,[5000H]
AX  2 bytes from memory location [10H x DS + 5000H]
4. Register Indirect addressing mode
an instruction in which address of an operand is specified in pointer
register or in index register or in BX, then the addressing mode is known as
register indirect addressing mode.
Example:
MOV AX, [BX]
AX  [10H x DS + BX]
MOV CL,[SI]
CL  [10H x DS + SI]
5. Indexed addressing mode
an instruction in which the offset address of an operand is stored in index
registers (SI or DI) then the addressing mode of such instruction is known as
indexed addressing mode.
DS is the default segment for SI and DI.
For string instructions DS and ES are the default segments for SI and DI
resp.
this is a special case of register indirect addressing mode.
Example:
MOV AX,[SI]
AX  [10H x DS + SI]
6. Based Indexed addressing mode
an instruction in which the address of an operand is obtained by adding the
contents of base register (BX or BP) to the content of an index register (SI or DI)
The default segment register may be DS or ES
Example:
MOV AX, [BX][SI]
AX  [10H x DS + SI + BX]
7. Register relative addressing mode
an instruction in which the address of the operand is obtained by adding
the displacement (8-bit or 16 bit) with the contents of base registers or index
registers (BX, BP, SI, DI).
the default segment register is DS or ES
Example:
MOV AX, 50H[BX]
Ax  [10H x DS + 50H + BX]
8. Relative Based Indexed addressing mode
an instruction in which the address of the operand is obtained by adding
the displacement (8 bit or 16 bit) with the base registers(BX or BP) and index
registers (SI or DI) to the default segment.
Example:
MOV AX, 50H [BX][SI]
AX  [10H x DS + 50H + BX + SI]
Ad

More Related Content

What's hot (20)

8251 USART
8251 USART8251 USART
8251 USART
coolsdhanesh
 
Automata theory -RE to NFA-ε
Automata theory -RE to  NFA-εAutomata theory -RE to  NFA-ε
Automata theory -RE to NFA-ε
Akila Krishnamoorthy
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
karthiga selvaraju
 
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
sumitbardhan
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
RJ Mehul Gadhiya
 
Unit 1
Unit 1Unit 1
Unit 1
riyasekaran
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
Education Front
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Bilal Amjad
 
Microarchitecture
MicroarchitectureMicroarchitecture
Microarchitecture
meashi
 
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...
warda aziz
 
Assembly language (coal)
Assembly language (coal)Assembly language (coal)
Assembly language (coal)
Hareem Aslam
 
OS file systems
OS file systemsOS file systems
OS file systems
anand hd
 
Memory reference instruction
Memory reference instructionMemory reference instruction
Memory reference instruction
Sanjeev Patel
 
USB 3.0
USB 3.0USB 3.0
USB 3.0
Ali Habeeb
 
Stack and its usage in assembly language
Stack and its usage in assembly language Stack and its usage in assembly language
Stack and its usage in assembly language
Usman Bin Saad
 
Multi processor scheduling
Multi  processor schedulingMulti  processor scheduling
Multi processor scheduling
Shashank Kapoor
 
Pci,usb,scsi bus
Pci,usb,scsi busPci,usb,scsi bus
Pci,usb,scsi bus
Sherwin Rodrigues
 
1D Array in Assembly Language
1D Array in Assembly Language1D Array in Assembly Language
1D Array in Assembly Language
Javeria Yaqoob
 
Computer Architecture and organization ppt.
Computer Architecture and organization ppt.Computer Architecture and organization ppt.
Computer Architecture and organization ppt.
mali yogesh kumar
 
Point To Point Protocol
Point To Point ProtocolPoint To Point Protocol
Point To Point Protocol
Phan Vuong
 
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
sumitbardhan
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
RJ Mehul Gadhiya
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
Education Front
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Bilal Amjad
 
Microarchitecture
MicroarchitectureMicroarchitecture
Microarchitecture
meashi
 
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...
warda aziz
 
Assembly language (coal)
Assembly language (coal)Assembly language (coal)
Assembly language (coal)
Hareem Aslam
 
OS file systems
OS file systemsOS file systems
OS file systems
anand hd
 
Memory reference instruction
Memory reference instructionMemory reference instruction
Memory reference instruction
Sanjeev Patel
 
Stack and its usage in assembly language
Stack and its usage in assembly language Stack and its usage in assembly language
Stack and its usage in assembly language
Usman Bin Saad
 
Multi processor scheduling
Multi  processor schedulingMulti  processor scheduling
Multi processor scheduling
Shashank Kapoor
 
1D Array in Assembly Language
1D Array in Assembly Language1D Array in Assembly Language
1D Array in Assembly Language
Javeria Yaqoob
 
Computer Architecture and organization ppt.
Computer Architecture and organization ppt.Computer Architecture and organization ppt.
Computer Architecture and organization ppt.
mali yogesh kumar
 
Point To Point Protocol
Point To Point ProtocolPoint To Point Protocol
Point To Point Protocol
Phan Vuong
 

Similar to Notes 8086 instruction format (20)

Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
HarshitParkar6677
 
8086addressingmodes-200319141110.pdf
8086addressingmodes-200319141110.pdf8086addressingmodes-200319141110.pdf
8086addressingmodes-200319141110.pdf
TanmoyMondal89
 
8086 addressing modes
8086 addressing modes8086 addressing modes
8086 addressing modes
HarshitParkar6677
 
address5ng modes.pptx IS A GOOD MATERIAL
address5ng  modes.pptx IS A GOOD MATERIALaddress5ng  modes.pptx IS A GOOD MATERIAL
address5ng modes.pptx IS A GOOD MATERIAL
Drkoteswararaoseelam
 
Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086
sravanithonta79
 
1327 Addressing Modes Of 8086
1327 Addressing Modes Of 80861327 Addressing Modes Of 8086
1327 Addressing Modes Of 8086
techbed
 
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptxLecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
VikasMahor3
 
Chapter3.1 3-mikroprocessor
Chapter3.1 3-mikroprocessorChapter3.1 3-mikroprocessor
Chapter3.1 3-mikroprocessor
teknik komputer ui
 
Microprocessor Chapter3 hawassa Univetsi
Microprocessor Chapter3 hawassa UnivetsiMicroprocessor Chapter3 hawassa Univetsi
Microprocessor Chapter3 hawassa Univetsi
davpaulos49
 
Chapter 1 archietecture of 8086
Chapter 1 archietecture of 8086Chapter 1 archietecture of 8086
Chapter 1 archietecture of 8086
SHREEHARI WADAWADAGI
 
8086 instruction set (with simulator)
8086 instruction set (with simulator)8086 instruction set (with simulator)
8086 instruction set (with simulator)
Aswini Dharmaraj
 
02 Addressing Modes.pptx
02 Addressing Modes.pptx02 Addressing Modes.pptx
02 Addressing Modes.pptx
ssuser586772
 
Addressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessorAddressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessor
pal bhumit
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
talhashahid40
 
addressing-modes-of-8086-mr-binu-joy-2 (2).pptx
addressing-modes-of-8086-mr-binu-joy-2 (2).pptxaddressing-modes-of-8086-mr-binu-joy-2 (2).pptx
addressing-modes-of-8086-mr-binu-joy-2 (2).pptx
Dr.MUTHURAJ BOSE
 
Chapter 4 addressing mode in microprocessor.pptx
Chapter 4 addressing mode in microprocessor.pptxChapter 4 addressing mode in microprocessor.pptx
Chapter 4 addressing mode in microprocessor.pptx
Getnet Tigabie Askale -(GM)
 
instructionsetsofjdtufgmictfgfjh8086.pptx
instructionsetsofjdtufgmictfgfjh8086.pptxinstructionsetsofjdtufgmictfgfjh8086.pptx
instructionsetsofjdtufgmictfgfjh8086.pptx
zarinajinna7432
 
8086 add mod
8086 add mod8086 add mod
8086 add mod
Mohansonale1
 
Module 2 instruction set
Module 2 instruction set Module 2 instruction set
Module 2 instruction set
Deepak John
 
Adressing modes of 8086
Adressing modes of 8086Adressing modes of 8086
Adressing modes of 8086
KANNANKR12
 
8086addressingmodes-200319141110.pdf
8086addressingmodes-200319141110.pdf8086addressingmodes-200319141110.pdf
8086addressingmodes-200319141110.pdf
TanmoyMondal89
 
address5ng modes.pptx IS A GOOD MATERIAL
address5ng  modes.pptx IS A GOOD MATERIALaddress5ng  modes.pptx IS A GOOD MATERIAL
address5ng modes.pptx IS A GOOD MATERIAL
Drkoteswararaoseelam
 
Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086
sravanithonta79
 
1327 Addressing Modes Of 8086
1327 Addressing Modes Of 80861327 Addressing Modes Of 8086
1327 Addressing Modes Of 8086
techbed
 
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptxLecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
VikasMahor3
 
Microprocessor Chapter3 hawassa Univetsi
Microprocessor Chapter3 hawassa UnivetsiMicroprocessor Chapter3 hawassa Univetsi
Microprocessor Chapter3 hawassa Univetsi
davpaulos49
 
8086 instruction set (with simulator)
8086 instruction set (with simulator)8086 instruction set (with simulator)
8086 instruction set (with simulator)
Aswini Dharmaraj
 
02 Addressing Modes.pptx
02 Addressing Modes.pptx02 Addressing Modes.pptx
02 Addressing Modes.pptx
ssuser586772
 
Addressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessorAddressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessor
pal bhumit
 
addressing-modes-of-8086-mr-binu-joy-2 (2).pptx
addressing-modes-of-8086-mr-binu-joy-2 (2).pptxaddressing-modes-of-8086-mr-binu-joy-2 (2).pptx
addressing-modes-of-8086-mr-binu-joy-2 (2).pptx
Dr.MUTHURAJ BOSE
 
Chapter 4 addressing mode in microprocessor.pptx
Chapter 4 addressing mode in microprocessor.pptxChapter 4 addressing mode in microprocessor.pptx
Chapter 4 addressing mode in microprocessor.pptx
Getnet Tigabie Askale -(GM)
 
instructionsetsofjdtufgmictfgfjh8086.pptx
instructionsetsofjdtufgmictfgfjh8086.pptxinstructionsetsofjdtufgmictfgfjh8086.pptx
instructionsetsofjdtufgmictfgfjh8086.pptx
zarinajinna7432
 
Module 2 instruction set
Module 2 instruction set Module 2 instruction set
Module 2 instruction set
Deepak John
 
Adressing modes of 8086
Adressing modes of 8086Adressing modes of 8086
Adressing modes of 8086
KANNANKR12
 
Ad

More from HarshitParkar6677 (20)

Wi fi hacking
Wi fi hackingWi fi hacking
Wi fi hacking
HarshitParkar6677
 
D dos attack
D dos attackD dos attack
D dos attack
HarshitParkar6677
 
Notes chapter 6
Notes chapter  6Notes chapter  6
Notes chapter 6
HarshitParkar6677
 
Interface notes
Interface notesInterface notes
Interface notes
HarshitParkar6677
 
Chapter6 2
Chapter6 2Chapter6 2
Chapter6 2
HarshitParkar6677
 
Chapter6
Chapter6Chapter6
Chapter6
HarshitParkar6677
 
8086 cpu 1
8086 cpu 18086 cpu 1
8086 cpu 1
HarshitParkar6677
 
Chapter 6 notes
Chapter 6 notesChapter 6 notes
Chapter 6 notes
HarshitParkar6677
 
Chapter 5 notes
Chapter 5 notesChapter 5 notes
Chapter 5 notes
HarshitParkar6677
 
Chap6 procedures & macros
Chap6 procedures & macrosChap6 procedures & macros
Chap6 procedures & macros
HarshitParkar6677
 
Chapter 5 notes new
Chapter 5 notes newChapter 5 notes new
Chapter 5 notes new
HarshitParkar6677
 
Notes arithmetic instructions
Notes arithmetic instructionsNotes arithmetic instructions
Notes arithmetic instructions
HarshitParkar6677
 
Notes all instructions
Notes all instructionsNotes all instructions
Notes all instructions
HarshitParkar6677
 
Notes aaa aa
Notes aaa aaNotes aaa aa
Notes aaa aa
HarshitParkar6677
 
Misc
MiscMisc
Misc
HarshitParkar6677
 
Copy of 8086inst logical
Copy of 8086inst logicalCopy of 8086inst logical
Copy of 8086inst logical
HarshitParkar6677
 
Copy of 8086inst logical
Copy of 8086inst logicalCopy of 8086inst logical
Copy of 8086inst logical
HarshitParkar6677
 
Chapter3 program flow control instructions
Chapter3 program flow control instructionsChapter3 program flow control instructions
Chapter3 program flow control instructions
HarshitParkar6677
 
Chapter3 8086inst stringsl
Chapter3 8086inst stringslChapter3 8086inst stringsl
Chapter3 8086inst stringsl
HarshitParkar6677
 
Chapter3 8086inst logical 2
Chapter3 8086inst logical 2Chapter3 8086inst logical 2
Chapter3 8086inst logical 2
HarshitParkar6677
 
Ad

Recently uploaded (20)

five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Journal of Soft Computing in Civil Engineering
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Journal of Soft Computing in Civil Engineering
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
Reagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptxReagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptx
AlejandroOdio
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
The Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLabThe Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLab
Journal of Soft Computing in Civil Engineering
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
Reagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptxReagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptx
AlejandroOdio
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 

Notes 8086 instruction format

  • 1. Chapter 3 Machine Language instruction format: A machine language instruction format has one or more number of fields associated with it. The first field is called the opcode field, which indicate the type of operation performed by the CPU. The second field is called as an operand field which specifies the data on which the operation is to be performed. The general format of 8086 instruction with different fields is as given below. 8086 Instructions arerepresented as binary numbers Instructions require between 1 and 6 bytes. Opcode byte Addressing mode byte low disp, addr, or data high disp, addr, or data low data high data This is the general instruction format used by the majority of 2-operand instructions. Bytes 1 and 2 are divided up into 6 fields: opcode d -direction (or s = sign extension) w -word/byte mod -mode reg -register r/m -register/memory opcode field specifies the operation performed (mov, xchg,etc) d (direction) field specifies the direction of data movement: d = 1 data moves from operand specified by R/M field to operand specified by REG field d = 0 data moves from operand specified by REG field to operand specified by R/M field W (word/byte) specifies operand size W = 1 data is word W = 0 data is byte The tables below show the operands chosen for each fields.
  • 2. Addressing modes of 8086: 1. Immediate addressing mode: An instruction in which 8-bit or 16-bit operand(data ) is specified in the instruction, then the addressing mode of such instruction is known as Immediate addressing mode. Example: MOV AX,67D3H AX  67D3H ADD AL,5CH AL 5CH - Immediate data can be 8-bit or 16-bit Immediate data cannot be the destination 2. Register addressing mode An instruction in which an operand(data) is specified in general purpose registers, then the addressing mode is known as register addressing mode. Example: MOV AX,CX AX  CX MOV BL,DL BL  DL Both source and destination should be of the same size Data is copied to destination, source value is retained 3. Direct addressing mode -an instruction in which 16 bit effective address of an operand is specified in the instruction, then the addressing mode of such instruction is known as direct addressing mode. Example: MOV CL,[2000H]
  • 3. CL  byte from memory location [10H x DS + 2000H] MOV AX,[5000H] AX  2 bytes from memory location [10H x DS + 5000H] 4. Register Indirect addressing mode an instruction in which address of an operand is specified in pointer register or in index register or in BX, then the addressing mode is known as register indirect addressing mode. Example: MOV AX, [BX] AX  [10H x DS + BX] MOV CL,[SI] CL  [10H x DS + SI] 5. Indexed addressing mode an instruction in which the offset address of an operand is stored in index registers (SI or DI) then the addressing mode of such instruction is known as indexed addressing mode. DS is the default segment for SI and DI. For string instructions DS and ES are the default segments for SI and DI resp. this is a special case of register indirect addressing mode. Example: MOV AX,[SI] AX  [10H x DS + SI] 6. Based Indexed addressing mode an instruction in which the address of an operand is obtained by adding the contents of base register (BX or BP) to the content of an index register (SI or DI) The default segment register may be DS or ES Example: MOV AX, [BX][SI] AX  [10H x DS + SI + BX] 7. Register relative addressing mode an instruction in which the address of the operand is obtained by adding the displacement (8-bit or 16 bit) with the contents of base registers or index registers (BX, BP, SI, DI). the default segment register is DS or ES Example: MOV AX, 50H[BX] Ax  [10H x DS + 50H + BX] 8. Relative Based Indexed addressing mode an instruction in which the address of the operand is obtained by adding the displacement (8 bit or 16 bit) with the base registers(BX or BP) and index registers (SI or DI) to the default segment. Example: MOV AX, 50H [BX][SI] AX  [10H x DS + 50H + BX + SI]