Addressing Mode

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Addressing Modes

The operands of the instructions can be located either in the main memory or in the CPU registers. If
the operand is placed in the main memory, then the instruction provides the location address in the
operand field. Many methods are followed to specify the operand address. The different
methods/modes for specifying the operand address in the instructions are known as addressing
modes.

Types of Addressing Modes

There are various types of Addressing Modes which are as follows −

Implied mode:
In implied addressing the operand is specified in the instruction itself. In this mode, the operands are
specified implicitly in the definition of the instruction. It is also called as implicit addressing mode.

Examples-

 The instruction “Complement Accumulator” is an implied mode instruction.

 In a stack organized computer, Zero Address Instructions are implied mode instructions.

(since operands are always implied to be present on the top of the stack)

Immediate addressing mode (symbol #):


Data is present in the instruction’s address field in this manner. Like a single format for address
instructions.

Note: Limitation in the immediate mode is that the range of constants are restricted by the size of
the address field.
Example: MOV R #20 (initializes register R to a constant value 20)

Direct addressing/ Absolute addressing Mode (symbol [ ])


In this addressing mode,

The address field of the instruction contains the effective address of the operand. In this
addressing mode the 16 bit effective address of the data is the part of the instruction.

The operand resides in memory and its address is given directly by the address field of the
instruction It is also called as absolute addressing mode.

Example: Add the content of R1 and 1001 and store back to R1:

Add R1, [1001]

Here 1001 is the address where the operand is stored.

Indirect addressing Mode (symbol @ or () ):


In this mode address field of instruction contains the address of effective address. Here two
references are required.
1st reference to get effective address.
2nd reference to access the data.

Example:

LOAD R1, @1500

The above instruction is used to load the content of the memory location stored at memory
location 1500 to register R1. In other words, we can say, effective address is stored at
memory location 1500.

You might also like