SlideShare a Scribd company logo
Assignment on
TOPIC: Different types of Addressing Modes
Course code: CSE322
COURSE TITTLE: Computer Architecture & Organization
SUBMITTED TO
Dewan Mamun Raza
Lecturer in Department of CSE
Daffodil InternationalUniversity
SUBMITTED BY
Nusrat Jahan Tamanna
SEC: 0-2
Date of submission: 2.08.2020
Addressing modes:
Addressing modes are nothing but the different ways in which the
location of an operand can be specified in an instruction. The number
of addressing modes that a processor supports changes according to
the instruction set it is based on, however there are a few generic ones
that are present in almost all processors and are thus of utmost
importance.
They are as follows:
• register (or register-direct) addressing: R1
• register indirect addressing: M[R1]
• immediate addressing: data
• direct (or absolute) addressing: M[address]
• indirect addressing: M[M[address]]
• implicit addressing: default location
• relative & indexed addressing: M[R1+address]
• pre-decrement, post-decrement, pre-increment, ...
(1)Register (or register-direct) Addressing:
In register mode ,a register contains the operand. The operand is
specified with in one of the processor register. Instruction specifies the
register in which the operand is stored. In register addressing the
operand is placed in one of 8 bit or 16 bit general purpose registers.The
data is in the register that is specifiedby the instruction. Here one register
reference is required to access the data.
Example: Move
MOV C , A C ← A ( Here A is the operand specified in register)
In register,
Add
ADD B A ← A + B ( Here B is the operand specified in register)
In register,
Figure:
Figure: Register Addressing Diagram
(2)Register Indirect Addressing:
The instruction specifies the register in which the memory address of operand is
placed. Itdo not specify the operand itself but its location with in the memory
whereoperand is placed. In this addressing, theoperand offsetis placed in any
one of the registers BX,BP,SI,DI as specified in the instruction.
Example:
Move
MOV A , M A ← [[H][L]] Itmoves the data frommemory location specified
by HL register pair to A
The 8086 CPU’s let me access memory directly through a register using the
register indirect addressing mode.
Figure:
Figure: Register Indirect Addressing Diagram
(3)Immediate Addressing:
The operand is specified with in the instruction.Operand itself is provided in the
instruction rather than its address. In this mode data is present in address field of
instruction .Designed like one address instruction format.
Note:Limitation in the immediate mode is that the range of constants are restricted by
size of address field.
Example:
Move Immediate-
MVI A , 15h A ← 15h
( Here 15h is the immediate operand Add
Immediate)
ADI 3Eh A ← A + 3Eh (Here 3Eh is the immediate operand)
Figure:
Figure: Immediate Addressing Diagram
Example: MOV AL, 35H (move the data 35H into AL register)
(4)Direct (or absolute) addressing:
The instruction specifies the direct address of the operand.Thememory address
is specified wherethe actual operand is. The operand’s offset is given in the
instruction as an 8 bit or 16 bit displacement element. In this addressing mode the 16 bit
effective address of the data is the part of the instruction.Here only one memory
reference operation is required to access the data.
Example:
Load Accumulator
LDA 2805h A ← [2805] Itloads the data frommemory location 2805 to
A.
Store Accumulator STA
2803h [2803] ←A Itstores the data fromA to memory location 2803
Example: ADD AL,[0301] //add the contents of offset address 0301 to AL
Figure:
Figure: Direct Addressing Diagram
(5)Indirect Addressing:
The instruction specifies the indirect address where the effective
address of the operand is placed. The memory address is specified
where the actual address of operand is placed. The indirect addressing
mode uses a register to hold the actual address that will finally be used
in data moves ,the register itself is not the address, but rather the
number in the register.
Example:
Move
MOV A, 2802h A ← [[2802]]
It moves the data from memory location
specified by the location 2802 to A.
Figure:
Figure: Indirect Addressing Diagram
(6)Implicit Addressing:
It is also called inherent addressing mode. The operand is implied by the
instruction. The operand is hidden/fixed inside the instruction. All actions occur in
CPU. Mostof the logical Group instructions belong to this addressing mode. All
actions occur within CPU.
Example:Complement Accumulator CMA
(Hereaccumulator A is implied by the instruction) Complement
Carry Flag CMC (HereFlags register is implied by the instruction) Set Carry Flag
STC (HereFlags register is implied by the instruction).
(7)Relative Addressing Mode:
In relative addressing mode, contents of ProgramCounter PC is added to address
part of instruction to obtain effective address. Theaddress partof the instruction
is called as offsetand it can +ve or – ve. When the offset is added to the PC the
resultant number is the memory location where the operand will be placed.
Example:
Relative Addressing Mode:
Figure: Relative Addressing Diagram
(8)Index Addressing Mode:
In index addressing mode, contents of Indexregister is added to address partof
instruction to obtain effective address. The address partof instruction holds the
beginning/baseaddress and is called as base. The index register hold the index
value, which is +ve. Base remains same, the index changes. When the baseis
added to the index register the resultant number is the memory location where
the operand will be placed.
Example:
Figure: Indexed Addressing Diagram
(9)Auto-increment or Auto-decrement Addressing Mode:
Itis similar to register indirect addressing mode.Herethe register is incremented
or decremented before or after its value is used.
I. Example:
Figure: IndirectAddressing Diagram
II. Example:
Figure: Indirect Addressing Diagram

