SlideShare a Scribd company logo
8086 Address Modes
The way in which an operand is specified is called the Address Mode.

Addressing Modes on the 8086
The x86 instructions use five different operand types: registers, constants, and three memory
addressing schemes. Each form is called an addressing mode. The x86 processors support
the register addressing mode,
the immediate addressing mode,
the direct addressing mode,
the indirect addressing mode,
the base plus index addressing mode,
the register relative addressing mode,
and the base relative plus index addressing mode.
Register operands are the easiest to understand. Consider the following forms of themov
instruction:
mov ax, ax
mov ax, bx
mov ax, cx
mov ax, dx
The first instruction accomplishes absolutely nothing. It copies the value from the axregister
back into the ax register. The remaining three instructions copy the value of bx, cx and dx into
ax. Note that the original values of bx, cx, and dx remain the same. The first operand (the
destination) is not limited to ax; you can move values to any of these registers.

Constants are also pretty easy to deal with. Consider the following instructions:
mov ax, 25
mov bx, 195
mov cx, 2056
mov dx, 1000

These instructions are all pretty straightforward; they load their respective registers with the
specified hexadecimal constant.
There are three addressing modes which deal with accessing data in memory. Theseaddressing
modes take the following forms:
mov ax, [1000]
mov ax, [bx]
mov ax, [1000+bx]
The first instruction above uses the direct addressing mode to load ax with the 16 bit value stored
in memory starting at location 1000 hex.
The mov ax, [bx] instruction loads ax from the memory location specified by the contents of the
bx register. This is an indirect addressing mode. Rather than using the value in bx, this
instruction accesses to the memory location whose address appears in bx.

Note that the following two instructions:
mov bx, 1000
mov ax, [bx]
are equivalent to the single instruction:
mov ax, [1000]
Of course, the second sequence is preferable. However, there are many cases where the use of
indirection is faster, shorter, and better.

Another addressing mode is the base plusindex addressing mode. An example of this memory
addressing mode is
mov ax, [1000+bx]
This instruction adds the contents of bx with 1000 to produce the address of the memory value to
fetch. This instruction is useful for accessing elements of arrays, records, and other data
structures.
8086
8086

More Related Content

Viewers also liked

CYP resume new 2015
CYP resume new 2015CYP resume new 2015
CYP resume new 2015Cristina Yu
 
Los Parques Educativos se llenan de Cultura
Los Parques Educativos se llenan de Cultura Los Parques Educativos se llenan de Cultura
Los Parques Educativos se llenan de Cultura
culturantioquia1
 
Planeación Bacorehuis
Planeación BacorehuisPlaneación Bacorehuis
Planeación Bacorehuis
Carlos Laurean
 
revista
revistarevista
Circo del Sol
Circo del SolCirco del Sol
Circo del Sol
Leo
 
The Bermuda Triangle
The Bermuda TriangleThe Bermuda Triangle
The Bermuda Triangle
Naitor5
 
Evaluation for social welfare service (2)
Evaluation for social welfare service (2)Evaluation for social welfare service (2)
Evaluation for social welfare service (2)
Suresh Murugan
 
Whitemont Services Offer FR
Whitemont Services Offer FRWhitemont Services Offer FR
Whitemont Services Offer FRDenis Pap
 
Generic conventions of magazines
Generic conventions of magazinesGeneric conventions of magazines
Generic conventions of magazinesmaddisonallin
 
Mapas conceptuales
Mapas conceptualesMapas conceptuales
Mapas conceptualesLuis M
 
Atmosphere On Tour - One Search
Atmosphere On Tour - One SearchAtmosphere On Tour - One Search
Atmosphere On Tour - One Search
Niklas Olsson
 
Competition Presentation (Secret)
Competition Presentation (Secret)Competition Presentation (Secret)
Competition Presentation (Secret)Lance Kimbro
 
Kimia unsur
Kimia unsurKimia unsur
Kimia unsur
ABRIAN123
 
ITWS 4310: Building and Consuming the Web of Data (Fall 2013)
ITWS 4310: Building and Consuming the Web of Data (Fall 2013)ITWS 4310: Building and Consuming the Web of Data (Fall 2013)
ITWS 4310: Building and Consuming the Web of Data (Fall 2013)
Rensselaer Polytechnic Institute
 
Solubilidadyconductividadelectricadelassales
SolubilidadyconductividadelectricadelassalesSolubilidadyconductividadelectricadelassales
Solubilidadyconductividadelectricadelassales
Arantza Al
 
10 Famous Landmarks Surrounded By Legends
10 Famous Landmarks Surrounded By Legends10 Famous Landmarks Surrounded By Legends
10 Famous Landmarks Surrounded By Legendsmazuelos
 

Viewers also liked (18)

