5) Explain the following addressing modes
1) Register Mode
2) Indirect Mode
3) Immediate mode
4)Absolute mode.
Answers
Answer:
In Indirect addressing mode, address field in the instruction contains the memory location or register where effective address of operand is present. It requires two memory access. It is further classified into two categories: Register Indirect, and MemoryIndirect.
Immediate Addressing
An immediate operand has a constant value or an expression. When an instruction with two operands uses immediate addressing, the first operand may be a register or memory location, and the second operand is an immediate constant. The first operand defines the length of the data.
Indexed addressing mode: The operand’s offset is the sum of the content of an index register SI or DI and an 8 bit or 16 bit displacement.
Register mode: In register addressing the operand is placed in one of 8 bit or 16 bit general purpose registers. The data is in the register that is specified by the instruction.
Here one register reference is required to access the data.