More Related Content

What's hot

SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...
SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...
SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...vtunotesbysree
 
Design and Fabrication of 4-bit processor
Design and Fabrication of  4-bit processorDesign and Fabrication of  4-bit processor
Design and Fabrication of 4-bit processorPriyatham Bollimpalli
 
Addressing mode Computer Architecture
Addressing mode  Computer ArchitectureAddressing mode  Computer Architecture
Addressing mode Computer ArchitectureHaris456
 
Displacement addressing
Displacement addressingDisplacement addressing
Displacement addressingRajon
 
Input output organization
Input output organizationInput output organization
Input output organizationabdulugc
 
Program execution, straight line sequence and branching
Program execution, straight line sequence and branchingProgram execution, straight line sequence and branching
Program execution, straight line sequence and branchingJyotiprakashMishra18
 
basic computer programming and micro programmed control
basic computer programming and micro programmed controlbasic computer programming and micro programmed control
basic computer programming and micro programmed controlRai University
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...Bilal Amjad
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086Mahalakshmiv11
 
Memory reference instruction
Memory reference instructionMemory reference instruction
Memory reference instructionSanjeev Patel
 
Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5Motaz Saad
 
Socket programming
Socket programmingSocket programming
Socket programmingUjjwal Kumar
 
Minimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 MicroprocessorMinimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 MicroprocessorNikhil Kumar
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output OrganizationKamal Acharya
 
Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Jay Patel
 

What's hot (20)

SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...
SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...
SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...
 
Design and Fabrication of 4-bit processor
Design and Fabrication of  4-bit processorDesign and Fabrication of  4-bit processor
Design and Fabrication of 4-bit processor
 
Addressing mode Computer Architecture
Addressing mode  Computer ArchitectureAddressing mode  Computer Architecture
Addressing mode Computer Architecture
 
Displacement addressing
Displacement addressingDisplacement addressing
Displacement addressing
 
Input output organization
Input output organizationInput output organization
Input output organization
 
Addresing modes
Addresing modesAddresing modes
Addresing modes
 
Program execution, straight line sequence and branching
Program execution, straight line sequence and branchingProgram execution, straight line sequence and branching
Program execution, straight line sequence and branching
 
Instruction format
Instruction formatInstruction format
Instruction format
 
Digital Registers & Counters
Digital Registers & CountersDigital Registers & Counters
Digital Registers & Counters
 
basic computer programming and micro programmed control
basic computer programming and micro programmed controlbasic computer programming and micro programmed control
basic computer programming and micro programmed control
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
 
Multiplexer
MultiplexerMultiplexer
Multiplexer
 
Memory reference instruction
Memory reference instructionMemory reference instruction
Memory reference instruction
 
Pipelining
PipeliningPipelining
Pipelining
 
Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5
 
Socket programming
Socket programmingSocket programming
Socket programming
 
Minimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 MicroprocessorMinimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 Microprocessor
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051
 

Similar to Assignment on different types of addressing modes

Different types of Addressing.cao
Different types of Addressing.caoDifferent types of Addressing.cao
Different types of Addressing.caoUmme habiba
 
Instruction format UJJWAL MATOLIYA.pptx
Instruction format UJJWAL MATOLIYA.pptxInstruction format UJJWAL MATOLIYA.pptx
Instruction format UJJWAL MATOLIYA.pptxujjwalmatoliya
 
Computer architecture addressing modes and formats
Computer architecture addressing modes and formatsComputer architecture addressing modes and formats
Computer architecture addressing modes and formatsMazin Alwaaly
 
Advanced computer architect lesson 3 and 4
Advanced computer architect lesson 3 and 4Advanced computer architect lesson 3 and 4
Advanced computer architect lesson 3 and 4Ismail Mukiibi
 
Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086sravanithonta79
 
