Instruction Address Modes (CA Notes)
Rajkumar Lama
May 15, 2019
CA
,
Computer Architecture
,
Instruction Address Modes
,
MICT first semester notes
It specifies a rule for interpreting or modifying the address field of the instruction before the operand is actually referenced. It helps for
- Providing programming flexibility to the uses.
- Using the bits in the address field of instruction efficiently
Types of Addressing Modes
1) Implied Addressing Mode
- Address of operands are specified implicit in the definition of instruction.
- It does not need to specify address of instruction
- Example : Add x; Add y;
2) Immediate Addressing Mode:
- Instead of specifying the address of operand itself is specified in the instruction.
- No need to specify address in the instruction.
- However, operand itself need to be specified.
- Sometimes, require more bits to be address.
- Fast to acquire an operand
3) Register Addressing Mode
- Address specified in the instruction is the address of register.
- The instruction has the address of the Register where the operand is stored.
- Shorter address then memory address.
- Shorter instructions and faster instruction fetch
- Saving address field to access to the operands
- It has very limited address space
4) Register Indicate Addressing Mode
- In this mode, the instruction specifies the register whose contents give us the address of operand which is in memory. Thus the register contains the address of operand rather than the operand itself.
- Instruction specifies a register which contains the memory address of operand
- Saving instruction bits since register address is shorter than memory address
- Slower then register and memory addressing
- Example: EA = contend of R
5) Auto increment or Auto Decrement address mode
- In this mode the register is increment or decremented after or before its value is used.
- Instruction specifies the memory address which can be used directly to access the memory.
- Faster then the memory addressing mode
- Too many bits are needed to specify the address for a physical memory space.
- Example: EA = IR (Address)
6) Direct Addressing Mode
- In this mode, effective address of operand is present in instruction itself.
- Single memory reference to access data
- No additional calculation to find the effective address of the operand
- For Example: Add R1, 4000, In this the 4000 is effective address of operand.
7) Indirect Addressing Mode
- The address field of an instruction specifies the address of a memory location that contains the address of the operand.
- When the abbreviated address is used large physical memory can be addressed with the relatively small number of bits.
- Slow acquire operand because of an additional memory access.
- Example: EA = M[IR )address)]
The address field of instruction specifies the part of the address which can be used along with a designed register to calculate the address of the operand.
- Address field of the instruction is short
- Large physical memory can be accessed with a small number of address bits.
- There are three addressing mode
There are three different other register addressing mode:
- PC Relative addressing Mode (EA = IX + IR(address))
- Indexed Addressing Mode (EA = IX + IR (address)) / [IX is indexed register]
- Base Register Addressing Mode (EA = A + (R)