teach-ict.com logo

THE education site for computer science and ICT

1. Introduction

Every location in memory has its own unique address.

We want to be able to retreive any item currently in memory or be able to store any item at a specific location.

There are several ways for programs to refer to these addresses. These methods are called 'memory address modes'.

 

Memory address modes determine the method used by a running program to access its data or next instruction.

Memory includes the internal registers of the CPU as well as external RAM.

Some memory modes are suited to access the registers whilst other memory modes are better at accessing external RAM.

The main memory modes are

  • Direct (or absolute)
  • Indirect
  • Immediate
  • Indexed

The selection of which is the best memory mode to use at any point is usually hidden from high level language programmers because the compiler or interpreter deals with all the details.

On the other hand, assembly language programmers are very much involved in deciding the mode they want to use at any point in their program.