What is an addressing mode Identify the addressing mode for
Solution
Addressing mode is a way to address an operand. Operand means data on which we are going to operate or source data. It can be a direct address of memory, it can be register names, it can be any numerical data etc. e.g. MOV A,#6AH
In this example 6AH is operand. After execution of this instruction 6AH is added to the accumulator. We can execute this instruction by using 5 different ways. We can use 5 different addressing modes to execute this instruction. Following are the different type of addressing modes.
ü Immediate addressing mode
ü Direct addressing mode
ü Register addressing mode
ü Register indirect addressing mode
ü Indexed addressing mode.
MOV P1, #30H Immediate
ADD A,#20 Immediate
MOV R7, A Register
MOV @R0, A Indirect
INC DPTR Register
ORL 20H, #30H Immediate
CJNE A, 30H, NEXT INDIRECT
PUSH 20H DIRECT
MOV 20H, 0H DIRECT
MOV 00H, @R0 REGISTER INDIRECT
MOVC A, @A+DPTR INDEXED
MOVX A, @DPTR REGISTER INDIRECT
SJMP FORWARD RELATIVE
DJNZ R4, BACK RELATIVE
JUMP @A+DPTR INDEXED
