The length modifier can be specified to indicate the number of
bits into which a constant is to be assembled. The bit-length modifier
is written as L.n where n is either a decimal self-defining
term, or an absolute expression enclosed in parentheses. It must have
a positive value. Such a modifier is sometimes called a "bit-length" modifier,
to distinguish it from a "byte-length" modifier. You cannot combine
byte-length and bit-length modifiers. For example, a 12 bit field
must be written L.12, not L1.4.
The value of n is 1 - the number of bits (a multiple of 8) that
are required to make up the maximum number of bytes allowed in the
type of constant being defined. The bit-length modifier can never
be used with the CU-, G-, S-, V-, R-, J- and Q-type constants, and
cannot be used with the A-type or Y-type constant if the operand is
simply or complexly relocatable.
When only one operand and one nominal value are specified in a
DC instruction, the following rules apply:
- The bit-length modifier allocates a field into which a constant
is to be assembled. The field starts at a byte boundary and can run
over one or more byte boundaries, if the bit length is greater than
8.
If the field does not end at a byte boundary and if the bit
length is not a multiple of 8, the remainder of the last byte is filled
with binary zeros. For example, DC FL.12'-1' generates X'FFF0'.
- The nominal value of the constant is assembled into the field:
- Starting at the high-order end for the C-, E-, D-, and L-type
constants
- Starting at the low-order end for the remaining types of constants
that support a bit-length modifier
- The nominal value is padded or truncated to fit the field (see Padding and truncation of values).
"padding" is not the same as "filling".
In padding, the designated bit field is completed according to the
rules for the constant type. Filling is always binary zeros placed
at the right end of an incomplete byte.
C-type character constants
are padded with EBCDIC spaces (hexadecimal X'40', and CA-type
character constants are padded with ASCII spaces (hexadecimal X'20').
Other constant types are padded either by sign extension or with zeros,
according to the type of the constant.
The length attribute value of the symbol naming a DC instruction
with a specified bit length is equal to the minimum number of integral
bytes needed to contain the bit length specified for the constant.
Consider the following example:
TRUNCF DC FL.12'276'
L'TRUNCF is equal to 2. Thus, a reference to TRUNCF addresses
both the 2 bytes that are assembled.
When more than one operand is specified in a DC instruction, or
more than one nominal value in a DC operand, the above rules about
bit-length modifiers also apply, except:
- The first field allocated starts at a byte boundary, but the succeeding
fields start at the next available bit. For example, BL1 DC FL.12'-1,1000' generates X'FFF3E8'.
- After all the constants have been assembled into their respective
fields, the bits remaining to make up the last byte are filled with
zeros. For example, BL2 DC FL.12'-1,1000,-2' generates X'FFF3E8FFE0'
If duplication is specified, filling with zeros
occurs once at the end of all the fields occupied by the duplicated
constants. For example, BL3 DC 3FL.12'-2' generates X'FFEFFEFFE0'.
- The length attribute value of the symbol naming the DC instruction
is equal to the number of integral bytes needed to contain the bit
length specified for the first constant to be assembled. For example,
the symbols BL1, BL2, and BL3 in the preceding examples each have
length attribute 2.