HLASM Language Reference
HLASM Language Reference HLASM Language Reference
DC Instruction—Graphic Constant results in the assembled character string value of: D1D1D1 Examples of graphic constants are: DBCS1 DC G'' DBCS2 DC GL1'' DBCS3 DC GL4'' Because the length attribute does not include the SO and SI, the length attribute of DBCS1 is 6. The length modifier of 10 for DBCS2 causes padding of 2 double-byte spaces at the right of the nominal value. The length modifier of 4 for DBCS3 causes truncation after the first 2 double-byte characters. The length attribute of a graphic constant must be a multiple of 2. Type Attribute of G-Type Constant: Don't confuse the G-type constant character with the type (data) attribute of a graphic constant. The type attribute of a graphic constant is @, not G. See the general discussion about data attributes on page 324, and “Type Attribute (T')” on page 328. Figure 40. Graphic Constants Subfield Value Example Result 1. Duplication factor Allowed DC 3G'' Object code X'42C142C142C1' 2. Type G 3. Type Extension Not allowed | 4. Program type Allowed 5. Modifiers Implicit length: (length modifier not present) Alignment: Range for length: 6. Nominal value Represented by: Enclosed by: Number of values per operand: Padding: Truncation of assembled value: As needed (twice the number of DBCS characters) Byte 2 to 256, must be multiple of 2 (byte length) bit length not allowed DBCS characters delimited by SO and SI Single quotation marks One With DBCS spaces at right (X'4040') At right GC DC G'' L'GC = 4 DC G'
DC Instruction—Hexadecimal Constant Hexadecimal Constant—X Hexadecimal constants generate large bit patterns more conveniently than binary constants. Also, the hexadecimal values you specify in a source module let you compare them directly with the hexadecimal values generated for the object code and address locations printed in the program listing. Each hexadecimal digit (see ▌1▐ in Figure 41) specified in the nominal value subfield is assembled into four bits (their binary patterns can be found in “Self-Defining Terms” on page 34). The implicit length in bytes of a hexadecimal constant is then half the number of hexadecimal digits specified (assuming that a high-order hexadecimal zero is added to an odd number of digits). See ▌2▐ and ▌3▐ in Figure 41. An 8-digit hexadecimal constant provides a convenient way to set the bit pattern of a full binary word. The constant in the following example sets the first and third bytes of a word with all 1 bits. DS F TEST DC X'FFFF' The DS instruction sets the location counter to a fullword boundary. (See “DS Instruction” on page 174.) The next example uses a hexadecimal constant as a literal and inserts a byte of all 1 bits into the rightmost 8 bits of register 5. IC 5,=X'FF' In the following example, the digit A is dropped, because 5 hexadecimal digits are specified for a length of 2 bytes: ALPHACON DC 3XL2'A6F4E' Generates 6F4E 3 times The resulting constant is 6F4E, which occupies the specified 2 bytes. It is duplicated three times, as requested by the duplication factor. If it had been specified as: ALPHACON DC 3X'A6F4E' Generates A6F4E 3 times the resulting constant would have a hexadecimal zero in the leftmost position. A6F4EA6F4EA6F4E Figure 41 (Page 1 of 2). Hexadecimal Constants Subfield Value Example Result 1. Duplication factor Allowed 2. Type X 3. Type Extension Not allowed | 4. Program type Allowed 5. Modifiers Implicit length: (length modifier not present) As needed Alignment: Byte X DC X'FFA2' Y DC X'FA2' L'X = 3 ▌2▐ L'Y = 3 ▌2▐ Chapter 5. Assembler Instruction Statements 147
- 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 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 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
- 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
DC Instruction—Hexadecimal Constant<br />
Hexadecimal Constant—X<br />
Hexadecimal constants generate large bit patterns more conveniently than binary<br />
constants. Also, the hexadecimal values you specify in a source module let you<br />
compare them directly with the hexadecimal values generated for the object code<br />
and address locations printed in the program listing.<br />
Each hexadecimal digit (see ▌1▐ in Figure 41) specified in the nominal value<br />
subfield is assembled into four bits (their binary patterns can be found in<br />
“Self-Defining Terms” on page 34). The implicit length in bytes of a hexadecimal<br />
constant is then half the number of hexadecimal digits specified (assuming that a<br />
high-order hexadecimal zero is added to an odd number of digits). See ▌2▐ and<br />
▌3▐ in Figure 41.<br />
An 8-digit hexadecimal constant provides a convenient way to set the bit pattern of<br />
a full binary word. The constant in the following example sets the first and third<br />
bytes of a word with all 1 bits.<br />
DS<br />
F<br />
TEST DC X'FFFF'<br />
The DS instruction sets the location counter to a fullword boundary. (See “DS<br />
Instruction” on page 174.)<br />
The next example uses a hexadecimal constant as a literal and inserts a byte of all<br />
1 bits into the rightmost 8 bits of register 5.<br />
IC<br />
5,=X'FF'<br />
In the following example, the digit A is dropped, because 5 hexadecimal digits are<br />
specified for a length of 2 bytes:<br />
ALPHACON DC 3XL2'A6F4E' Generates 6F4E 3 times<br />
The resulting constant is 6F4E, which occupies the specified 2 bytes. It is<br />
duplicated three times, as requested by the duplication factor. If it had been<br />
specified as:<br />
ALPHACON DC 3X'A6F4E' Generates A6F4E 3 times<br />
the resulting constant would have a hexadecimal zero in the leftmost position.<br />
A6F4EA6F4EA6F4E<br />
Figure 41 (Page 1 of 2). Hexadecimal Constants<br />
Subfield Value Example Result<br />
1. Duplication factor Allowed<br />
2. Type X<br />
3. Type Extension Not allowed<br />
| 4. Program type Allowed<br />
5. Modifiers<br />
Implicit length:<br />
(length modifier<br />
not present)<br />
As needed<br />
Alignment:<br />
Byte<br />
X DC X'FFA2'<br />
Y DC X'FA2'<br />
L'X = 3 ▌2▐<br />
L'Y = 3 ▌2▐<br />
Chapter 5. Assembler Instruction Statements 147