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


Literal constants

HLASM Language Reference
SC26-4940-06

Literal constants let you define and refer to data directly in machine instruction operands. You do not need to define a constant separately in another part of your source module. The differences between a literal, a data constant, and a self-defining term are described in Literals.

A literal constant is specified in the same way as the operand of a DC instruction. The general rules for the operand subfields of a DC instruction also apply to the subfield of a literal constant. Moreover, the rules that apply to the individual types of constants apply to literal constants as well.

However, literal constants differ from DC operands in the following ways:
  • Literals must be preceded by an equal sign.
  • Multiple operands are not allowed.
  • The duplication factor must not be zero.
  • Symbols used in the duplication factor or length modifier must be previously defined. Scale and Exponent modifiers do not need pre-definition.
  • If an address-type literal constant specifies a duplication factor greater than one and a nominal value containing the location counter reference, the value of the location counter reference is not incremented, but remains the same for each duplication.
  • The assembler groups literals together by size. If you use a literal constant, the alignment of the constant can be different from that for an explicit constant. See Literal pool.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014