GPRs and Addressing



Addressability is another aspect that the High Level programmer is divorced from but its understanding is paramount in Assembler.

To allow programs to be re-locatable, memory is addressed indirectly by a combination of a Base Register and Displacement as indicated by the two instruction type examples opposite.

The Base Register (b) could contain either the module's base address, or some other memory address such as the start of an array, or a location outside the current modules addressable range, like a passed parameter address.

The Displacement is the distance beyond the base, with zero being the first byte.

Addressability

Copyright © Legac-e Education 2015-