HLASM Language Reference
HLASM Language Reference HLASM Language Reference
DS Instruction USING DSECTA,14 ALBL1 USING DSECTA,14 USING DSECTB,ALBL1.A . . ALBL2 USING DSECTA,ALBL1.A . BLBL1 USING DSECTA,ALBL2.A+4 . DROP ALBL2 . DSECTA DSECT A DS A DSECTB DSECT B DS A A DROP instruction is not needed: If the base address is being changed by a new ordinary USING instruction, and the same base register is assigned. However, the new base address must be loaded into the base register by an appropriate sequence of instructions. If the base address is being changed by a new labeled USING instruction or a new labeled dependent USING instruction, and the same USING label is assigned; however, the correct base address must be loaded into the base register specified in the USING instruction by an appropriate sequence of instructions. At the end of a source module DS Instruction The DS instruction: Reserves areas of storage Provides labels for these areas Uses these areas by referring to the symbols defined as labels If a control section has not previously been established, DS will initiate an unnamed (private) control section ┌─,───────┐ ►►──┬────────┬──DS─── ▼ ─operand─┴────────────────────────────────────►◄ └─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 If symbol denotes an ordinary symbol, the ordinary symbol represents the address of the first byte of the storage area reserved. If several operands are 174 HLASM V1R5 Language Reference
DS Instruction specified, the first storage area defined is addressable by the ordinary symbol. The other storage areas can be reached by relative addressing. operand is an operand of six subfields. The first five subfields describe the attributes of the symbol. The sixth subfield provides the nominal values that determine the implicit lengths; however no constants are generated. A DS operand has this format: ►►──┬────────────────────┬──type──┬────────────────┬────────────────► └─duplication_factor─┘ └─type_extension─┘ ►──┬──────────────┬──┬──────────┬──nominal_value───────────────────►◄ | └─program_type─ ┘ └─modifier─┘ The format of the DS operand is identical to that of the DC operand; exactly the same subfields are used and are written in exactly the same sequence as they are in the DC operand. For more information about the subfields of the DC instruction, see “DC Instruction” on page 126. Unlike the DC instruction, the DS instruction causes no data to be assembled. Therefore, you do not have to specify the nominal value (sixth subfield) of a DS instruction operand. The DS instruction is the best way of symbolically defining storage for work areas, input/output buffers, etc. Although the formats are identical, there are two differences in the specification of subfields. They are: The nominal value subfield is optional in a DS operand, but it is mandatory in a DC operand. If a nominal value is specified in a DS operand, it must be valid. The maximum length that can be specified for the character (C) and hexadecimal (X) type areas is 65,535 bytes rather than 256 bytes for the same DC operands. The maximum length for the graphic (G) type is 65,534 bytes. If symbol denotes an ordinary symbol, the ordinary symbol, as with the DC instruction: Has an address value of the first byte of the area reserved, after any boundary alignment is done Has a length attribute value, depending on the implicit or explicit length of the type of area reserved If the DS instruction is specified with more than one operand or more than one nominal value in the operand, the label addresses the area reserved for the field that corresponds to the first nominal value of the first operand. The length attribute value is equal to the length explicitly specified or implicit in the first operand. Bytes Skipped for Alignment: Unlike the DC instruction, bytes skipped for alignment are not set to zero. Also, nothing is assembled into the storage area reserved by a DS instruction. No assumption should be made as to the contents of the skipped bytes or the reserved area. Chapter 5. Assembler Instruction Statements 175
- Page 144 and 145: CSECT Instruction symbol in the nam
- Page 146 and 147: DC Instruction ROUTINE B GAMMA DXD
- 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 196 and 197: DS Instruction The size of a storag
- Page 198 and 199: DSECT Instruction DSECT Instruction
- 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
DS Instruction<br />
specified, the first storage area defined is addressable by the ordinary symbol.<br />
The other storage areas can be reached by relative addressing.<br />
operand<br />
is an operand of six subfields. The first five subfields describe the attributes of<br />
the symbol. The sixth subfield provides the nominal values that determine the<br />
implicit lengths; however no constants are generated.<br />
A DS operand has this format:<br />
►►──┬────────────────────┬──type──┬────────────────┬────────────────►<br />
└─duplication_factor─┘<br />
└─type_extension─┘<br />
►──┬──────────────┬──┬──────────┬──nominal_value───────────────────►◄<br />
| └─program_type─ ┘ └─modifier─┘<br />
The format of the DS operand is identical to that of the DC operand; exactly the<br />
same subfields are used and are written in exactly the same sequence as they are<br />
in the DC operand. For more information about the subfields of the DC instruction,<br />
see “DC Instruction” on page 126.<br />
Unlike the DC instruction, the DS instruction causes no data to be assembled.<br />
Therefore, you do not have to specify the nominal value (sixth subfield) of a DS<br />
instruction operand. The DS instruction is the best way of symbolically defining<br />
storage for work areas, input/output buffers, etc.<br />
Although the formats are identical, there are two differences in the specification of<br />
subfields. They are:<br />
The nominal value subfield is optional in a DS operand, but it is mandatory in a<br />
DC operand. If a nominal value is specified in a DS operand, it must be valid.<br />
The maximum length that can be specified for the character (C) and<br />
hexadecimal (X) type areas is 65,535 bytes rather than 256 bytes for the same<br />
DC operands. The maximum length for the graphic (G) type is 65,534 bytes.<br />
If symbol denotes an ordinary symbol, the ordinary symbol, as with the DC<br />
instruction:<br />
Has an address value of the first byte of the area reserved, after any boundary<br />
alignment is done<br />
Has a length attribute value, depending on the implicit or explicit length of the<br />
type of area reserved<br />
If the DS instruction is specified with more than one operand or more than one<br />
nominal value in the operand, the label addresses the area reserved for the field<br />
that corresponds to the first nominal value of the first operand. The length attribute<br />
value is equal to the length explicitly specified or implicit in the first operand.<br />
Bytes Skipped for Alignment: Unlike the DC instruction, bytes skipped for<br />
alignment are not set to zero. Also, nothing is assembled into the storage area<br />
reserved by a DS instruction. No assumption should be made as to the contents of<br />
the skipped bytes or the reserved area.<br />
Chapter 5. Assembler Instruction Statements 175