SlideShare a Scribd company logo
2
Most read
9
Most read
10
Most read
Addressing Modes
UNIT 5
Addressing Mode
 The process of identifying the operands for a particular instruction can be
carried out in several ways. The various types of addressing modes are as
shown below.
 Immediate addressing mode
 Direct addressing mode
 Register addressing mode
 Register indirect addressing mode
 Implicit addressing mode
Immediate Addressing mode
 In immediate addressing mode the source operand is always data. If the
data is 8-bit, then the instruction will be of 2 bytes, if the data is of 16-
bit then the instruction will be of 3 bytes.
 Examples:
MVI B 45 (move the data 45H immediately to register B)
LXI H 3050 (load the H-L pair with the operand 3050H immediately)
JMP address (jump to the operand address immediately)
ADI 34H – This instruction adds the immediate data, 34H to the
accumulator.
34H is the data here. H represents Hexadecimal value and the immediate
value is added to the accumulator. In this case 34H is added to the
accumulator. Suppose if accumulator has a value 8H and when this
instruction is executed, 34H is added to the 8H and the result is stored in
accumulator.
Register Addressing mode
 In register addressing mode, the data to be operated is available inside
the register(s) and register(s) is(are) operands. Therefore the operation is
performed within various registers of the microprocessor. Examples:
MOV A, B (move the contents of register B to register A)
ADD B (add contents of registers A and B and store the result in register A)
INR A (increment the contents of register A by one)
 Example:
MOV A, B
Here the Opcode is MOV. If the above instruction is executed, the
contents of Register B are moved to the Register A, which is nothing but the
accumulator.
Direct Addressing Mode
 In direct addressing mode, the data to be operated is available inside a memory location and
that memory location is directly specified as an operand. The operand is directly available in the
instruction itself. Examples:
LDA 2050 (load the contents of memory location into accumulator A)
LHLD address (load contents of 16-bit memory location into H-L register pair)
IN 35 (read the data from port whose address is 01)
 Example:
OUT 10H
LDA 4100H
STA 2000H
Consider the instruction STA 2000H
When this instruction is executed, the contents of the accumulator are stored in the memory
location specified. In the above example the contents of accumulator are stored in memory
location 2000H.
Register indirect Addressing mode
 In register indirect addressing mode, the data to be operated is available
inside a memory location and that memory location is indirectly specified b a
register pair.
Examples:
MOV A, M (move the contents of the memory location pointed by the H-L pair
to the accumulator)
LDAX B (move contains of B-C register to the accumulator)
LXIH 9570 (load immediate the H-L pair with the address of the location 9570)
Implied/Implicit addressing mode
 In implied/implicit addressing mode the operand is hidden and the data to be
operated is available in the instruction itself.
 Examples:
CMA (finds and stores the 1’s complement of the contains of accumulator A in
A)
RRC (rotate accumulator A right by one bit)
RLC (rotate accumulator A left by one bit)
Addressing mode for
8086
Types of addressing mode
•Register mode – In this type of addressing mode both the operands are registers.
Example: MOV AX, BX XOR AX, DX ADD AL, BL
•Immediate mode – In this type of addressing mode the source operand is a 8 bit or 16 bit data.
Destination operand can never be immediate data.
Example: MOV AX, 2000 MOV CL, 0A ADD AL, 45 AND AX, 0000
Note that to initialize the value of segment register an register is required.
MOV AX, 2000 MOV CS, AX
•Displacement or direct mode – In this type of addressing mode the effective address is directly
given in the instruction as displacement.
Example: MOV AX, [DISP] MOV AX, [0500]
•Register indirect mode – In this addressing mode the effective address is in SI, DI or BX.
Example: MOV AX, [DI]
ADD AL, [BX]
MOV AX, [SI]
•Based indexed mode – In this the effective address is sum of base register and index register.
Base register: BX, BP Index register: SI, DI
The physical memory address is calculated according to the base register.
Example:
MOV AL, [BP+SI] MOV AX, [BX+DI]
•Indexed mode – In this type of addressing mode the effective address is sum of index register
and displacement.
Example: MOV AX, [SI+2000] MOV AL, [DI+3000]
•Based mode – In this the effective address is the sum of base register and displacement.
Example: MOV AL, [BP+ 0100]
•Based indexed displacement mode – In this type of addressing mode the effective address is
the sum of index register, base register and displacement.
Example: MOV AL, [SI+BP+2000]
•String mode – This addressing mode is related to string instructions. In this the value of SI and DI are
auto incremented and decremented depending upon the value of directional flag.
Example: MOVS B
MOVS W
•Input/Output mode – This addressing mode is related with input output operations.
Example: IN A, 45 OUT A, 50
•Relative mode –
In this the effective address is calculated with reference to instruction pointer.
Example: JNZ 8 bit address
IP=IP+8 bit address
Data Transfer Instruction
These instructions are used to transfer the data from the source operand to the
destination operand. These are also known as copy instructions.
Let us see the data transfer instructions of 8086 microprocessor. Here the D and S are
destination and source respectively. D and S can be either register, data or memory
address.
Addressing modes

