The syntax for coding the duplication factor is shown in
the subfield format operands in DC instruction.
You can omit the duplication factor. If specified, it causes the
nominal value or multiple nominal values specified in a constant to
be generated the number of times indicated by the factor. It is applied
after the nominal value or values are assembled into the constant.
Symbols used in subfield 1 need not be previously defined. This
does not apply to literals.
The duplication factor can be specified by an unsigned decimal
self-defining term or by an absolute expression enclosed in parentheses.
The factor must have a positive value or be equal to zero.
Notes: - A duplication factor of zero is permitted, except for literals,
with the following results:
- No value is assembled.
- Alignment is forced according to the type of constant specified,
if no length attribute is present (see Alignment of constants).
- The length attribute of the symbol naming the constant is established
according to the implicitly or explicitly specified length.
When the duplication factor is
zero, the nominal value can be omitted. The alignment is forced, even
if the NOALIGN option is specified.
When the duplication factor
is zero for a literal, the assembler issues message ASMA067S
Illegal duplication factor.
- If duplication is specified for an address constant whose nominal
value contains a location
counter reference, the value of the location counter reference is
incremented by the length of the constant before each duplication
is done (see Address constants—A and Y). If the duplication
factor is zero, the value of the location counter reference is not
incremented by the length of each constant that was generated for
a non-zero duplication factor. Thus, in the following two statements,
the first generates an ASMA072E error message for "Data item too large",
but the second does not:
A DC 0Y(0,32768-(*-A))
B DC Y(0,32768-(*-B))
However, if duplication
is specified for an address-type literal constant
containing a location counter reference, the value of the location
counter reference is not incremented by the length of the literal
before each duplication is done. The value of the location counter
reference is the location of the first byte of the literal in the
literal pool, and is the same for each duplication.
The location
counter value is that of the instruction in which the literal appears
for A-type constants, but for S-type constants it is the location
where the literal appears.
When a bit-length constant of type
A, B, F, H, P, X, Y, or Z is specified with a duplication factor:
- Each nominal value is right-aligned in the specified field.
- Each nominal value is padded on the left with zeros or sign bits,
according to the type.
If unfilled bits remain after each constant is generated, any
remaining bits in the last byte are filled with zero bits. That is,
padding within a constant is different from filling after a group
of constants.
- If a bit-length constant is specified with a duplication factor,
each nominal value is right-aligned in the specified field and padded
on the left with zeros or sign bits, according to the type. If unfilled
bits remain after each constant is generated, any remaining bits in
the last byte are filled with zero bits. Thus, padding within a constant
is different from padding after a group of constants.
- The maximum value for the duplication factor is 224-1,
or X'FFFFFF' for OBJ object files, 232-1, or X'7FFFFFFF' for
GOFF object files. If the maximum value for the duplication factor
is exceeded, the assembler issues a message. Possibilities include ASMA067S
Illegal duplication factor and ASMA068S Length error.