HLASM Language Reference
HLASM Language Reference HLASM Language Reference
DC Instruction—Binary Floating-Point Constants To accommodate the definition of both hexadecimal and binary floating-point constants the syntax for coding a DC instruction is: | ►►──DC──┬────────────┬──┬─┬─E─┬──┬───┬─┬──┬──────────────┬──┬──────────┬────► └─dup_factor─ ┘ │ ├ ─D─ ┤ ├ ─B─┤ │ └─program_type─ ┘ └─modifier─┘ | │ └ ─L─ ┘ └ ─H─┘ │ └─LQ───────────┘ ►──┤ nominal_value ├───────────────────────────────────────────────────────►◄ nominal_value (no type extension): ┌─ + ─┐ ├──'──┼─────┼──value──┬──────────┬──'───────────────────────────────────────┤ └─ - ─┘ └─exponent─┘ nominal_value (type extension B): ┌─ + ─┐ ┌─R4───────┐ ├──'──┼─────┼──value──┬──────────┬──┼──────────┼──'─────────────────────────┤ └─ - ─┘ └─exponent─┘ └─R─┬─1─┬──┘ ├─5─┤ ├─6─┤ └─7─┘ nominal_value (type extension H): ┌─ + ─┐ ┌─R1───────┐ ├──'──┼─────┼──value──┬──────────┬──┼──────────┼──'─────────────────────────┤ └─ - ─┘ └─exponent─┘ └─R─┬─4─┬──┘ ├─5─┤ ├─6─┤ └─7─┘ Figure 53. DC Instruction Syntax dup_factor causes the constant to be generated the number of times indicated by the factor. type indicates that the constant is either short, long or extended floating point. type extension the type of conversion required to assemble the constant. Valid values are: null B H Hexadecimal floating-point constant which is converted using the conversion logic of rounding mode 1 and slightly less precise algorithms Binary floating-point constant which is converted allowing all rounding modes Hexadecimal floating-point constant which is converted allowing all rounding modes | program_type | assign a programmer determined 32-bit value to the symbol naming the DC | instruction, if a symbol was present. modifier describes the length, the scaling and the exponent of the nominal_value. The minimum length of the 'H' hexadecimal constant is 12 bits. The minimum length in bits of the binary constant is: 9 Short floating-point constant 168 HLASM V1R5 Language Reference
DC Instruction—Binary Floating-Point Constants 12 Long floating-point constant 16 Extended floating-point constant This minimum length allows for the sign, exponent, the implied unit bit which is considered to be one for normalized numbers and zero for zeros and denormalized numbers. The exponent modifier can be in the range from −2 31 to 2 31 −1 if either B or H is specified as a type extension nominal_value defines the value of the constant and can include the integer, fraction or mixed number followed by an optional signed exponent and an optional explicit rounding mode. The assembler imposes no limits on the exponent values that may be specified. The BFP architecture limits the actual values that can be represented; a warning message is issued whenever a specified value can not be represented exactly. The rounding mode identifies the rounding required when defining a floating-point constant. The valid values are those displayed in Figure 50 on page 162 Note: As binary floating-point does not support scaling, the scale modifier is ignored and a warning message issued if the scaling modifier is specified when | defining a binary floating-point constant. The H type extension causes HLASM to | uses a different conversion algorithm for hexadecimal floating-point data. The | results are correctly rounded for all values. Without the H type extension, some rare | values could be in error by 1 unit in the last place (ulp). Conversion to Binary Floating-Point For decimal to binary floating-point conversion, the assembler conforms to ANSI/IEEE Std 754-1985, IEEE Standard for Binary Floating-Point Arithmetic, dated August 12, 1985, with the following differences: exception status flags are not provided and traps are not supported. | Conversion of values within the represented range is correctly rounded. Conversion of values outside the represented range is as follows. If the resultant value before rounding is larger in magnitude than MAX (the maximum allowed value) as represented in the specified length, then, depending on the rounding mode, either MAX or infinity is generated, along with a warning | message. If the resultant nonzero value is less than Dmin (the minimum allowed value) as represented in the specified length, then, depending on the | rounding mode, either Dmin or zero is generated, along with a warning message. Chapter 5. Assembler Instruction Statements 169
- 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 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 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
- 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
DC Instruction—Binary Floating-Point Constants<br />
To accommodate the definition of both hexadecimal and binary floating-point<br />
constants the syntax for coding a DC instruction is:<br />
|<br />
►►──DC──┬────────────┬──┬─┬─E─┬──┬───┬─┬──┬──────────────┬──┬──────────┬────►<br />
└─dup_factor─ ┘ │ ├ ─D─ ┤ ├ ─B─┤<br />
│ └─program_type─ ┘ └─modifier─┘<br />
|<br />
│ └ ─L─ ┘ └ ─H─┘<br />
│<br />
└─LQ───────────┘<br />
►──┤ nominal_value ├───────────────────────────────────────────────────────►◄<br />
nominal_value (no type extension):<br />
┌─ + ─┐<br />
├──'──┼─────┼──value──┬──────────┬──'───────────────────────────────────────┤<br />
└─ - ─┘<br />
└─exponent─┘<br />
nominal_value (type extension B):<br />
┌─ + ─┐<br />
┌─R4───────┐<br />
├──'──┼─────┼──value──┬──────────┬──┼──────────┼──'─────────────────────────┤<br />
└─ - ─┘<br />
└─exponent─┘<br />
└─R─┬─1─┬──┘<br />
├─5─┤<br />
├─6─┤<br />
└─7─┘<br />
nominal_value (type extension H):<br />
┌─ + ─┐<br />
┌─R1───────┐<br />
├──'──┼─────┼──value──┬──────────┬──┼──────────┼──'─────────────────────────┤<br />
└─ - ─┘<br />
└─exponent─┘<br />
└─R─┬─4─┬──┘<br />
├─5─┤<br />
├─6─┤<br />
└─7─┘<br />
Figure 53. DC Instruction Syntax<br />
dup_factor<br />
causes the constant to be generated the number of times indicated by the<br />
factor.<br />
type<br />
indicates that the constant is either short, long or extended floating point.<br />
type extension<br />
the type of conversion required to assemble the constant. Valid values are:<br />
null<br />
B<br />
H<br />
Hexadecimal floating-point constant which is converted using the<br />
conversion logic of rounding mode 1 and slightly less precise algorithms<br />
Binary floating-point constant which is converted allowing all rounding<br />
modes<br />
Hexadecimal floating-point constant which is converted allowing all<br />
rounding modes<br />
| program_type<br />
| assign a programmer determined 32-bit value to the symbol naming the DC<br />
| instruction, if a symbol was present.<br />
modifier<br />
describes the length, the scaling and the exponent of the nominal_value. The<br />
minimum length of the 'H' hexadecimal constant is 12 bits. The minimum<br />
length in bits of the binary constant is:<br />
9 Short floating-point constant<br />
168 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>