Addressing mode & data transfer instruction of 8085
Addressing mode & data transfer instruction of 8085Addressing mode & data transfer instruction of 8085
Addressing mode & data transfer instruction of 8085Chinmayee samal
 
Addressing modes Breifly
Addressing modes BreiflyAddressing modes Breifly
Addressing modes BreiflyTahir Jalali
 
Unit 2 Instruction set.pdf
Unit 2 Instruction set.pdfUnit 2 Instruction set.pdf
Unit 2 Instruction set.pdfHimanshuPant41
 
(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)Alveena Saleem
 
02 Addressing Modes.pptx
02 Addressing Modes.pptx02 Addressing Modes.pptx
02 Addressing Modes.pptxssuser586772
 
Unit i ca- mips addressing
Unit i  ca- mips addressingUnit i  ca- mips addressing
Unit i ca- mips addressingPraba haran
 
ITEC582-Chapter 12.pptx
ITEC582-Chapter 12.pptxITEC582-Chapter 12.pptx
ITEC582-Chapter 12.pptxSabaNaeem26
 
Addressing modes
Addressing modesAddressing modes
Addressing modesSelvi Suba
 

Similar to Assignment on different types of addressing modes (20)

Different types of Addressing.cao
Different types of Addressing.caoDifferent types of Addressing.cao
Different types of Addressing.cao
 
Instruction format UJJWAL MATOLIYA.pptx
Instruction format UJJWAL MATOLIYA.pptxInstruction format UJJWAL MATOLIYA.pptx
Instruction format UJJWAL MATOLIYA.pptx
 
Computer architecture addressing modes and formats
Computer architecture addressing modes and formatsComputer architecture addressing modes and formats
Computer architecture addressing modes and formats
 
Advanced computer architect lesson 3 and 4
Advanced computer architect lesson 3 and 4Advanced computer architect lesson 3 and 4
Advanced computer architect lesson 3 and 4
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086
 
Chapter3.1 3-mikroprocessor
Chapter3.1 3-mikroprocessorChapter3.1 3-mikroprocessor
Chapter3.1 3-mikroprocessor
 
Addressing mode & data transfer instruction of 8085
Addressing mode & data transfer instruction of 8085Addressing mode & data transfer instruction of 8085
Addressing mode & data transfer instruction of 8085
 
Addressing modes Breifly
Addressing modes BreiflyAddressing modes Breifly
Addressing modes Breifly
 
Unit 2 Instruction set.pdf
Unit 2 Instruction set.pdfUnit 2 Instruction set.pdf
Unit 2 Instruction set.pdf
 
