HLASM Language Reference
HLASM Language Reference HLASM Language Reference
DC Instruction With EBCDIC spaces on the right (X'40') for the character (C) constants With EBCDIC spaces on the right (X'40') for the Unicode character (CU) constant prior to translation With double-byte spaces on the right (X'4040') for the graphic (G) constants Notes: 1. In floating-point constants (E,D,L), the fraction is extended to occupy the extra space available. 2. Padding is on the left for all constants except the character constant and the graphic constant. Truncation If less space is available than is needed to accommodate the nominal value, the nominal value is truncated and part of the constant is lost. Truncation of the nominal value is: On the left for the binary (B), hexadecimal (X), fixed-point (H and F), and decimal (P and Z) On the right for the character (C) constant, the Unicode character (CU) constant, and the graphic (G) constant On the left for absolute or relocatable address (A and Y), the external address (V), offset (Q), length (J) and PSECT address (R) constants. The actual value stored and any possible truncation is dependent on the values inserted by the linker/binder and the length of the constant. Notes: 1. If significant bits are lost in the truncation of fixed-point constants, error diagnostic message ASMA72E Data item too large is issued. 2. Floating-point constants (E, D, L) are not truncated. They are rounded to fit the space available—see Figure 50 on page 162 for rounding modes. 3. The above rules for padding and truncation also apply when using the bit-length modifier (see “Subfield 5: Modifier” on page 136). 4. Double-byte data in C-type constants cannot be truncated because truncation creates incorrect double-byte data. Error ASMA28E Truncation into double-byte data is not permitted is issued if such truncation is attempted. 5. Truncation of double-byte data in CU-type and G-type constants is permitted because the length modifier restrictions (see “Subfield 5: Modifier” on page 136) ensure that incorrect double-byte data cannot be created by | truncation. However, truncating bit-length constants may create incorrect | double-byte data. Subfield 1: Duplication Factor The syntax for coding the duplication factor is shown in the subfield format on page 127. You may omit the duplication factor. If specified, it causes the nominal value or multiple nominal values specified in a constant to be generated the number of times indicated by the factor. It is applied after the nominal value or values are 132 HLASM V1R5 Language Reference
DC Instruction assembled into the constant. Symbols used in subfield 1 need not be previously defined. This does not apply to literals. The duplication factor can be specified by an unsigned decimal self-defining term or by an absolute expression enclosed in parentheses. The factor must have a positive value or be equal to zero. Notes: 1. A duplication factor of zero is permitted, except for literals, with the following results: No value is assembled. Alignment is forced according to the type of constant specified, if no length attribute is present (see “Alignment of Constants” on page 129). The length attribute of the symbol naming the constant is established according to the implicitly or explicitly specified length. When the duplication factor is zero, the nominal value may be omitted. The alignment is forced, even if the NOALIGN option is specified. When the duplication factor is zero for a literal, the assembler issues message ASMA67S Illegal duplication factor. 2. If duplication is specified for an address constant whose nominal value contains a location counter reference, the value of the location counter reference is incremented by the length of the constant before each duplication is done (see | “Address Constants—A and Y” on page 153). If the duplication factor is zero, | the value of the location counter reference is not incremented by the length of | each constant that would have been generated for a non-zero duplication | factor. Thus, in each of the following two statements, the first generates an | ASMA072E error message for "Data item too large", but the second does not: | A DC Y(,32768-(-A)) | B DC Y(,32768-(-B)) However, if duplication is specified for an address-type literal constant containing a location counter reference, the value of the location counter reference is not incremented by the length of the literal before each duplication is done. The value of the location counter reference is the location of the first byte of the literal in the literal pool, and is the same for each duplication. The location counter value is that of the instruction in which the literal appears for A-type constants, but for S-type constants it is the location where the literal actually appears. 3. The maximum value for the duplication factor is 2 24 −1, or X'FFFFFF' bytes. If the maximum value for the duplication factor is exceeded, the assembler issues message ASMA67S Illegal duplication factor. Subfield 2: Type The syntax for coding the type is shown in the subfield format on page 127. You must specify the type subfield. From the type specification, the assembler determines how to interpret the constant and translate it into the correct format. The type is specified by a single-letter code as shown in Figure 35, the type extension as shown in Figure 36. Chapter 5. Assembler Instruction Statements 133
- Page 102 and 103: Branching with Extended Mnemonic Co
- Page 104 and 105: Symbolic Operation Codes variations
- 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 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 198 and 199: DSECT Instruction DSECT Instruction
- Page 200 and 201: DXD Instruction ASEMBLY2 CSECT USIN
DC Instruction<br />
assembled into the constant. Symbols used in subfield 1 need not be previously<br />
defined. This does not apply to literals.<br />
The duplication factor can be specified by an unsigned decimal self-defining term or<br />
by an absolute expression enclosed in parentheses.<br />
The factor must have a positive value or be equal to zero.<br />
Notes:<br />
1. A duplication factor of zero is permitted, except for literals, with the following<br />
results:<br />
No value is assembled.<br />
Alignment is forced according to the type of constant specified, if no length<br />
attribute is present (see “Alignment of Constants” on page 129).<br />
The length attribute of the symbol naming the constant is established<br />
according to the implicitly or explicitly specified length.<br />
When the duplication factor is zero, the nominal value may be omitted. The<br />
alignment is forced, even if the NOALIGN option is specified.<br />
When the duplication factor is zero for a literal, the assembler issues message<br />
ASMA67S Illegal duplication factor.<br />
2. If duplication is specified for an address constant whose nominal value contains<br />
a location counter reference, the value of the location counter reference is<br />
incremented by the length of the constant before each duplication is done (see<br />
| “Address Constants—A and Y” on page 153). If the duplication factor is zero,<br />
| the value of the location counter reference is not incremented by the length of<br />
| each constant that would have been generated for a non-zero duplication<br />
| factor. Thus, in each of the following two statements, the first generates an<br />
| ASMA072E error message for "Data item too large", but the second does not:<br />
| A DC Y(,32768-(-A))<br />
| B DC Y(,32768-(-B))<br />
However, if duplication is specified for an address-type literal constant<br />
containing a location counter reference, the value of the location counter<br />
reference is not incremented by the length of the literal before each duplication<br />
is done. The value of the location counter reference is the location of the first<br />
byte of the literal in the literal pool, and is the same for each duplication.<br />
The location counter value is that of the instruction in which the literal appears<br />
for A-type constants, but for S-type constants it is the location where the literal<br />
actually appears.<br />
3. The maximum value for the duplication factor is 2 24 −1, or X'FFFFFF' bytes. If<br />
the maximum value for the duplication factor is exceeded, the assembler issues<br />
message ASMA67S Illegal duplication factor.<br />
Subfield 2: Type<br />
The syntax for coding the type is shown in the subfield format on page 127.<br />
You must specify the type subfield. From the type specification, the assembler<br />
determines how to interpret the constant and translate it into the correct format.<br />
The type is specified by a single-letter code as shown in Figure 35, the type<br />
extension as shown in Figure 36.<br />
Chapter 5. Assembler Instruction Statements 133