2. What is addressing mode?
Method to specify the operand of an instruction.
The job of a microprocessor is to execute a set of
instructions stored in memory to perform a
specific task.
It is a term that describes the address of an
operand that is stored in memory.
3. What is addressing mode?
In Addressing mode, the operations mainly deals with the
following:
1. Operation code(opcode) specify what is action is to be done
2. Operands specify or deal with which datum is to be used during the
operation.
4. Types ??
Immediate Addressing mode Indexed-Indirect Addressing
Direct Addressing Relative Addressing
Register Addressing Zero Page Addressing
Register Indirect addressing Present page Addressing
Indexed addressing Base Register addressing
5. Immediate addressing mode
With immediate addressing mode, the actual data to be used
as the operand is included in the instruction itself.
Instead of address field, an operand field is present that contains
the operand.
Eg.
ADD 10 will increment the value stored in the accumulator by 10.
MOV R #20 initializes register R to a constant value 20.
6. Direct Addressing
The address field of the instruction contains the effective address of the
operand.
Only one reference to memory is required to fetch the operand.
It is also called as absolute addressing mode.
ADD X will increment the value stored in
the accumulator by the value stored at memory location X.
AC ← AC + [X]
7. Register Addressing/Register Direct
Addressing
The operand is contained in a register set.
The address field of the instruction refers to a CPU register that contains the operand.
No reference to memory is required to fetch the operand.
Eg.
ADD R will increment the value stored in the accumulator by the content of register R.
AC ← AC + [R]
8. Register Indirect addressing
The address field of the instruction refers to a CPU register that contains the
effective address of the operand.
Only one reference to memory is required to fetch the operand.
Example-
ADD R will increment the value stored in the accumulator by the content of
memory location specified in register R.
AC ← AC + [[R]]
9. Indexed addressing
Effective address of the operand is obtained by adding the content of index register
with the address part of the instruction.
Effective Address = Content of Index Register + Address part of the instruction
10. Indexed indirect addressing
It is also Indirect Addressing Mode Except that the
address part of the instruction is added to the
contents of the index register to determine the
address where EA is stored in the memory.
11. Indirect Indexed addressing
The value stored in the memory location specified by
the address part of the instructions is added to the
contents of the index register to get the EA.
12. Relative Addressing
Effective address of the operand is
obtained by adding the content of
program counter with the address
part of the instruction.
EA= Content of Program Counter +
Address part of the instruction
13. Zero Page Addressing
Zero-Page is an addressing mode that is only capable of addressing the
first 256 bytes of the CPU's memory map.
You can think of it as absolute addressing for the first 256 bytes. The
instruction LDA $35 will put the value stored in memory location $35 into
A.
The advantage of zero-page are two - the instruction takes one less byte
to specify, and it executes in less CPU cycles.
Most programs are written to store the most frequently used variables in
the first 256 memory locations so they can take advantage of zero page
addressing.
14. Present page Addressing
The operand resides in memory within the same memory page.
Program Counter(PC) always holds the address (AD) of the next
instruction.
Eg. PC(H) + AD 8
Where, PC(H) :- 8 high-order bits of PC.
AD 8 :- 8 bits address of the instruction
Result : - the address of operand of 16 bits address, catenated with the
address part of the instruction.
15. Base Register addressing
Effective address of the operand is obtained by adding the content of
base register with the address part of the instruction.
Effective Address = Content of Base Register + Address part of the
instruction
16. Bibliography
M. Morris Mano. 2016, Pearson India Education services Pvt.
Ltd. Digital logic and Computer design.
https://www.gatevidyalay.com/addressing-modes/
https://edux.pjwstk.edu.pl/mat/264/lec/index58.html
https://en.wikipedia.org/wiki/Addressing_mode
Editor's Notes
Give the examples of payment mode
For example, if we wanted to add the numbers 1 and 2 and get a result, mathematically we would likely write this as 1 + 2. In this case, our operator is (+), or the addition, and our operands are the numbers 1 and 2.