Addressing Mode

From CDOT Wiki
Revision as of 12:27, 8 January 2014 by Chris Tyler (talk | contribs) (Created page with 'Category:Computer Architecture ''Addressing modes'' specify how the data/arguments for an instruction are retrieved/stored. Addressing modes may include: * Implicit - A…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Addressing modes specify how the data/arguments for an instruction are retrieved/stored.

Addressing modes may include:

  • Implicit - Any arguments are implied by the instruction (e.g., a return-from-subroutine instruction, which pop a value off the stack and place it in the program counter).
  • Register - Data is read from (or written to) a register.
  • Absolute - An exact memory address is specified.
  • Indirect - A memory address is specified, which contains the address of the memory for reading/writing. Effectively, the argument in this addressing mode is the address of a pointer to the actual data.
  • Base plus offset - An absolute or indirect memory address is specified as a base address along with a register that contains an offset value. The base and offset values are added together, and the resulting address is used to read/write data.
  • Relative - A signed or unsigned offset is added to the current program counter to obtain a new address. This is most often used for jumps but is also used for some kinds of data access.
  • Stack - Values are pushed to or popped from the stack.