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


Literal pool

HLASM Language Reference
SC26-4940-06

A literal pool is created under the following conditions:
  • Immediately after an LTORG instruction.
  • If no LTORG instruction is specified, and no LOCTRs are used in the first control section, a literal pool generated after the END statement is created at the end of the first control section, and appears in the listing after the END statement.
  • If no LTORG instruction is specified, and LOCTRs are used in the first control section, a literal pool generated after the END statement is created at the end of the most recent LOCTR segment of the first section, and appears in the listing after the END statement.
  • To force the literal pool to the end of the control section when using LOCTRs, you must resume the last LOCTR of the CSECT before the LTORG statement (or before the END statement if no LTORG statement is specified).
Each literal pool has five segments into which the literals are stored (a) in the order that the literals are specified, and (b) according to their assembled lengths, which, for each literal, is the total explicit or implied length:
  • The first segment contains all literal constants whose assembled lengths are a multiple of 16.
  • The second segment contains those whose assembled lengths are a multiple of 8, but not of 16.
  • The third segment contains those whose assembled lengths are a multiple of 4, but not a multiple of 8.
  • The fourth segment contains those whose assembled lengths are even, but not a multiple of 4.
  • The fifth segment contains all the remaining literal constants whose assembled lengths are odd.

Since each literal pool is aligned on a SECTALGN alignment, this guarantees that all literals in the second segment are doubleword aligned; in the third segment, fullword aligned; and, in the fourth, halfword aligned. The minimum value of SECALGN is doubleword, so quadword alignment is not guaranteed. No space is wasted except, possibly, at the origin of the pool, and in aligning to the start of the statement following the literal pool.

Literals from the following statements are in the pool, in the segments indicated by the parenthesized numbers:
FIRST    START           0
         .
         MVC             TO,=3F'9'       (3)
         AD              2,=D'7'         (2)
         IC              2,=XL1'8'       (5)
         MVC             MTH,=CL3'JAN'   (5)
         LM              4,5,=2F'1,2'    (2)
         AH              5,=H'33'        (4)
         L               2,=A(ADDR)      (3)
         MVC             FIVES,=XL16'05' (1)

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014