Difference between Register Mode and Register Indirect Mode
Prerequisite – Addressing Modes
1. Register Mode: In register addressing mode, the operand is placed in one of the 8-bit or 16-bit general-purpose registers. The data is in the register that is specified by the instruction.
MOV R1, R2
Instruction has register R2 and R2 has operand.
2. Register Indirect ode: In register indirect addressing mode, the address of the operand is placed in any one of the registers. The instruction specifies a register that contains the address of the operand.
ADD R1, (R2)
Instruction has register R2 and R2 has the memory address of operand.
Difference between Register Mode and Register Indirect Mode are as follows:time-consumingregisteredregistered
|Parameters||REGISTER MODE||REGISTER INDIRECT MODE|
|Operand||The operand is placed in the general-purpose register.||The operand’s offset is placed in one of the registers.|
|Address Field||In register mode, the address field contains the effective address of the operand.||In register indirect mode, the address field contains a reference of the effective address.|
|Register References||It requires only one register reference to access data.||It requires two register references to access data.|
|Calculations||No further calculation is required to perform the operation.||Requires further calculation to find the effective address.|
|Processing Speed||Register addressing mode is fast.||Register indirect addressing mode is slow.|
|Accessing of data||It is easier to access the data in register mode.||It is a bit complex to access the data in register indirect mode.|
|Uses||It uses temporary variables.||It uses pointers.|
|Advantage||Requirement of a small address field and no time consuming memory accesses.||There is no such constraint imposed on the address range by the address field.|
|Disadvantage||Constrained Address Space||To retrieve the operand, there is need for two memory references for the execution of instruction: one to get its address and another to get its value.|