SlideShare a Scribd company logo
1 of 26
Download to read offline
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
Microprocessors and Interfaces: 2021-22
Lecture 5
8086 Addressing Modes and OP-Code
By Dr. Sanjay Vidhyadharan
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
2
1/30/2021
Types of Instructions
• Data Transfer Instructions
• Arithmetic Instructions
• Logical Instructions
• Branch and Program control Instructions
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
3
1/30/2021
Addressing Modes
Instruction = Opcode, Operand
Opcode/ Operation Field - the type of operation which
is to be performed by processor
Operand – the data on which the operation is going to
be performed
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
4
1/30/2021
Addressing Modes
• Register Addressing
• Immediate Addressing
• Direct Addressing
• Register Indirect Addressing
• Base-plus-index Addressing
• Register Relative Addressing
• Base relative -plus-indexed Addressing
• Scaled Indexed Addressing
These data-addressing modes are found with all versions of the
Intel microprocessor. except for the scaled-index-addressing
mode, found only in 80386 through Core2
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
5
1/30/2021
MOV Instruction
• MOV destination, source
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
6
1/30/2021
Data Transfer Instructions
• MOV DST, SRC
➢ Copies the content of source to destination
➢ No Flags Affected
➢ Size of source and destination must be the same
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
7
1/30/2021
Different MOV options
R ← M
M ← R
R ← R
M ← I
R ← I
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
8
1/30/2021
Addressing Modes
• Register Addressing
➢ MOV AX, BX
• Immediate Addressing
➢ MOV AX, 1420H
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
9
1/30/2021
Addressing Modes
• Direct Addressing
➢ MOV AX, [2340H]
• Register Indirect Addressing
➢ MOV AX, [BX]
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
10
1/30/2021
Addressing Modes
• Base-plus-index Addressing
➢ MOV AX, [BX+SI]
• Register Relative Addressing
➢ MOV AX, [BX+40]
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
11
1/30/2021
Addressing Modes
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
12
1/30/2021
Addressing Modes
• Base relative-plus-indexed Addressing
➢ MOV AX, [BX+SI+10]
• Scaled Indexed Addressing
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
Addressing Modes
• The microprocessor contains these 8-bit register names
used with register addressing: AH, AL, BH, BL, CH, CL,
DH, and DL.
• 16-bit register names: AX, BX, CX, DX, SP, BP, SI, and DI.
• In 80386 & above, extended 32-bit register names are:
EAX, EBX, ECX, EDX, ESP, EBP, EDI, and ESI.
• 64-bit mode register names are: RAX, RBX, RCX, RDX,
RSP, RBP, RDI, RSI, and R8 through R15.
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
• Important for instructions
If hexadecimal data begin with a letter, the assembler requires the
data start with a 0.
– to represent a hexadecimal F2, 0F2H is used
in assembly language
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
• The source register’s contents do not change.
• the destination register’s contents do change
• The contents of the destination register or destination memory
location change for all instructions except the CMP and TEST
instructions.
• The MOV BL, CL instruction does not affect the leftmost 8 bits of
register BX.
Important for instructions
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
16
1/30/2021
8086 Assembly Language to Machine language
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
17
1/30/2021
8086 Assembly Language to Machine language
OP Code
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
18
1/30/2021
8086 Assembly Language to Machine language
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
19
1/30/2021
8086 Assembly Language to Machine language
Byte 2 has 3 fields
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
20
1/30/2021
8086 Assembly Language to Machine language
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
21
8086 Assembly Language to Machine language
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
22
1/30/2021
MOD = 11 Register Mode
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
23
1/30/2021
MOD = 00 Memory operand with no displacement
MOV [BX],CL
- w = 0 because we are dealing with a byte
d = 0 because REG to R/M
- therefore first byte is (1000 1000) = 88H
- since no displacement,
- we can use MOD=00 REG=001 and R/M=111 = 0000 1111
= 0FH
result: 88 0F
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
24
1/30/2021
MOD = 10 Memory operand with 16 bits displacement
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
25
1/30/2021
MOD = 01 Memory operand with 8 bits displacement
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION26
Thankyou

More Related Content

Similar to MPI_Lec_5_microprocessor8086&periferal.pdf

unit IV ARM processor instruction set.ppt
unit IV ARM processor instruction set.pptunit IV ARM processor instruction set.ppt
unit IV ARM processor instruction set.ppt
inian2
 
3 embedded gr_ppapag_msp430_arch
3 embedded gr_ppapag_msp430_arch3 embedded gr_ppapag_msp430_arch
3 embedded gr_ppapag_msp430_arch
chandrika
 
Serial Data Communication
Serial Data CommunicationSerial Data Communication
Serial Data Communication
Desty Rahayu
 

Similar to MPI_Lec_5_microprocessor8086&periferal.pdf (20)

Unit 2 mpmc
Unit 2 mpmcUnit 2 mpmc
Unit 2 mpmc
 
8086_architecture.ppt
8086_architecture.ppt8086_architecture.ppt
8086_architecture.ppt
 
8086_architecture.ppt
8086_architecture.ppt8086_architecture.ppt
8086_architecture.ppt
 