CYP resume new 2015
CYP resume new 2015CYP resume new 2015
CYP resume new 2015
 
Los Parques Educativos se llenan de Cultura
Los Parques Educativos se llenan de Cultura Los Parques Educativos se llenan de Cultura
Los Parques Educativos se llenan de Cultura
 
Planeación Bacorehuis
Planeación BacorehuisPlaneación Bacorehuis
Planeación Bacorehuis
 
Planeación Tic
Planeación TicPlaneación Tic
Planeación Tic
 
revista
revistarevista
revista
 
Circo del Sol
Circo del SolCirco del Sol
Circo del Sol
 
The Bermuda Triangle
The Bermuda TriangleThe Bermuda Triangle
The Bermuda Triangle
 
Evaluation for social welfare service (2)
Evaluation for social welfare service (2)Evaluation for social welfare service (2)
Evaluation for social welfare service (2)
 
Whitemont Services Offer FR
Whitemont Services Offer FRWhitemont Services Offer FR
Whitemont Services Offer FR
 
Generic conventions of magazines
Generic conventions of magazinesGeneric conventions of magazines
Generic conventions of magazines
 
Mapas conceptuales
Mapas conceptualesMapas conceptuales
Mapas conceptuales
 
Atmosphere On Tour - One Search
Atmosphere On Tour - One SearchAtmosphere On Tour - One Search
Atmosphere On Tour - One Search
 
Sistemas de Entrada y Salida ( I/O)
Sistemas de Entrada y Salida ( I/O)Sistemas de Entrada y Salida ( I/O)
Sistemas de Entrada y Salida ( I/O)
 
Competition Presentation (Secret)
Competition Presentation (Secret)Competition Presentation (Secret)
Competition Presentation (Secret)
 
Kimia unsur
Kimia unsurKimia unsur
Kimia unsur
 
ITWS 4310: Building and Consuming the Web of Data (Fall 2013)
ITWS 4310: Building and Consuming the Web of Data (Fall 2013)ITWS 4310: Building and Consuming the Web of Data (Fall 2013)
ITWS 4310: Building and Consuming the Web of Data (Fall 2013)
 
Solubilidadyconductividadelectricadelassales
SolubilidadyconductividadelectricadelassalesSolubilidadyconductividadelectricadelassales
Solubilidadyconductividadelectricadelassales
 
10 Famous Landmarks Surrounded By Legends
10 Famous Landmarks Surrounded By Legends10 Famous Landmarks Surrounded By Legends
10 Famous Landmarks Surrounded By Legends
 

Similar to 8086

Lecture 11
Lecture 11Lecture 11
Lecture 11
talhashahid40
 
Addressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessorAddressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessor
pal bhumit
 
8086addressingmodes-200319141110.pdf
8086addressingmodes-200319141110.pdf8086addressingmodes-200319141110.pdf
8086addressingmodes-200319141110.pdf
TanmoyMondal89
 
8086 addressing modes
8086 addressing modes8086 addressing modes
8086 addressing modes
HarshitParkar6677
 
Notes 8086 instruction format
Notes 8086 instruction formatNotes 8086 instruction format
Notes 8086 instruction format
HarshitParkar6677
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Frankie Jones
 
lect 03- MIT Addressing Modes.pdf
lect 03- MIT Addressing Modes.pdflect 03- MIT Addressing Modes.pdf
lect 03- MIT Addressing Modes.pdf
AdeelAsghar36
 
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 3 programming concepts-ii
Chapter 3  programming concepts-iiChapter 3  programming concepts-ii
Chapter 3 programming concepts-ii
SHREEHARI WADAWADAGI
 
8086 add mod
8086 add mod8086 add mod
8086 add mod
Mohansonale1
 
All-addressing-modes of the 80386 /microprocessor.pptx
All-addressing-modes of the 80386 /microprocessor.pptxAll-addressing-modes of the 80386 /microprocessor.pptx
All-addressing-modes of the 80386 /microprocessor.pptx
VidyaAshokNemade
 
Adressing modes of 8086
Adressing modes of 8086Adressing modes of 8086
Adressing modes of 8086
KANNANKR12
 
Arrays and addressing modes
Arrays and addressing modesArrays and addressing modes
Arrays and addressing modes
Bilal Amjad
 
Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086
sravanithonta79
 
1.ADDRESSING MODES OF 8086.ppt
1.ADDRESSING MODES OF 8086.ppt1.ADDRESSING MODES OF 8086.ppt
1.ADDRESSING MODES OF 8086.ppt
yuvaraaj7
 
Addressing modes of 8086 - Binu Joy
Addressing modes of 8086 - Binu JoyAddressing modes of 8086 - Binu Joy
Addressing modes of 8086 - Binu Joy
Binu Joy
 