More Related Content

PPT
Architecture of 8086 Microprocessor
PPTX
Addressing modes of 8086
PPTX
Shift Microoperations by Pir Sarfraz RSDT larkana
PPTX
Instruction codes
PPTX
Types of Addressing modes- COA
PPT
Programming with 8085
PPTX
Stack Operations
PPTX
8086 microprocessor-architecture
Architecture of 8086 Microprocessor
Addressing modes of 8086
Shift Microoperations by Pir Sarfraz RSDT larkana
Instruction codes
Types of Addressing modes- COA
Programming with 8085
Stack Operations
8086 microprocessor-architecture

What's hot (20)

PPTX
Architecture of 8085 microprocessor
PPS
Addressing modes of 8085
PPTX
UNIT 2 8086 System Bus Structure.pptx
PPTX
Addressing modes of 8086
PPTX
Instruction set of 8086
PPTX
Addressing modes of 8051
PPT
Introduction to microprocessor
PPT
8051 Addressing Modes
PPT
Addressing modes of 8051
PPT
Data transfer instruction set of 8085 micro processor
PPTX
DMA and DMA controller
PPTX
PPT on 8085 Microprocessor
PPTX
Presentation on 8086 Microprocessor
PPT
Logical instruction of 8085
PPT
Instruction cycle
PPTX
Memory Reference Instructions
DOCX
8051 data types and directives
PPTX
8255 PPI
PPT
Addressing modes
Architecture of 8085 microprocessor
Addressing modes of 8085
UNIT 2 8086 System Bus Structure.pptx
Addressing modes of 8086
Instruction set of 8086
Addressing modes of 8051
Introduction to microprocessor
8051 Addressing Modes
Addressing modes of 8051
Data transfer instruction set of 8085 micro processor
DMA and DMA controller
PPT on 8085 Microprocessor
Presentation on 8086 Microprocessor
Logical instruction of 8085
Instruction cycle
Memory Reference Instructions
8051 data types and directives
8255 PPI
Addressing modes
Ad

Similar to Addressing modes (20)

PPTX
4-ADDRESSING_MODES_E logic circuits.pptx
PPTX
02 Addressing Modes.pptx
PPT
ADDRESSING MODES in 8086 MICROPROCESSOR.ppt
PPTX
UNIT-I MICROPROCESSOR PROGRAMMING AND STACK.pptx
PPTX
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
PDF
8086 instruction set (with simulator)
PPT
1327 addressingmodesof8086-100523023240-phpapp02
PPTX
Module 3.1_Instruction Types and Addressing modes.pptx
PDF
L-3microproceessors and microcontrollers.pdf
PPTX
Addressing Modes of 8085 Microprocessor
PPTX
Lecture 10
PPTX
3. Addressing Modes in 8085 microprocessor.pptx
DOCX
Assignment on different types of addressing modes
PPTX
Mastering Assembly Language: Programming with 8086
DOCX
Notes 8086 instruction format
PPTX
ADDRESSING MODES OF 8085
PPT
microprocessor and microcontroller notes ppt
PPT
addressingmodes8051.ppt
PPTX
micro chapter 3jjgffffyeyhhuyerfftfgggffgjj
PPTX
ADDRESSING MODES from the assembly4.pptx
4-ADDRESSING_MODES_E logic circuits.pptx
02 Addressing Modes.pptx
ADDRESSING MODES in 8086 MICROPROCESSOR.ppt
UNIT-I MICROPROCESSOR PROGRAMMING AND STACK.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
8086 instruction set (with simulator)
1327 addressingmodesof8086-100523023240-phpapp02
Module 3.1_Instruction Types and Addressing modes.pptx
L-3microproceessors and microcontrollers.pdf
Addressing Modes of 8085 Microprocessor
Lecture 10
3. Addressing Modes in 8085 microprocessor.pptx
Assignment on different types of addressing modes
Mastering Assembly Language: Programming with 8086
Notes 8086 instruction format
ADDRESSING MODES OF 8085
microprocessor and microcontroller notes ppt
addressingmodes8051.ppt
micro chapter 3jjgffffyeyhhuyerfftfgggffgjj
ADDRESSING MODES from the assembly4.pptx
Ad

Recently uploaded (20)

PDF
1_English_Language_Set_2.pdf probationary
PDF
Indian roads congress 037 - 2012 Flexible pavement
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PDF
Hazard Identification & Risk Assessment .pdf
PPTX
History, Philosophy and sociology of education (1).pptx
PPTX
20th Century Theater, Methods, History.pptx
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PPTX
Introduction to Building Materials
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
1_English_Language_Set_2.pdf probationary
Indian roads congress 037 - 2012 Flexible pavement
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
Unit 4 Computer Architecture Multicore Processor.pptx
Weekly quiz Compilation Jan -July 25.pdf
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
Chinmaya Tiranga quiz Grand Finale.pdf
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Share_Module_2_Power_conflict_and_negotiation.pptx
Hazard Identification & Risk Assessment .pdf
History, Philosophy and sociology of education (1).pptx
20th Century Theater, Methods, History.pptx
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
FORM 1 BIOLOGY MIND MAPS and their schemes
Introduction to Building Materials
Introduction to pro and eukaryotes and differences.pptx
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...