8086_architecture.ppt
8086_architecture.ppt8086_architecture.ppt
8086_architecture.ppt
 
8086_architecture.ppt
8086_architecture.ppt8086_architecture.ppt
8086_architecture.ppt
 
Designing of Asynchronous Viterbi Decoder for Low Power Consumption using Han...
Designing of Asynchronous Viterbi Decoder for Low Power Consumption using Han...Designing of Asynchronous Viterbi Decoder for Low Power Consumption using Han...
Designing of Asynchronous Viterbi Decoder for Low Power Consumption using Han...
 
Microprocessor Motorola 68020
Microprocessor Motorola 68020Microprocessor Motorola 68020
Microprocessor Motorola 68020
 
Introduction to armv8 aarch64
Introduction to armv8 aarch64Introduction to armv8 aarch64
Introduction to armv8 aarch64
 
Unit 2.1. cpu
Unit 2.1. cpuUnit 2.1. cpu
Unit 2.1. cpu
 
Unit 1 MPMC
Unit 1 MPMCUnit 1 MPMC
Unit 1 MPMC
 
Wireless energy meter monitoring with automated tariff calculation
Wireless energy meter monitoring with automated tariff calculationWireless energy meter monitoring with automated tariff calculation
Wireless energy meter monitoring with automated tariff calculation
 
unit IV ARM processor instruction set.ppt
unit IV ARM processor instruction set.pptunit IV ARM processor instruction set.ppt
unit IV ARM processor instruction set.ppt
 
3 embedded gr_ppapag_msp430_arch
3 embedded gr_ppapag_msp430_arch3 embedded gr_ppapag_msp430_arch
3 embedded gr_ppapag_msp430_arch
 
Serial Data Communication
Serial Data CommunicationSerial Data Communication
Serial Data Communication
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC  COMPUTER  ORGANIZATION  AND  DESIGNBASIC  COMPUTER  ORGANIZATION  AND  DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGN
 
COA CHAPTER 5
COA CHAPTER 5COA CHAPTER 5
COA CHAPTER 5
 
Wireless fuel level sensor using rfid
Wireless fuel level sensor using rfidWireless fuel level sensor using rfid
Wireless fuel level sensor using rfid
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and Robotics
 
esp32_datasheet_en.pdf
esp32_datasheet_en.pdfesp32_datasheet_en.pdf
esp32_datasheet_en.pdf
 
Serial Data Communication
Serial Data CommunicationSerial Data Communication
Serial Data Communication
 

More from abdnazar2003

laplace transform 2 .pdf
laplace transform 2                  .pdflaplace transform 2                  .pdf
laplace transform 2 .pdf
abdnazar2003
 
laplace transform 1 .pdf
laplace transform 1                 .pdflaplace transform 1                 .pdf
laplace transform 1 .pdf
abdnazar2003
 
Lecture 2 Connecting LANs, Backbone Networks, and Virtual LANs.ppt
Lecture 2   Connecting LANs, Backbone Networks, and Virtual LANs.pptLecture 2   Connecting LANs, Backbone Networks, and Virtual LANs.ppt
Lecture 2 Connecting LANs, Backbone Networks, and Virtual LANs.ppt
abdnazar2003
 
Forouzan6e_ch06_PPTs_Accessible 2024.pptx
Forouzan6e_ch06_PPTs_Accessible 2024.pptxForouzan6e_ch06_PPTs_Accessible 2024.pptx
Forouzan6e_ch06_PPTs_Accessible 2024.pptx
abdnazar2003
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
abdnazar2003
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
abdnazar2003
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
abdnazar2003
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
abdnazar2003
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
abdnazar2003
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
abdnazar2003
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
abdnazar2003
 

More from abdnazar2003 (20)

laplace transform 2 .pdf
laplace transform 2                  .pdflaplace transform 2                  .pdf
laplace transform 2 .pdf
 
laplace transform 1 .pdf
laplace transform 1                 .pdflaplace transform 1                 .pdf
laplace transform 1 .pdf
 
Lecture 4 .pdf
Lecture 4                              .pdfLecture 4                              .pdf
Lecture 4 .pdf
 
Lecture 3 .pdf
Lecture   3                         .pdfLecture   3                         .pdf
Lecture 3 .pdf
 
Lecture 2 .pptx
Lecture 2                            .pptxLecture 2                            .pptx
Lecture 2 .pptx
 
Lecture 2 .pdf
Lecture 2                           .pdfLecture 2                           .pdf
Lecture 2 .pdf
 
Lecture 1 .pptx
Lecture 1                            .pptxLecture 1                            .pptx
Lecture 1 .pptx
 
LEC3 t.pdf
LEC3                               t.pdfLEC3                               t.pdf
LEC3 t.pdf
 
LEC2 j.pdf
LEC2                               j.pdfLEC2                               j.pdf
LEC2 j.pdf
 
LEC1 h.pdf
LEC1                               h.pdfLEC1                               h.pdf
LEC1 h.pdf
 
