Professional Documents
Culture Documents
CS403 2
Outlines
CS403
1
What is addressing mode ?
The term addressing modes refers to the way in which the operand of an
instruction is specified. The addressing mode specifies a rule for interpreting or
modifying the address field of the instruction before the operand is actually
executed.
Instruction Format
Different types of Addressing Modes
• Implied Mode
• Immediate Mode
• Register Mode
• Register Indirect Mode
• Auto decrement Mode
• Auto increment Mode
• Direct Address Mode
• Indirect Address Mode
• Indexed Addressing Mode
CS403 5
Direct addressing mode
The Direct addressing mode is one that contains the actual address of the data. It is
so called because the operand field directly specifies the memory location where the
data is residing. In the direct addressing mode, the address is first read through
instruction and then the data is read. The direct addressing mode is also known as
the absolute addressing mode.
Direct addressing mode
Diagram
CS403 7
Advantages, disadvantages & use of direct
addressing mode
Advantage
Simple since no computation of is required, we are directly getting the address
of the data.
Disadvantage
If the instruction’s size is fixed then the size of addresses can’t exceed the
given limit.
Use
For accessing the variables since they are mostly stored in the memory.
8
In-direct addressing mode
The Indirect addressing mode is one in which the address field contains the
effective address of the memory location where the actual data is present.
Therefore, a dual memory reference is needed to access the data in indirect
addressing mode. This will increase the extra calculation to fetch the actual data.
CS403 9
In-direct addressing mode
Diagram
10
In-direct addressing mode
The indirect addressing mode may be further classified into two categories,
namely, memory indirect addressing mode and register indirect addressing
mode
11
Advantages, disadvantages & use of In-direct
addressing mode
Advantages
In register indirect addressing mode is useful if a series of data is to be
assigned to that address, with the help of this quality the number of
instructions decreases as a result of which performance increases.
Disadvantage
More computation is required since to access the data one has to go through
two addresses.
Use
For implementation of pointers and for data passing.
12
References
3. Class notes.
13
14