Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
CXD instruction HLASM Language Reference SC26-4940-06 |
|
The CXD instruction reserves a fullword area in storage. The linker
or loader inserts into this area the total length of all external
dummy sections specified in the source modules that are assembled
and linked into one program. If a control section has not previously
been established, CXD initiates an unnamed (private) control section.
>>-+--------+--CXD--------------------------------------------->< '-symbol-'
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. 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: ROUTINE A
ROUTINE B
ROUTINE C
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. |
Copyright IBM Corporation 1990, 2014
|