Information Technology Reference
In-Depth Information
example, if the content of the memory location whose address is 1000 was (
345) at
2
the time when the instruction LOAD 1000, R i
is executed, then the result of execut-
ing such instruction is to load the value (
345) into register R i .
Direct (absolute) addressing mode provides more flexibility compared to the
immediate mode. However, it requires the explicit inclusion of the operand address
in the instruction. A more flexible addressing mechanism is provided through the use
of the indirect addressing mode. This is explained below.
2
2.2.3. Indirect Mode
In the indirect mode, what is included in the instruction is not the address of the
operand, but rather a name of a register or a memory location that holds the (effec-
tive) address of the operand. In order to indicate the use of indirection in the instruc-
tion, it is customary to include the name of the register or the memory location in
parentheses. Consider, for example, the instruction LOAD (1000), R i . This instruc-
tion has the memory location 1000 enclosed in parentheses, thus indicating indirec-
tion. The meaning of this instruction is to load register R i with the contents of the
memory location whose address is stored at memory address 1000. Because indirec-
tion can be made through either a register or a memory location, therefore, we can
identify two types of indirect addressing. These are register indirect addressing,ifa
register is used to hold the address of the operand, and memory indirect addressing,
if a memory location is used to hold the address of the operand. The two types are
illustrated in Figure 2.7.
Figure 2.7
Illustration of the indirect addressing mode
Search WWH ::




Custom Search