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.
- 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.
- 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.
- 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.