Location counter reference
You can refer to the current value of the location counter at any
place in a program by using an asterisk as a term in an operand. The
asterisk is a relocatable term, specified according to the following
rules:
- The asterisk can be specified only in the operands of:
- Machine instructions
- DC and DS instructions
- EQU, ORG, and USING instructions
- It can also be specified in literal constants. See Literals. For example:
generates three identical address constants, each with value A(THERE).THERE L 1,=3A(*)
The value of the location counter reference (*) is the same as the value of the symbol THERE, the current value of the location counter of the control section in which the asterisk (*) is specified as a term. The asterisk has the same value as the address of the first byte of the instruction in which it appears. For example:
where the value ofHERE B *+8
*
is the value ofHERE
.
For the value of the asterisk in address constants with duplication factors, see Subfield 1: Duplication Factor of DC instruction, and Address constants—A and Y. For a discussion of location counter references in literals, see Subfield 1: Duplication Factor.