C. N. II Lec.4.pdf h
C. N. II Lec.4.pdf                      hC. N. II Lec.4.pdf                      h
C. N. II Lec.4.pdf h
 
Lecture 2 Connecting LANs, Backbone Networks, and Virtual LANs.ppt
Lecture 2   Connecting LANs, Backbone Networks, and Virtual LANs.pptLecture 2   Connecting LANs, Backbone Networks, and Virtual LANs.ppt
Lecture 2 Connecting LANs, Backbone Networks, and Virtual LANs.ppt
 
Forouzan6e_ch06_PPTs_Accessible 2024.pptx
Forouzan6e_ch06_PPTs_Accessible 2024.pptxForouzan6e_ch06_PPTs_Accessible 2024.pptx
Forouzan6e_ch06_PPTs_Accessible 2024.pptx
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
 

Recently uploaded

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 

Recently uploaded (20)

(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 

MPI_Lec_5_microprocessor8086&periferal.pdf

  • 1. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION Microprocessors and Interfaces: 2021-22 Lecture 5 8086 Addressing Modes and OP-Code By Dr. Sanjay Vidhyadharan
  • 2. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 2 1/30/2021 Types of Instructions • Data Transfer Instructions • Arithmetic Instructions • Logical Instructions • Branch and Program control Instructions
  • 3. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 3 1/30/2021 Addressing Modes Instruction = Opcode, Operand Opcode/ Operation Field - the type of operation which is to be performed by processor Operand – the data on which the operation is going to be performed
  • 4. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 4 1/30/2021 Addressing Modes • Register Addressing • Immediate Addressing • Direct Addressing • Register Indirect Addressing • Base-plus-index Addressing • Register Relative Addressing • Base relative -plus-indexed Addressing • Scaled Indexed Addressing These data-addressing modes are found with all versions of the Intel microprocessor. except for the scaled-index-addressing mode, found only in 80386 through Core2
  • 5. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 5 1/30/2021 MOV Instruction • MOV destination, source
  • 6. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 6 1/30/2021 Data Transfer Instructions • MOV DST, SRC ➢ Copies the content of source to destination ➢ No Flags Affected ➢ Size of source and destination must be the same
  • 7. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 7 1/30/2021 Different MOV options R ← M M ← R R ← R M ← I R ← I
  • 8. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 8 1/30/2021 Addressing Modes • Register Addressing ➢ MOV AX, BX • Immediate Addressing ➢ MOV AX, 1420H
  • 9. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 9 1/30/2021 Addressing Modes • Direct Addressing ➢ MOV AX, [2340H] • Register Indirect Addressing ➢ MOV AX, [BX]
  • 10. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 10 1/30/2021 Addressing Modes • Base-plus-index Addressing ➢ MOV AX, [BX+SI] • Register Relative Addressing ➢ MOV AX, [BX+40]
  • 11. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 11 1/30/2021 Addressing Modes
  • 12. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 12 1/30/2021 Addressing Modes • Base relative-plus-indexed Addressing ➢ MOV AX, [BX+SI+10] • Scaled Indexed Addressing
  • 13. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION Addressing Modes • The microprocessor contains these 8-bit register names used with register addressing: AH, AL, BH, BL, CH, CL, DH, and DL. • 16-bit register names: AX, BX, CX, DX, SP, BP, SI, and DI. • In 80386 & above, extended 32-bit register names are: EAX, EBX, ECX, EDX, ESP, EBP, EDI, and ESI. • 64-bit mode register names are: RAX, RBX, RCX, RDX, RSP, RBP, RDI, RSI, and R8 through R15.
  • 14. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION • Important for instructions If hexadecimal data begin with a letter, the assembler requires the data start with a 0. – to represent a hexadecimal F2, 0F2H is used in assembly language
  • 15. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION • The source register’s contents do not change. • the destination register’s contents do change • The contents of the destination register or destination memory location change for all instructions except the CMP and TEST instructions. • The MOV BL, CL instruction does not affect the leftmost 8 bits of register BX. Important for instructions
  • 16. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 16 1/30/2021 8086 Assembly Language to Machine language
  • 17. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 17 1/30/2021 8086 Assembly Language to Machine language OP Code
  • 18. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 18 1/30/2021 8086 Assembly Language to Machine language
  • 19. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 19 1/30/2021 8086 Assembly Language to Machine language Byte 2 has 3 fields
  • 20. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 20 1/30/2021 8086 Assembly Language to Machine language
  • 21. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 21 8086 Assembly Language to Machine language
  • 22. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 22 1/30/2021 MOD = 11 Register Mode
  • 23. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 23 1/30/2021 MOD = 00 Memory operand with no displacement MOV [BX],CL - w = 0 because we are dealing with a byte d = 0 because REG to R/M - therefore first byte is (1000 1000) = 88H - since no displacement, - we can use MOD=00 REG=001 and R/M=111 = 0000 1111 = 0FH result: 88 0F
  • 24. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 24 1/30/2021 MOD = 10 Memory operand with 16 bits displacement
  • 25. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION 25 1/30/2021 MOD = 01 Memory operand with 8 bits displacement
  • 26. ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION26 Thankyou