addressing-modes-of-8086-mr-binu-joy-2.pptx
addressing-modes-of-8086-mr-binu-joy-2.pptxaddressing-modes-of-8086-mr-binu-joy-2.pptx
addressing-modes-of-8086-mr-binu-joy-2.pptx
johnpragasam1
 
Intrl 8086 instruction set
Intrl 8086 instruction setIntrl 8086 instruction set
Intrl 8086 instruction set
edwardkiwalabye1
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
HarshitParkar6677
 
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
 

Similar to 8086 (20)

Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Addressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessorAddressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessor
 
8086addressingmodes-200319141110.pdf
8086addressingmodes-200319141110.pdf8086addressingmodes-200319141110.pdf
8086addressingmodes-200319141110.pdf
 
8086 addressing modes
8086 addressing modes8086 addressing modes
8086 addressing modes
 
Notes 8086 instruction format
Notes 8086 instruction formatNotes 8086 instruction format
Notes 8086 instruction format
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
 
lect 03- MIT Addressing Modes.pdf
lect 03- MIT Addressing Modes.pdflect 03- MIT Addressing Modes.pdf
lect 03- MIT Addressing Modes.pdf
 
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
 
Chapter 3 programming concepts-ii
Chapter 3  programming concepts-iiChapter 3  programming concepts-ii
Chapter 3 programming concepts-ii
 
8086 add mod
8086 add mod8086 add mod
8086 add mod
 
All-addressing-modes of the 80386 /microprocessor.pptx
All-addressing-modes of the 80386 /microprocessor.pptxAll-addressing-modes of the 80386 /microprocessor.pptx
All-addressing-modes of the 80386 /microprocessor.pptx
 
Adressing modes of 8086
Adressing modes of 8086Adressing modes of 8086
Adressing modes of 8086
 
Arrays and addressing modes
Arrays and addressing modesArrays and addressing modes
Arrays and addressing modes
 
Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086
 
1.ADDRESSING MODES OF 8086.ppt
1.ADDRESSING MODES OF 8086.ppt1.ADDRESSING MODES OF 8086.ppt
1.ADDRESSING MODES OF 8086.ppt
 
Addressing modes of 8086 - Binu Joy
Addressing modes of 8086 - Binu JoyAddressing modes of 8086 - Binu Joy
Addressing modes of 8086 - Binu Joy
 
addressing-modes-of-8086-mr-binu-joy-2.pptx
addressing-modes-of-8086-mr-binu-joy-2.pptxaddressing-modes-of-8086-mr-binu-joy-2.pptx
addressing-modes-of-8086-mr-binu-joy-2.pptx
 
Intrl 8086 instruction set
Intrl 8086 instruction setIntrl 8086 instruction set
Intrl 8086 instruction set
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
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
 

Recently uploaded

How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 

Recently uploaded (20)

How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 

8086

  • 1. 8086 Address Modes The way in which an operand is specified is called the Address Mode. Addressing Modes on the 8086 The x86 instructions use five different operand types: registers, constants, and three memory addressing schemes. Each form is called an addressing mode. The x86 processors support the register addressing mode, the immediate addressing mode, the direct addressing mode, the indirect addressing mode, the base plus index addressing mode, the register relative addressing mode, and the base relative plus index addressing mode. Register operands are the easiest to understand. Consider the following forms of themov instruction: mov ax, ax mov ax, bx mov ax, cx mov ax, dx The first instruction accomplishes absolutely nothing. It copies the value from the axregister back into the ax register. The remaining three instructions copy the value of bx, cx and dx into ax. Note that the original values of bx, cx, and dx remain the same. The first operand (the destination) is not limited to ax; you can move values to any of these registers. Constants are also pretty easy to deal with. Consider the following instructions: mov ax, 25
  • 2. mov bx, 195 mov cx, 2056 mov dx, 1000 These instructions are all pretty straightforward; they load their respective registers with the specified hexadecimal constant. There are three addressing modes which deal with accessing data in memory. Theseaddressing modes take the following forms: mov ax, [1000] mov ax, [bx] mov ax, [1000+bx] The first instruction above uses the direct addressing mode to load ax with the 16 bit value stored in memory starting at location 1000 hex. The mov ax, [bx] instruction loads ax from the memory location specified by the contents of the bx register. This is an indirect addressing mode. Rather than using the value in bx, this instruction accesses to the memory location whose address appears in bx. Note that the following two instructions: mov bx, 1000 mov ax, [bx] are equivalent to the single instruction: mov ax, [1000] Of course, the second sequence is preferable. However, there are many cases where the use of indirection is faster, shorter, and better. Another addressing mode is the base plusindex addressing mode. An example of this memory addressing mode is
  • 3. mov ax, [1000+bx] This instruction adds the contents of bx with 1000 to produce the address of the memory value to fetch. This instruction is useful for accessing elements of arrays, records, and other data structures.