CXD instruction
- symbol
- Name of the fullword field, or a variable symbol that has been set to the name, or a sequence symbol. If symbol is omitted or is a sequence symbol, the fullword field has no name.
The linker or loader inserts into the fullword-aligned fullword area reserved by the CXD instruction the total length of storage required for all the external dummy sections specified in a program. If the GOFF assembler option is specified, CXD returns the length of the B_PRV class. See DXD instruction.
If symbol denotes an ordinary symbol, the ordinary symbol represents the address of the fullword area. The ordinary symbol denoted by symbol has a length attribute value of 4.
These examples show how external dummy sections can be used:
ALPHA DXD 2DL8
BETA DXD 4FL4
OMEGA CXD
.
.
DC Q(ALPHA)
DC Q(BETA)
.
.
GAMMA DXD 5D
DELTA DXD 10F
ZETA DXD XL22
.
.
DC Q(GAMMA)
DC Q(DELTA)
DC Q(ZETA)
.
.
EPSILON DXD 4H
ZETA DXD 4F
.
.
DC Q(EPSILON,ZETA)
.
.
Each of the three routines is requesting an amount of work area. Routine A wants 2 doublewords and 4 fullwords; Routine B wants 5 doublewords, 10 fullwords, and 22 bytes; Routine C wants 4 halfwords and 4 fullwords. During program linking, identically named dummy sections are combined, retaining their strictest alignment and longest length. For example, Routines B and C both request storage named ZETA: the resulting allocation is 22 bytes on a fullword boundary. When program linking is complete, the sum of these individual dummy external section lengths is placed in the location of the CXD instruction labeled OMEGA. Routine A can then allocate the amount of storage that is specified in the CXD location, and each dummy external section's offset within the allocated storage is found in the Q-type offset constant referencing its name. Q-type offset constants are described at Offset constant—Q.