5. Indexed Addressing

Indexed addressing means that the final address for the data is determined by adding an offset to a base address.

Very often, a chunk of data is stored as a complete block in memory.

For example, it makes sense to store arrays as contiguous blocks in memory (contiguous means being next to something without a gap). The array has a 'base address' which is the location of the first element, then an 'index' is used that adds an offset to the base address in order to fetch any other element within the array.

Indexed addressing

 

Index addressing is fast and is excellent for manipulating data structures such as arrays as all you need to do is set up a base address then use the index in your code to access individual elements.

Another advantage of indexed addressing is that if the array is re-located in memory at any point then only the base address needs to be changed. The code making use of the index can remain exactly the same.

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: using indexeded addressing in assembler

 

 

Copyright © www.teach-ict.com