HLASM Language Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Location counter reference

HLASM Language Reference
SC26-4940-06

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:
    THERE    L   =3A(*)
    generates three identical address constants, each with value A(THERE).
    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:
    HERE     B   *+8
    where the value of * is the value of HERE.

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.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014