Prerequisite – Addressing Modes
1. Indirect Addressing Mode:
In indirect addressing mode, the address field in the instruction points to the memory location or register where the effective address of the operand is present.
Two memory accesses are required. One to get the value stored at the given address field. Second to get the effective address of operand at the address found. It can be further classified as Register Indirect addressing and Memory Indirect Addressing.
Example: Add the contents of address stored at register B.
The address field of the instruction, here register B holds the address of the operand.
2. Immediate Addressing Mode:
In immediate addressing mode, the operand is a part of the instruction.
Here the Operand = Address Field
Example: Add 8 to the accumulator.
No memory reference is required to fetch data. So no additional calculations are required to work out the effective address. It is a fast method. But the downside is that it has a limited range
Now let’s compare Direct and Immediate Addressing Modes.
|Indirect Addressing Mode||Immediate Addressing Mode|
|The address field of the instruction holds the address of the operand.||There is no address field as the operand is a part of the instruction.|
|It requires two reference to memory.||It does not require any reference to memory.|
|It is slower compared to immediate mode.||It is a faster process.|
|It has more range than in immediate mode.||It has a limited range.|
|It is further classified into two categories.||No further classification.|
|Example: ADD [B]||Example: ADD 5|
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Difference between Indirect and Implied Addressing Modes
- Difference between Direct and Indirect Addressing Modes
- Difference between Direct and Immediate Addressing Modes
- Difference between Direct and Implied Addressing Modes
- Difference between PC relative and Base register Addressing Modes
- Difference between Memory based and Register based Addressing Modes
- Addressing Modes
- Addressing modes in 8085 microprocessor
- Addressing modes in 8086 microprocessor
- Difference between Implied addressing mode and Immediate addressing mode
- What is the difference between fopen modes “r+”, "rw+" and “w+” in PHP?
- Difference between Simplex, Half duplex and Full Duplex Transmission Modes
- Difference between Register Mode and Register Indirect Mode
- Removing Direct and Indirect Left Recursion in a Grammar
- 8255 microprocessor operating modes
- Classful Vs Classless Addressing
- IPv6 Addressing Format and Conventions
- What is APIPA (Automatic Private IP Addressing)?
- 8085 program to swap two 16 bit numbers using Direct addressing mode
- 8085 program to swap two 8 bit numbers using Direct addressing mode
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.