In any microprocessor instruction, the source and the destination can be a register, memory content or an 8 bit number. In fact, these source and destination are operands. The various forms of specifying the operands are called the addressing mode.
Four types of addressing modes are explained in this article.
1. Immediate Addressing
2. Register Addressing
3. Direct Addressing
4. Indirect Addressing
In immediate addressing mode, the operand is readily available with the instruction.
For example, in the following instruction,
MVI A, 05
The data, 05 is moving to accumulator.
In this mode, operand is in any one of the general purpose register. So, the name of the register is given as operand. For example, in the following instruction,
MOV A, B
The data contained in the register, B is moving to accumulator, A.
In this mode, the operand is available in the memory. So, the address of the memory location should be given as operand. Normally, these types of instructions will have 3 bytes.
Consider the following instruction,
LDA 2050
It load the content of the memory location, 2050 to accumulator. Note that here the operand is indicated by its address.
In this mode, the operand is available in memory but its address is indicated by any one of the register pair. Normally, the address is indicated by the HL (two parts of memory address) pair of memory. The name of the register pair is given as operand. Hence it is indirect.
MOV A, M
In the above instruction, M refers to HL pair. It moves the content of the memory location indicated by HL pair to accumulator.
The following instruction,
LDAX B
move the content of the memory location indicated by the register pair, BC.
What is hard computing? Hard computing is a traditional computing. It requires a precisely stated…
Soft computing is a problem solving technology. It tends to fuse synergically different aspects of…
Cluster computing is an approach to achieve high performance, reliability or high throughput computing by…
Magnitude Comparator is a combinational circuit capable of comparing the relative magnitude of two binary…
Full subtractor is a combinational circuit capable of performing subtraction on two bits namely minuend…
Half-subtractor is a combinational circuit capable of subtracting a binary number from another binary number.…