(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 
02 Addressing Modes.pptx
02 Addressing Modes.pptx02 Addressing Modes.pptx
02 Addressing Modes.pptx
 
Al2ed chapter4
Al2ed chapter4Al2ed chapter4
Al2ed chapter4
 
Unit i ca- mips addressing
Unit i  ca- mips addressingUnit i  ca- mips addressing
Unit i ca- mips addressing
 
Lecture 06
Lecture 06Lecture 06
Lecture 06
 
ITEC582-Chapter 12.pptx
ITEC582-Chapter 12.pptxITEC582-Chapter 12.pptx
ITEC582-Chapter 12.pptx
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Addressing
Addressing Addressing
Addressing
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 

Recently uploaded

Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxJisc
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptSourabh Kumar
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxakshayaramakrishnan21
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsCol Mukteshwar Prasad
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasGeoBlogs
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdfCarlosHernanMontoyab2
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chipsGeoBlogs
 
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.pptxJosvitaDsouza2
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxDenish Jangid
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfkaushalkr1407
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...Denish Jangid
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPCeline George
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportAvinash Rai
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxRaedMohamed3
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfQucHHunhnh
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleCeline George
 
NLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptxNLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptxssuserbdd3e8
 

Recently uploaded (20)

Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
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
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
NLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptxNLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptx
 

Assignment on different types of addressing modes

  • 1. Assignment on TOPIC: Different types of Addressing Modes Course code: CSE322 COURSE TITTLE: Computer Architecture & Organization SUBMITTED TO Dewan Mamun Raza Lecturer in Department of CSE Daffodil InternationalUniversity SUBMITTED BY Nusrat Jahan Tamanna SEC: 0-2 Date of submission: 2.08.2020 Addressing modes:
  • 2. Addressing modes are nothing but the different ways in which the location of an operand can be specified in an instruction. The number of addressing modes that a processor supports changes according to the instruction set it is based on, however there are a few generic ones that are present in almost all processors and are thus of utmost importance. They are as follows: • register (or register-direct) addressing: R1 • register indirect addressing: M[R1] • immediate addressing: data • direct (or absolute) addressing: M[address] • indirect addressing: M[M[address]] • implicit addressing: default location • relative & indexed addressing: M[R1+address] • pre-decrement, post-decrement, pre-increment, ... (1)Register (or register-direct) Addressing: In register mode ,a register contains the operand. The operand is specified with in one of the processor register. Instruction specifies the register in which the operand is stored. In register addressing the operand is placed in one of 8 bit or 16 bit general purpose registers.The data is in the register that is specifiedby the instruction. Here one register reference is required to access the data. Example: Move MOV C , A C ← A ( Here A is the operand specified in register) In register, Add
  • 3. ADD B A ← A + B ( Here B is the operand specified in register) In register, Figure: Figure: Register Addressing Diagram (2)Register Indirect Addressing: The instruction specifies the register in which the memory address of operand is placed. Itdo not specify the operand itself but its location with in the memory whereoperand is placed. In this addressing, theoperand offsetis placed in any one of the registers BX,BP,SI,DI as specified in the instruction. Example: Move MOV A , M A ← [[H][L]] Itmoves the data frommemory location specified by HL register pair to A
  • 4. The 8086 CPU’s let me access memory directly through a register using the register indirect addressing mode. Figure: Figure: Register Indirect Addressing Diagram (3)Immediate Addressing: The operand is specified with in the instruction.Operand itself is provided in the instruction rather than its address. In this mode data is present in address field of instruction .Designed like one address instruction format. Note:Limitation in the immediate mode is that the range of constants are restricted by size of address field. Example: Move Immediate- MVI A , 15h A ← 15h ( Here 15h is the immediate operand Add Immediate) ADI 3Eh A ← A + 3Eh (Here 3Eh is the immediate operand)
  • 5. Figure: Figure: Immediate Addressing Diagram Example: MOV AL, 35H (move the data 35H into AL register) (4)Direct (or absolute) addressing: The instruction specifies the direct address of the operand.Thememory address is specified wherethe actual operand is. The operand’s offset is given in the instruction as an 8 bit or 16 bit displacement element. In this addressing mode the 16 bit effective address of the data is the part of the instruction.Here only one memory reference operation is required to access the data. Example: Load Accumulator LDA 2805h A ← [2805] Itloads the data frommemory location 2805 to A. Store Accumulator STA 2803h [2803] ←A Itstores the data fromA to memory location 2803 Example: ADD AL,[0301] //add the contents of offset address 0301 to AL Figure:
  • 6. Figure: Direct Addressing Diagram (5)Indirect Addressing: The instruction specifies the indirect address where the effective address of the operand is placed. The memory address is specified where the actual address of operand is placed. The indirect addressing mode uses a register to hold the actual address that will finally be used in data moves ,the register itself is not the address, but rather the number in the register. Example: Move MOV A, 2802h A ← [[2802]] It moves the data from memory location specified by the location 2802 to A.
  • 8. (6)Implicit Addressing: It is also called inherent addressing mode. The operand is implied by the instruction. The operand is hidden/fixed inside the instruction. All actions occur in CPU. Mostof the logical Group instructions belong to this addressing mode. All actions occur within CPU. Example:Complement Accumulator CMA (Hereaccumulator A is implied by the instruction) Complement Carry Flag CMC (HereFlags register is implied by the instruction) Set Carry Flag STC (HereFlags register is implied by the instruction). (7)Relative Addressing Mode: In relative addressing mode, contents of ProgramCounter PC is added to address part of instruction to obtain effective address. Theaddress partof the instruction is called as offsetand it can +ve or – ve. When the offset is added to the PC the resultant number is the memory location where the operand will be placed. Example: Relative Addressing Mode:
  • 9. Figure: Relative Addressing Diagram (8)Index Addressing Mode: In index addressing mode, contents of Indexregister is added to address partof instruction to obtain effective address. The address partof instruction holds the beginning/baseaddress and is called as base. The index register hold the index value, which is +ve. Base remains same, the index changes. When the baseis added to the index register the resultant number is the memory location where the operand will be placed. Example:
  • 10. Figure: Indexed Addressing Diagram (9)Auto-increment or Auto-decrement Addressing Mode: Itis similar to register indirect addressing mode.Herethe register is incremented or decremented before or after its value is used. I. Example:
  • 11. Figure: IndirectAddressing Diagram II. Example: Figure: Indirect Addressing Diagram