Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
CSECT instruction HLASM Language Reference SC26-4940-06 |
|
The CSECT instruction initiates an executable control section or
indicates the continuation of an executable control section.
>>-+--------+--CSECT------------------------------------------->< '-symbol-'
The CSECT instruction can be used anywhere in a source module after any ICTL or *PROCESS statements. If it is used to initiate the first executable control section, it must not be preceded by any instruction that affects the location counter and thus causes a control section to be initiated. If symbol denotes an ordinary symbol, the ordinary symbol identifies the control section. If several CSECT instructions within a source module have the same symbol in the name field, the first occurrence initiates the control section and the rest indicate the continuation of the control section. The ordinary symbol denoted by symbol represents the address of the first byte in the control section, and has a length attribute value of 1. If symbol is not specified, or if name is a sequence symbol, the CSECT instruction initiates, or indicates the continuation of the unnamed control section. If the first control section is initiated by a START instruction, the CSECT instruction which continues the section must have the same name as the START instruction.
The beginning of a control section is aligned on a boundary determined
by the SECTALGN option. However, when an interrupted control section
is continued using the CSECT instruction, the location counter last
specified in that control section is continued. Consider the coding
in Figure 1:
Figure 1. How the location counter works
ALPHA START ┐ ┌───────────────────────┐ BALR 12,0 ├───────────────────────────>│ ALPHA │ USING │ ┌────────────────────────>│ │ . │ │ │ │ . ┘ │ │ │ NEWCSECT CSECT ┐ │ ├ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┤ . ├──┼────────────────────────>│ NEWCSECT │ . │ │ │ │ . ┘ │ │ │ ALPHA CSECT ┐ │ │ │ . ├──┘ │ │ . │ │ │ . ┘ │ │ The source statements following a CSECT instruction that either initiate or indicate the continuation of a control section are assembled into the object code of the control section identified by that CSECT instruction. The end of a control section or portion of a control section is
marked by:
The CSECT instruction can interact with any LOCTR instructions that are present. For more information about this interaction, see LOCTR instruction. |
Copyright IBM Corporation 1990, 2014
|