Download presentation
Presentation is loading. Please wait.
Published byAnnis Howard Modified over 9 years ago
1
CM404.12TO131 Name : C. S. Manjula, Grad IETE Designation : Lab Mechanic Branch: Computer Engineering Institute: S.P.W. Polytechnic, Tirupati, Semester: IV semester Subject: Microprocessors Subject Code: CM 405 Topic : Instruction Set Duration: 100 Minutes Sub Topic: Addressing Modes of 8086 Teaching Aids: PPT Revised by : K.Srikanth,Lecturer,GPT, Nizamabad
2
CM404.12TO132 Addressing Modes of 8086 Definition Addressing mode indicates the method through which an operand is specified or indicated in an instruction Types of Addressing Modes: 11 1. Immediate Addressing mode 2. Direct Addressing mode 3. Register Addressing mode 4. Register Indirect Addressing mode
3
CM404.12TO133 Addressing Modes of 8086 (Contd..) 5. Register Relative Addressing mode 6. Based Indexed Addressing mode 7. Relative Based Indexed Addressing mode
4
CM404.12TO134 Branch Related Addressing Modes 8. Intra-segment Direct Addressing mode 9. Intra-segment Indirect Addressing mode 10. Inter-segment Direct Addressing mode 11. Inter-segment Indirect Addressing mode
5
CM404.12TO135 1. Immediate Addressing mode Operand is indicated in the instruction itself Ex: MOV AX, 0007H 0007H is the immediate data here.
6
CM404.12TO136 2. Direct Addressing mode Offset Address of the operand is specified directly in the instruction EX: MOV AX, [5000H] NOTE:1.[ ] indicates offset or effective address 2. Data resides in the Data Segment (DS), whose Physical address is computed as PA = DS x 10H + 5000H
7
CM404.12TO137 3. Register Addressing mode The register which holds the data is mentioned in the instruction Ex: MOV BX, AX All the registers, except IP and CS may be used
8
CM404.12TO138 4. Register Indirect Addressing Offset address is stored in a register That register is indicated in the instruction EX: MOV AX, [BX] The offset address of the data is in BX. The Physical Address (PA) is given as: PA = [DS] x 10H + [BX] Permitted Registers: SI, DI, BX
9
CM404.12TO139 5. Register Relative Addressing mode Offset address is stored in a register Permitted Registers: SI, DI, BX, BP That register, and an 8-bit or 16-bit displacement are given within the instruction The Offset Address of the data is computed by adding the displacement with the memory offset address present in the given register EX: MOV AX, 50H[BX] Offset address = 50H + [BX] PA = 10H * DS + 8 or 16 bit relative addr.
10
CM404.12TO1310 6. Based Indexed Addressing A base register (BX/BP), and an index register (SI/DI) are given within the instruction The Effective Address of the data is computed by adding the addresses present in the base and index regs. EX: MOV AX, [BX] [SI] EA = [BX] + [SI] PA = 10H * DS + EA
11
CM404.12TO1311 7. Relative Based Indexed Addressing Mode A base register (BX/BP), an index register (SI/DI), and an 8-bit or 16-bit displacement are given within the instruction The Effective Address of the data is computed by adding the addresses present in the given registers with the 8- bit or 16-bit displacement EX: MOV AX, 50H [BX][SI] EA = [BX] + [SI] + 50H PA = 10H * DS + EA
12
CM404.12TO1312 Branch Related Addressing Modes Instructions under this category doesn’t try to access data, instead they alter normal sequence of program execution (By branching to an instruction somewhere else) Inter segment branch – Branching within the same code segment Intra segment branch – Branching into another code segment
13
CM404.12TO1313 8. Intra-segment Direct Addressing mode An 8-bit or 16-bit displacement is given within the instruction The effective branch address (code segment offset address) is given as the sum of 8-bit or 16-bit displacement and the contents of Instruction Pointer (IP) and lies within the same segment
14
CM404.12TO1314 9. Intra-segment Indirect Addressing mode The address of a register or a memory location, where the 16-bit code segment offset address is located, is given within the instruction A branch is affected by copying this offset address into IP register This branch is to a location within the code segment
15
CM404.12TO1315 10. Inter-segment Direct Addressing Mode Two 16-bit values, specifying the base and offset addresses of the code segment, are given within the instruction A branch is affected by copying the contents of the above mentioned addresses into CS and IP registers. This branch can be to a location outside the code segment
16
CM404.12TO1316 11. Inter-segment Indirect Addressing Mode The starting address of a memory block, containing the base and offset addresses of the code segment, is specified using any of the data related addressing modes A branch is affected by copying the contents of the above mentioned memory block into CS and IP registers. This branch can be to a location outside the code segment
17
CM404.12TO1317 Summary We have discussed about Types of addressing modes
18
CM404.12TO1318 Quiz 1.What do you mean by addressing mode ? a)Locating ALU b)Locating operand c)Locating memory d)Locating register
19
CM404.12TO1319 Quiz (Contd.) 2.The length of an instruction of 8086 can be ? a)1 to 4 bytes b) 2 to 4 bytes c)1 to 6 bytes d)2 to 6 bytes
20
CM404.12TO1320 Quiz (Contd.) 3.What is meant by inter segment addressing mode ? a)Branch address is available in the same segment b)Branch address is available outside the segment ---------------------------------------------------------
21
CM404.12TO1321 Frequently Asked Questions 1.List out addressing modes supported by 8086 ? 2.Explain each addressing mode by using suitable examples ? 3.Compare direct and indirect addressing modes and explain the similarities and differences with suitable examples
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.