22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DC Instruction—Fixed-Point Constants<br />

Range of values that can<br />

Length be assembled<br />

8 −263 to 263−1<br />

4 −231 to 231−1<br />

2 −215 to 215−1<br />

1 −2 to 2−1<br />

The range of values depends on the implicitly or explicitly specified length (if<br />

scaling is disregarded). If the value specified for a particular constant does not lie<br />

within the allowable range for a given length, the constant is not assembled, but<br />

flagged as an error.<br />

A fixed-point constant is assembled as follows:<br />

1. The specified number, multiplied by any exponents, is converted to a binary<br />

number.<br />

2. Scaling is done, if specified. If a scale modifier is not provided, the fractional<br />

portion of the number is lost.<br />

3. The binary value is rounded, if necessary. The resulting number does not differ<br />

from the exact number specified by more than one in the least significant bit<br />

position at the right.<br />

4. A negative number is carried in two's-complement form.<br />

5. Duplication is applied after the constant has been assembled.<br />

The statement below generates 3 fullwords of data. The location attribute of CONWRD<br />

is the address of the first byte of the first word, and the length attribute is 4, the<br />

implied length for a fullword fixed-point constant. The expression CONWRD+4 could<br />

be used to address the second constant (second word) in the field.<br />

CONWRD DC 3F'658474'<br />

Figure 42 (Page 1 of 2). Fixed-Point Constants<br />

Subfield Value Example Result<br />

1. Duplication factor Allowed<br />

2. Type F and H<br />

3. Type Extension D permitted with<br />

type F<br />

| 4. Program type Allowed<br />

5. Modifiers<br />

Implicit length:<br />

(length modifier<br />

not present)<br />

Alignment:<br />

(Length modifier<br />

not present)<br />

Doubleword: 8 bytes<br />

Fullword: 4 bytes<br />

Halfword: 2 bytes<br />

Doubleword,<br />

fullword or<br />

halfword<br />

Range for length: 1 to 8<br />

(byte length)<br />

.1 to .64<br />

(bit length)<br />

Chapter 5. Assembler Instruction Statements 149

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

Saved successfully!

Ooh no, something went wrong!