Relative addressing
Relative addressing is the technique of addressing instructions
and data areas by designating their location in relation to the location
counter or to some symbolic location. This
type of addressing is always in bytes—never in bits, words,
or instructions. Thus, the expression
*+4
specifies
an address that is 4 bytes greater than the current value of the location
counter. In the sequence of instructions in the following example,
the location of the CR machine instruction can be expressed in two
ways, ALPHA+2
, or BETA-4
, because
all the machine instructions in the example are 2-byte instructions.
ALPHA LR 3,4
CR 4,6
BCR 1,14
BETA AR 2,3