[Com.] Indirect Addressing

Indirect addressing:

the address of the data is held in an intermediate location so that the address is first ‘looked up’ and then used to locate the data itself.

indirectaddressing

  1. A specific block of memory will be used by the loader to store the starting address of every subroutine within the library. This block of memory is called a ‘vector table‘. A vector table holds addresses rather than data. The application is informed by the loader of the location of the vector table itself.
  2. In order for the CPU to get to the data, the code first of all fetches the content at RAM location 5002 which is part of the vector table.
  3. The data it contains is then used as the address of the data to be fetched, in this case the data is at location 9000

A typical assembly language instruction would look like:

MOV A, @5002

This looks to location 5002 for an address. That address is then used to fetch data and load it into the accumulator. In this instance it is 302.

Reference:

http://www.teach-ict.com/as_as_computing/ocr/H447/F453/3_3_8/lowlevel/miniweb/pg4.htm

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s