HLASM Language Reference
HLASM Language Reference HLASM Language Reference
DC Instruction | Symbols used in subfield 4 need not be previously defined, except in literals. For | example: | SYM DC FP(Rate5)'35.92' | Rate5 EQU 5 | All expressions in program type must be evaluatable when the DC is processed. | If program type is omitted, the assembler assigns a null to the program type, and | querying the value using the SYSATTRP build-in function returns a null value. Subfield 5: Modifier The syntax for coding the modifier is shown in the subfield format on page 127. You may omit the modifier subfield. Modifiers describe the length in bits or bytes you want for a constant (in contrast to an implied length), and the scaling and exponent for the constant. The three modifiers are: The length modifier (L), that explicitly defines the length in bytes you want for a constant. For example: LENGTH DC XL1'FF' The scale modifier (S), that is only used with the fixed-point or floating-point constants (for details, see “Scale Modifier” on page 138). For example: SCALE DC FS8'35.92' The exponent modifier (E), that is only used with fixed-point or floating-point constants, and indicates the power of 10 by which the constant is to be multiplied before conversion to its internal binary format. For example: EXPON DC EE3'3.414' If multiple modifiers are used, they must appear in this sequence: length, scale, and exponent. For example: ALL3 DC DL7S3E5'2.7182' Symbols used in subfield 5 need not be previously defined, except in literals. For example: SYM DC FS(X)'35.92' X EQU 7 Length Modifier The length modifier indicates the number of bytes of storage into which the constant is to be assembled. It is written as Ln, where n is either a decimal self-defining term or an absolute expression enclosed by parentheses. It must have a positive value. When the length modifier is specified: Its value determines the number of bytes of storage allocated to a constant. It therefore determines whether the nominal value of a constant must be padded or truncated to fit into the space allocated (see “Padding and Truncation of Values” on page 130). 136 HLASM V1R5 Language Reference
DC Instruction No boundary alignment, according to constant type, is provided (see “Alignment of Constants” on page 129). Its value must not exceed the maximum length allowed for the various types of constant defined. | The length modifier must not truncate double-byte data in a C-type constant, | except for bit-length modifiers. The length modifier must be a multiple of 2 in a G-type or CU-type constant. When no length is specified, for character and graphic constants (C and G), hexadecimal constants (X), binary constants (B), and decimal constants (P and Z), the whole constant is assembled into its implicit length. Bit-Length Modifier: The length modifier can be specified to indicate the number of bits into which a constant is to be assembled. The bit-length modifier is written as L.n where n is either a decimal self-defining term, or an absolute expression enclosed in parentheses. It must have a positive value. Such a modifier is sometimes called a “bit-length” modifier, to distinguish it from a “byte-length” modifier. You may not combine byte-length and bit-length modifiers. For example, a 12-bit field must be written L.12, not L1.4. The value of n must lie between 1 and the number of bits (a multiple of 8) that are required to make up the maximum number of bytes allowed in the type of constant being defined. The bit-length modifier can never be used with the CU-, G-, S-, V-, R-, J- and Q-type constants, and cannot be used with the A-type or Y-type constant if the operand is simply or complexly relocatable. When only one operand and one nominal value are specified in a DC instruction, the following rules apply: 1. The bit-length modifier allocates a field into which a constant is to be assembled. The field starts at a byte boundary and can run over one or more byte boundaries, if the bit length is greater than 8. If the field does not end at a byte boundary and if the bit length is not a multiple of 8, the remainder of the last byte is filled with binary zeros. For example, DC FL.12'-1' generates X'FFF'. 2. The nominal value of the constant is assembled into the field: a. Starting at the high order end for the C-, E-, D-, and L-type constants b. Starting at the low-order end for the remaining types of constants that support a bit-length modifier 3. The nominal value is padded or truncated to fit the field (see “Padding and Truncation of Values” on page 130). | Note that “padding” is not the same as “filling.” In padding, the designated bit | field is completed according to the rules for the constant type. Filling is always | binary zeros placed at the right end of an incomplete byte. | C-type character constants are padded with EBCDIC spaces (hexadecimal | X'40', and CA-type character constants are padded with ASCII spaces | (hexadecimal X'20'). Other constant types are padded either by sign | extension or with zeros, according to the type of the constant. Chapter 5. Assembler Instruction Statements 137
- Page 106 and 107: Operand Entries Registers You can s
- Page 108 and 109: Operand Entries “Program Structur
- Page 110 and 111: Operand Entries Format │ Coded or
- Page 112 and 113: Examples of Coded Machine Instructi
- Page 114 and 115: Examples of Coded Machine Instructi
- Page 116 and 117: Examples of Coded Machine Instructi
- Page 118 and 119: Examples of Coded Machine Instructi
- Page 120 and 121: Chapter 5. Assembler Instruction St
- Page 122 and 123: *PROCESS Statement *PROCESS Stateme
- Page 124 and 125: ACONTROL Instruction ►►──
- Page 126 and 127: ACONTROL Instruction FLAG(PAGE0) in
- Page 128 and 129: AINSERT Instruction character_strin
- Page 130 and 131: AMODE Instruction alias_string is t
- Page 132 and 133: CATTR Instruction Figure 25. AMODE/
- Page 134 and 135: CATTR Instruction | statements for
- Page 136 and 137: CCW1 Instruction data_count is an a
- Page 138 and 139: CEJECT Instruction If symbol is an
- Page 140 and 141: CNOP Instruction Figure 29 (Page 2
- Page 142 and 143: COPY Instruction In the following e
- 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 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 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
DC Instruction<br />
No boundary alignment, according to constant type, is provided (see “Alignment<br />
of Constants” on page 129).<br />
Its value must not exceed the maximum length allowed for the various types of<br />
constant defined.<br />
| The length modifier must not truncate double-byte data in a C-type constant,<br />
| except for bit-length modifiers.<br />
The length modifier must be a multiple of 2 in a G-type or CU-type constant.<br />
When no length is specified, for character and graphic constants (C and G),<br />
hexadecimal constants (X), binary constants (B), and decimal constants (P and Z),<br />
the whole constant is assembled into its implicit length.<br />
Bit-Length Modifier: The length modifier can be specified to indicate the number<br />
of bits into which a constant is to be assembled. The bit-length modifier is written<br />
as L.n where n is either a decimal self-defining term, or an absolute expression<br />
enclosed in parentheses. It must have a positive value. Such a modifier is<br />
sometimes called a “bit-length” modifier, to distinguish it from a “byte-length”<br />
modifier. You may not combine byte-length and bit-length modifiers. For example, a<br />
12-bit field must be written L.12, not L1.4.<br />
The value of n must lie between 1 and the number of bits (a multiple of 8) that are<br />
required to make up the maximum number of bytes allowed in the type of constant<br />
being defined. The bit-length modifier can never be used with the CU-, G-, S-, V-,<br />
R-, J- and Q-type constants, and cannot be used with the A-type or Y-type constant<br />
if the operand is simply or complexly relocatable.<br />
When only one operand and one nominal value are specified in a DC instruction,<br />
the following rules apply:<br />
1. The bit-length modifier allocates a field into which a constant is to be<br />
assembled. The field starts at a byte boundary and can run over one or more<br />
byte boundaries, if the bit length is greater than 8.<br />
If the field does not end at a byte boundary and if the bit length is not a<br />
multiple of 8, the remainder of the last byte is filled with binary zeros. For<br />
example, DC FL.12'-1' generates X'FFF'.<br />
2. The nominal value of the constant is assembled into the field:<br />
a. Starting at the high order end for the C-, E-, D-, and L-type constants<br />
b. Starting at the low-order end for the remaining types of constants that<br />
support a bit-length modifier<br />
3. The nominal value is padded or truncated to fit the field (see “Padding and<br />
Truncation of Values” on page 130).<br />
| Note that “padding” is not the same as “filling.” In padding, the designated bit<br />
| field is completed according to the rules for the constant type. Filling is always<br />
| binary zeros placed at the right end of an incomplete byte.<br />
| C-type character constants are padded with EBCDIC spaces (hexadecimal<br />
| X'40', and CA-type character constants are padded with ASCII spaces<br />
| (hexadecimal X'20'). Other constant types are padded either by sign<br />
| extension or with zeros, according to the type of the constant.<br />
Chapter 5. Assembler Instruction Statements 137