Tuesday, July 9, 2013

Why addressing modes are required in Microprocessor? Discuss different type of addressing modes with suitable examples.



The method by which the address of source of data or the address of destination of result is specified in the instruction is called addressing mode. In each instruction programmer has to specify 3 things:
·         operation to be performed
·         Address of source data
·         Address of destination of result
Addressing modes are simply required in microprocessor for the ease of programming leading towards efficient and fast processing as it directly effect the timing and steps to access an operand from register or memory.
Intel 8085 uses the following addressing modes:
1.       Direct addressing mode
In this mode the address field of the instruction includes the address of the operand, explicitly mentioned by the programmer or the system itself.
eg:
LDA 2500H  [load the content of memory location 2500H in the accumulator]
Here,
·         LDA (load) is the operation
·         2500H is the address of source (operand)
·         Accumulator is the destination
2.       Register Addressing mode( Register direct)
MOV A, B  [Move the content of register B in A without any modification in the data]
Here,
·         MOV (move) is the operation
·         B is the source of data
·         A is the destination of result
3.       Register Indirect Addressing Mode
In this mode the address field of the instruction specifies a register pair which contains the actual address of operand.
eg:
LDAX D  [move the data from memory location specified by D-E register pair to accumulator]
Here,
·         LDAX (load register pair) is the operation
·         D-E register pair gives the address of the operand
·         A is the destination
4.       Immediate Addressing Mode
In this mode the address field of the instruction specifies the value of the operand that is explicitly set by the programmer.
eg:
MVI B, 05h    [Move 05h in the register B]
Here,
·         MVI (move immediate) is the operation
·         05h is the value of the operand
·         B is the destination register
5.       Implicit Addressing Mode
In this addressing mode the address field of the instruction implicitly mentions the address of source of data and address of destination of result.
eg:
CMA   [complement accumulator]
Here,
·         CMA (complement accumulator) is the operation
·         Accumulator is the source
·         Accumulator is the destination
(NOTE: There are other addressing modes too, but in 8085 we usually have 5 addressing mode in general use)

3 comments: