The available instruction in a register indirect addressing mode defines that register in the CPU whose contents provide the operand’s address in the memory. In simpler words, any selected register would include the address of an operand instead of the operand itself.
The reference to a register is equivalent to specifying any memory address. The pros of using this type of instruction are that an instruction’s address field would make use of fewer bits to select a register than we would require when we want to directly specify a memory address.
In this article, we will take a look at the Register Indirect Addressing Mode according to the GATE Syllabus for CSE (Computer Science Engineering). Continue reading ahead to learn more.
Table of Contents
Register Indirect Addressing Mode
We use a processor register to hold a memory location’s address wherever the operand has been placed. This addressing mode would allow the execution of a similar set of instructions for various different memory locations. It can be done if we increment the content of the register and, thereby, point to the new location every single time.
In a higher-level language, we refer to it as pointers. We denote the indirect mode by placing the given register inside a parenthesis.
In this case, the effective address refers to the content of the memory location that is present in the available register.
EA=(R)
Here, for instance:
Load X3, (X2) // Load X2, A
Here, the Load instruction will ultimately load the values that are present at the memory locations that are contained by the X2 register in the X3 register. The figure given below shows how the X3 register is loaded with the value that is stored in a memory location held by the X2 register.
Pros
We can use the very same set of instructions multiple times in the case of a register indirect addressing mode.
Cons
The total number of memory references is more in the case of a register indirect addressing mode.
Keep learning and stay tuned to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2023, GATE Admit Card, GATE Syllabus, GATE Previous Year Question Paper, and more.
Also Explore,
Comments