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 Table 1) specified in the nominal value subfield is assembled into four bits (their binary patterns can be found in Self-defining terms). 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 Table 1.
TEST DC 0F,X'FF00FF00'
TEST DC A(X'FF00FF00')
The DS instruction sets the location counter to a fullword boundary. (See DS instruction.)
IC 5,=X'FF'
ALPHACON DC 3XL2'A6F4E' Generates 6F4E 3 times
ALPHACON DC 3X'A6F4E' Generates 0A6F4E 3 times
the
resulting constant has a hexadecimal zero in the leftmost position.
0A6F4E0A6F4E0A6F4E
Subfield | Value | Example | Result |
---|---|---|---|
1. Duplication factor | Allowed | ||
2. Type | X | ||
3. Type Extension | Not allowed | ||
4. Program type | Allowed | ||
5. Modifiers | |||
Length: |
1 to 256 |
||
Implicit length: |
As needed |
X DC X'FF00A2' |
L'X = 3 2 |
Alignment: |
Byte | ||
Scale: |
Not allowed | ||
Exponent: |
Not allowed | ||
6. Nominal value | |||
Represented by: |
|
|
Object code |
Enclosed by: |
Apostrophes | ||
Exponent allowed: |
No | ||
Number of values |
|
||
Padding: |
With zeros at left | ||
Truncation of |
|