Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
DSECT instruction HLASM Language Reference SC26-4940-06 |
|
The DSECT instruction identifies the beginning or continuation
of a dummy control section. One or more dummy sections can be defined
in a source module.
>>-+--------+--DSECT------------------------------------------->< '-symbol-'
The DSECT instruction can be used anywhere in a source module after the ICTL instruction. If symbol denotes an ordinary symbol, the ordinary symbol identifies the dummy section. If several DSECT instructions within a source module have the same symbol in the name field, the first occurrence initiates the dummy section and the rest indicate the continuation of the dummy section. The ordinary symbol denoted by symbol represents the address of the first byte in the dummy section, and has a length attribute value of 1. If symbol is not specified, or if name is a sequence symbol, the DSECT instruction initiates or indicates the continuation of the unnamed control section. The location counter for a dummy section is always set to an initial value of 0. However, when an interrupted dummy control section is continued using the DSECT instruction, the location counter last specified in that control section is continued. The source statements that follow a DSECT instruction belong to
the dummy section identified by that DSECT instruction.
Notes:
To effect references to the storage area defined by a dummy section,
do the following:
The values assigned to symbols defined in a dummy section are relative to the initial statement of the section. Thus, all machine instructions that refer to names defined in the dummy section refer, at execution time, to storage locations relative to the address loaded into the register. Figure 1 shows an example of how to code the DSECT instruction. The sample code is referred to as "Assembly-2". Assume that two independent assemblies (Assembly-1 and Assembly-2)
have been loaded and are to be run as a single overall program. Assembly-1
is a routine that
The storage area from Assembly-1 is identified in Assembly-2 by
the dummy control section (DSECT) named INAREA. Parts of the storage
area that you want to work with are named INCODE, OUTPUTA,
and OUTPUTB. The statement USING INAREA,3 assigns
general register 3 as the base register for the INAREA DSECT.
General register 3 contains the address of the storage area. The
symbols in the DSECT are defined relative to the beginning of the
DSECT. This means that the address values they represent are, at the
time of program execution, the actual storage locations of the storage
area that general register 3 addresses.
Figure 1. Sample code using the DSECT instruction
(Assembly-2)
|
Copyright IBM Corporation 1990, 2014
|