Addressing modes

  • 2. Addressing Mode  The process of identifying the operands for a particular instruction can be carried out in several ways. The various types of addressing modes are as shown below.  Immediate addressing mode  Direct addressing mode  Register addressing mode  Register indirect addressing mode  Implicit addressing mode
  • 3. Immediate Addressing mode  In immediate addressing mode the source operand is always data. If the data is 8-bit, then the instruction will be of 2 bytes, if the data is of 16- bit then the instruction will be of 3 bytes.  Examples: MVI B 45 (move the data 45H immediately to register B) LXI H 3050 (load the H-L pair with the operand 3050H immediately) JMP address (jump to the operand address immediately) ADI 34H – This instruction adds the immediate data, 34H to the accumulator. 34H is the data here. H represents Hexadecimal value and the immediate value is added to the accumulator. In this case 34H is added to the accumulator. Suppose if accumulator has a value 8H and when this instruction is executed, 34H is added to the 8H and the result is stored in accumulator.
  • 4. Register Addressing mode  In register addressing mode, the data to be operated is available inside the register(s) and register(s) is(are) operands. Therefore the operation is performed within various registers of the microprocessor. Examples: MOV A, B (move the contents of register B to register A) ADD B (add contents of registers A and B and store the result in register A) INR A (increment the contents of register A by one)  Example: MOV A, B Here the Opcode is MOV. If the above instruction is executed, the contents of Register B are moved to the Register A, which is nothing but the accumulator.
  • 5. Direct Addressing Mode  In direct addressing mode, the data to be operated is available inside a memory location and that memory location is directly specified as an operand. The operand is directly available in the instruction itself. Examples: LDA 2050 (load the contents of memory location into accumulator A) LHLD address (load contents of 16-bit memory location into H-L register pair) IN 35 (read the data from port whose address is 01)  Example: OUT 10H LDA 4100H STA 2000H Consider the instruction STA 2000H When this instruction is executed, the contents of the accumulator are stored in the memory location specified. In the above example the contents of accumulator are stored in memory location 2000H.
  • 6. Register indirect Addressing mode  In register indirect addressing mode, the data to be operated is available inside a memory location and that memory location is indirectly specified b a register pair. Examples: MOV A, M (move the contents of the memory location pointed by the H-L pair to the accumulator) LDAX B (move contains of B-C register to the accumulator) LXIH 9570 (load immediate the H-L pair with the address of the location 9570)
  • 7. Implied/Implicit addressing mode  In implied/implicit addressing mode the operand is hidden and the data to be operated is available in the instruction itself.  Examples: CMA (finds and stores the 1’s complement of the contains of accumulator A in A) RRC (rotate accumulator A right by one bit) RLC (rotate accumulator A left by one bit)
  • 9. Types of addressing mode •Register mode – In this type of addressing mode both the operands are registers. Example: MOV AX, BX XOR AX, DX ADD AL, BL •Immediate mode – In this type of addressing mode the source operand is a 8 bit or 16 bit data. Destination operand can never be immediate data. Example: MOV AX, 2000 MOV CL, 0A ADD AL, 45 AND AX, 0000 Note that to initialize the value of segment register an register is required. MOV AX, 2000 MOV CS, AX •Displacement or direct mode – In this type of addressing mode the effective address is directly given in the instruction as displacement. Example: MOV AX, [DISP] MOV AX, [0500]
  • 10. •Register indirect mode – In this addressing mode the effective address is in SI, DI or BX. Example: MOV AX, [DI] ADD AL, [BX] MOV AX, [SI] •Based indexed mode – In this the effective address is sum of base register and index register. Base register: BX, BP Index register: SI, DI The physical memory address is calculated according to the base register. Example: MOV AL, [BP+SI] MOV AX, [BX+DI] •Indexed mode – In this type of addressing mode the effective address is sum of index register and displacement. Example: MOV AX, [SI+2000] MOV AL, [DI+3000]
  • 11. •Based mode – In this the effective address is the sum of base register and displacement. Example: MOV AL, [BP+ 0100] •Based indexed displacement mode – In this type of addressing mode the effective address is the sum of index register, base register and displacement. Example: MOV AL, [SI+BP+2000] •String mode – This addressing mode is related to string instructions. In this the value of SI and DI are auto incremented and decremented depending upon the value of directional flag. Example: MOVS B MOVS W
  • 12. •Input/Output mode – This addressing mode is related with input output operations. Example: IN A, 45 OUT A, 50 •Relative mode – In this the effective address is calculated with reference to instruction pointer. Example: JNZ 8 bit address IP=IP+8 bit address
  • 13. Data Transfer Instruction These instructions are used to transfer the data from the source operand to the destination operand. These are also known as copy instructions. Let us see the data transfer instructions of 8086 microprocessor. Here the D and S are destination and source respectively. D and S can be either register, data or memory address.