HLASM Language Reference
HLASM Language Reference HLASM Language Reference
DSECT Instruction DSECT Instruction 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─┘ symbol is one of the following: An ordinary symbol A variable symbol that has been assigned a character string with a value that is valid for an ordinary symbol A sequence 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: 1. The assembler language statements that appear in a dummy section are not assembled into object code. 2. When establishing the addressability of a dummy section, the symbol in the name field of the DSECT instruction, or any symbol defined in the dummy section can be specified in a USING instruction. 3. A symbol defined in a dummy section can be specified in an address constant only if the symbol is paired with another symbol from the same dummy section, and if the symbols have opposite signs. To effect references to the storage area defined by a dummy section, do the following: Provide either: 178 HLASM V1R5 Language Reference
DSECT Instruction – An ordinary or labeled USING statement that specifies both a general register that the assembler can use as a base register for the dummy section, and a value from the dummy section that the assembler may assume the register contains, or – A dependent or labeled dependent USING statement that specifies a supporting base address (for which there is a corresponding ordinary USING statement) that lets the assembler determine a base register and displacement for the dummy section, and a value from the dummy section that the assembler may assume is the same as the supporting base address Ensure that the base register is loaded with either: – The actual address of the storage area if an ordinary USING statement or a labeled USING statement was specified, or – The base address specified in the corresponding ordinary USING statement if a dependent or labeled dependent USING statement was specified. 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 54 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 1. Places a record in an area of storage 2. Places the address of the storage area in general register 3 3. Branches to Assembly-2 to process the record 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. Because the symbols in the DSECT are defined relative to the beginning of the DSECT, 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. Chapter 5. Assembler Instruction Statements 179
- Page 148 and 149: DC Instruction duplication_factor c
- Page 150 and 151: DC Instruction Figure 33 (Page 2 of
- Page 152 and 153: DC Instruction With EBCDIC spaces
- Page 154 and 155: DC Instruction Further information
- Page 156 and 157: DC Instruction | Symbols used in su
- Page 158 and 159: DC Instruction The length attribute
- Page 160 and 161: DC Instruction Notes: 1. Don't conf
- Page 162 and 163: DC Instruction—Character Constant
- Page 164 and 165: DC Instruction—Character Constant
- Page 166 and 167: DC Instruction—Graphic Constant r
- Page 168 and 169: DC Instruction—Fixed-Point Consta
- Page 170 and 171: DC Instruction—Fixed-Point Consta
- Page 172 and 173: DC Instruction—Decimal Constants
- Page 174 and 175: DC Instruction—Address Constants
- Page 176 and 177: DC Instruction—Address Constants
- Page 178 and 179: DC Instruction—Offset Constant re
- Page 180 and 181: DC Instruction—Length Constant Le
- Page 182 and 183: DC Instruction—Hexadecimal Floati
- Page 184 and 185: DC Instruction—Hexadecimal Floati
- Page 186 and 187: DC Instruction—Hexadecimal Floati
- Page 188 and 189: DC Instruction—Binary Floating-Po
- Page 190 and 191: DC Instruction—Binary Floating-Po
- Page 192 and 193: DROP Instruction DROP Instruction T
- Page 194 and 195: DS Instruction USING DSECTA,14 ALBL
- Page 196 and 197: DS Instruction The size of a storag
- Page 200 and 201: DXD Instruction ASEMBLY2 CSECT USIN
- Page 202 and 203: END Instruction change but no addit
- Page 204 and 205: EQU Instruction EQU Instruction The
- Page 206 and 207: EQU Instruction 5. The length attri
- Page 208 and 209: EXITCTL Instruction sequence_symbol
- Page 210 and 211: ISEQ Instruction must be greater th
- Page 212 and 213: LOCTR Instruction A CSECT , See not
- Page 214 and 215: LTORG Instruction If symbol is an o
- Page 216 and 217: MNOTE Instruction When two literals
- Page 218 and 219: OPSYN Instruction ,ERROR, SEV 1 An
- Page 220 and 221: ORG Instruction AFTER is defined in
- Page 222 and 223: ORG Instruction If you specify mult
- Page 224 and 225: POP Instruction POP Instruction The
- Page 226 and 227: PRINT Instruction Note: If the next
- Page 228 and 229: Process Statement Process Statement
- Page 230 and 231: REPRO Instruction NOPRINT instructs
- Page 232 and 233: RSECT Instruction 4. AMODE or RMODE
- Page 234 and 235: START Instruction START Instruction
- Page 236 and 237: TITLE Instruction The name value is
- Page 238 and 239: USING Instruction Only the characte
- Page 240 and 241: USING Instruction Base Registers fo
- Page 242 and 243: USING Instruction If register 0 is
- Page 244 and 245: USING Instruction A variable symbo
- Page 246 and 247: USING Instruction In this MVC instr
DSECT Instruction<br />
– An ordinary or labeled USING statement that specifies both a general<br />
register that the assembler can use as a base register for the dummy<br />
section, and a value from the dummy section that the assembler may<br />
assume the register contains, or<br />
– A dependent or labeled dependent USING statement that specifies a<br />
supporting base address (for which there is a corresponding ordinary<br />
USING statement) that lets the assembler determine a base register and<br />
displacement for the dummy section, and a value from the dummy section<br />
that the assembler may assume is the same as the supporting base<br />
address<br />
Ensure that the base register is loaded with either:<br />
– The actual address of the storage area if an ordinary USING statement or a<br />
labeled USING statement was specified, or<br />
– The base address specified in the corresponding ordinary USING statement<br />
if a dependent or labeled dependent USING statement was specified.<br />
The values assigned to symbols defined in a dummy section are relative to the<br />
initial statement of the section. Thus, all machine instructions that refer to names<br />
defined in the dummy section refer, at execution time, to storage locations relative<br />
to the address loaded into the register.<br />
Figure 54 shows an example of how to code the DSECT instruction. The sample<br />
code is referred to as “Assembly-2.”<br />
Assume that two independent assemblies (Assembly-1 and Assembly-2) have been<br />
loaded and are to be run as a single overall program. Assembly-1 is a routine that<br />
1. Places a record in an area of storage<br />
2. Places the address of the storage area in general register 3<br />
3. Branches to Assembly-2 to process the record<br />
The storage area from Assembly-1 is identified in Assembly-2 by the dummy<br />
control section (DSECT) named INAREA. Parts of the storage area that you want<br />
to work with are named INCODE, OUTPUTA, and OUTPUTB. The statement<br />
USING INAREA,3 assigns general register 3 as the base register for the INAREA<br />
DSECT. General register 3 contains the address of the storage area. Because the<br />
symbols in the DSECT are defined relative to the beginning of the DSECT, the<br />
address values they represent are, at the time of program execution, the actual<br />
storage locations of the storage area that general register 3 addresses.<br />
Chapter 5. Assembler Instruction Statements 179