Instruction - Addressing Mode (Operand Addressing)

> Computer System > Instruction (Machine Language)

1 - About

An addressing mode specifies how to calculate the real memory address of an instruction operand

The term addressing mode is itself subject to different interpretations:

  • either memory address calculation mode
  • or operand accessing mode.

Addressing modes are a part of the instruction set architecture

An addressing mode can specify:

same as Memory - Location ?

Virtual memory, memory pages, and other hardware mapping methods may be layered on top of the addressing modes.

Advertising

3 - Type

The basic addressing modes are:

  • register direct, moving data to or from a specific register;
  • register indirect, using a register as a pointer to memory;
  • program counter-based, using the program counter as a reference point in memory;
  • absolute, in which the memory address is contained in the instruction;
  • and immediate, in which the data is contained in the instruction.

3.1 - Absolute Addressing

In absolute addressing mode, the effective address in memory is part of the instruction.

The address is a numeric label for a specific location in memory.

same as Memory Segment - Offset - (Relative|Effective) address ?

When the memory is byte addressable:

  • The first byte of physical memory is at address 0,
  • the second byte of physical memory is at address 1,
  • the third byte of physical memory is at address 2, etc.

When the memory is word addressable:

  • The first word of physical memory is at address 0,
  • the second word of physical memory is at address 1,
  • the third word of physical memory is at address 2, etc.

Absolute addresses are the fastest form of memory addressing.

Advertising

3.2 - Implicit Address

An implicit address is an address implied by the instruction without explicit declaration.

4 - Multi-level

Multi-level addressing scheme, with:

  • main memory divided into segments or pages and some or all instructions mapping into the current segment(s) or page(s).

5 - Documentation / Reference