HLASM Language Reference

HLASM Language Reference HLASM Language Reference

faculty.cs.niu.edu
from faculty.cs.niu.edu More from this publisher
22.02.2015 Views

DC Instruction—Binary Floating-Point Special Values Floating-Point Special Values For special values, the syntax of the DC statement is: ►►──DC──┬────────────┬──┬─E─┬──┬─B─┬──┬──────────────┬──────────────► | └─dup_factor─ ┘ ├ ─D─ ┤ └ ─H─ ┘ └─program_type─┘ └─L─┘ ►──┬─────────────────┬──┤ nominal_value ├──────────────────────────►◄ └─length_modifier─┘ nominal_value (type extension B): ┌─ + ─┐ ├──'──┼─────┼──┬─(SNAN)─┬──'────────────────────────────────────────┤ └─ - ─┘ ├─(QNAN)─┤ ├─(NAN)──┤ ├─(INF)──┤ ├─(MAX)──┤ ├─(MIN)──┤ └─(DMIN)─┘ nominal_value (type extension H): ┌─ + ─┐ ├──'──┼─────┼──┬─(MAX)──┬──'────────────────────────────────────────┤ └─ - ─┘ ├─(MIN)──┤ └─(DMIN)─┘ 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. | program_type | assign a programmer determined 32-bit value to the symbol naming the DC | instruction, if a symbol was present. length_modifier describes the length in bytes or bits into which the constant is to be assembled. For NANs and INF the minimum length in bits of the constant is: 11 Short floating-point constant 14 Long floating-point constant 18 Extended floating-point constant This minimum length allows for the sign, exponent and two fraction bits. 170 HLASM V1R5 Language Reference

DC Instruction—Binary Floating-Point Special Values nominal_value defines the special value to be generated. Notes: 1. The nominal value can be in mixed case. 2. SNAN assembles with an exponent of ones and 01 in the high order fraction bits with the remainder of the fraction containing zeros. 3. QNAN assembles with an exponent of ones and 11 in the high order fraction bits with the remainder of the fraction containing zeros. 4. NAN assembles with an exponent of one and 10 in the high order fraction bits with the remainder of the fraction containing zeros. 5. MIN assembles as a normalized minimum value, that is an exponent of one | and a fraction of zeros for binary constants, and a fraction with a leading | hexadecimal digit 1 followed by zeros for hexadecimal constants. | 6. DMIN assembles as a denormalized minimum value with an exponent of zeros | and a fraction of all zeros except for a low order bit of one. 7. INF assembles with an exponent of ones and a fraction of zeros. | 8. MAX assembles with a fraction of all ones and an exponent of all ones for | hexadecimal constants, and an exponent of all ones except for the low bit for | binary constants. Literal Constants Literal constants let you define and refer to data directly in machine instruction operands. You do not need to define a constant separately in another part of your source module. The differences between a literal, a data constant, and a self-defining term are described in “Literals” on page 40. A literal constant is specified in the same way as the operand of a DC instruction. The general rules for the operand subfields of a DC instruction also apply to the subfield of a literal constant. Moreover, the rules that apply to the individual types of constants apply to literal constants as well. However, literal constants differ from DC operands in the following ways: Literals must be preceded by an equal sign. Multiple operands are not allowed. The duplication factor must not be zero. Symbols used in the duplication factor or length modifier must be previously defined. Scale and Exponent modifiers do not need pre-definition. If an address-type literal constant specifies a duplication factor greater than one and a nominal value containing the location counter reference, the value of the location counter reference is not incremented, but remains the same for each duplication. The assembler groups literals together by size. If you use a literal constant, the alignment of the constant can be different than might be the case for an explicit constant. See “Literal Pool” on page 44. Chapter 5. Assembler Instruction Statements 171

DC Instruction—Binary Floating-Point Special Values<br />

nominal_value<br />

defines the special value to be generated.<br />

Notes:<br />

1. The nominal value can be in mixed case.<br />

2. SNAN assembles with an exponent of ones and 01 in the high order fraction<br />

bits with the remainder of the fraction containing zeros.<br />

3. QNAN assembles with an exponent of ones and 11 in the high order fraction<br />

bits with the remainder of the fraction containing zeros.<br />

4. NAN assembles with an exponent of one and 10 in the high order fraction bits<br />

with the remainder of the fraction containing zeros.<br />

5. MIN assembles as a normalized minimum value, that is an exponent of one<br />

| and a fraction of zeros for binary constants, and a fraction with a leading<br />

| hexadecimal digit 1 followed by zeros for hexadecimal constants.<br />

| 6. DMIN assembles as a denormalized minimum value with an exponent of zeros<br />

| and a fraction of all zeros except for a low order bit of one.<br />

7. INF assembles with an exponent of ones and a fraction of zeros.<br />

| 8. MAX assembles with a fraction of all ones and an exponent of all ones for<br />

| hexadecimal constants, and an exponent of all ones except for the low bit for<br />

| binary constants.<br />

Literal Constants<br />

Literal constants let you define and refer to data directly in machine instruction<br />

operands. You do not need to define a constant separately in another part of your<br />

source module. The differences between a literal, a data constant, and a<br />

self-defining term are described in “Literals” on page 40.<br />

A literal constant is specified in the same way as the operand of a DC instruction.<br />

The general rules for the operand subfields of a DC instruction also apply to the<br />

subfield of a literal constant. Moreover, the rules that apply to the individual types<br />

of constants apply to literal constants as well.<br />

However, literal constants differ from DC operands in the following ways:<br />

Literals must be preceded by an equal sign.<br />

Multiple operands are not allowed.<br />

The duplication factor must not be zero.<br />

Symbols used in the duplication factor or length modifier must be previously<br />

defined. Scale and Exponent modifiers do not need pre-definition.<br />

If an address-type literal constant specifies a duplication factor greater than one<br />

and a nominal value containing the location counter reference, the value of the<br />

location counter reference is not incremented, but remains the same for each<br />

duplication.<br />

The assembler groups literals together by size. If you use a literal constant,<br />

the alignment of the constant can be different than might be the case for an<br />

explicit constant. See “Literal Pool” on page 44.<br />

Chapter 5. Assembler Instruction Statements 171

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!