Subfield 5: Modifier

The syntax for coding the modifier is shown in the subfield format on page ***.

You may omit the modifier subfield. Modifiers describe the length in bits or bytes you want for a constant (in contrast to an implied length), and the scaling and exponent for the constant.

The three modifiers are:

If multiple modifiers are used, they must appear in this sequence: length, scale, and exponent. For example:

ALL3     DC              DL7S3E50'2.7182'

Symbols used in subfield 5 need not be previously defined, except in literals. For example:

SYM      DC              FS(X)'35.92'
X        EQU             7

Length modifier

The length modifier indicates the number of bytes of storage into which the constant is to be assembled. It is written as Ln, where n is either a decimal self-defining term or an absolute expression enclosed by parentheses. It must have a positive value.

When the length modifier is specified:

When no length is specified, for character and graphic constants (C and G), hexadecimal constants (X), binary constants (B), and decimal constants (P and Z), the whole constant is assembled into its implicit length.

Bit-length modifier

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 may not 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 must lie between 1 and 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:

  1. 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'.

  2. The nominal value of the constant is assembled into the field:
    1. Starting at the high order end for the C-, E-, D-, and L-type constants
    2. Starting at the low-order end for the remaining types of constants that support a bit-length modifier
  3. The nominal value is padded or truncated to fit the field (see Padding and truncation of values).

    Note that "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 two 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:

  1. 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'.
  2. 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'.

  3. 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.
For double-byte data in C-type constants

If bit-lengths are specified, with a duplication factor greater than 1, and a bit-length which is not a multiple of 8, then the double-byte data is no longer valid for devices capable of presenting DBCS characters. No error message is issued.

Storage requirement for constants

The total amount of storage required to assemble a DC instruction is the sum of:

  1. The requirements for the individual DC operands specified in the instruction. The requirement of a DC operand is the product of:
  2. The number of bytes skipped for the boundary alignment between different operands; such skipped bytes are filled with binary zeros.

Scale modifier

The scale modifier specifies the amount of internal scaling that you want for:

The scale modifier can be used only with the above types of constants. It cannot be used with EB, DB, and LB floating point constants.

The range for each type of constant is:

Fixed-point constant H
-187 to +346
Fixed-point constant F
-187 to +346
Floating-point constant E, EH
0 to 14
Floating-point constant D, DH
0 to 14
Floating-point constant L, LH
0 to 28

The scale modifier is written as Sn, where n is either a decimal self-defining term, or an absolute expression enclosed in parentheses. Both forms of the modifier's value n can be preceded by a sign; if no sign is present, a plus sign is assumed.

Scale modifier for fixed-point constants

The scale modifier for fixed-point constants specifies the power of two by which the fixed-point constant must be multiplied after its nominal value has been converted to its binary representation, but before it is assembled in its final scaled form. Scaling causes the binary point to move from its assumed fixed position at the right of the rightmost bit position.

Notes:
  1. When the scale modifier has a positive value, it indicates the number of binary positions occupied by the fractional portion of the binary number.
  2. When the scale modifier has a negative value, it indicates the number of binary positions deleted from the integer portion of the binary number.
  3. When low-order positions are lost because of scaling (or lack of scaling), rounding occurs in the leftmost bit of the lost portion. The rounding is reflected in the rightmost position saved.
Scale modifier for hexadecimal floating-point constants

The scale modifier for hexadecimal floating-point constants must have a positive value. It specifies the number of hexadecimal positions that the fractional portion of the binary representation of a floating-point constant is shifted to the right. The hexadecimal point is assumed to be fixed at the left of the leftmost position in the fractional field. When scaling is specified, it causes an unnormalized hexadecimal fraction to be assembled (unnormalized means the leftmost positions of the fraction contain hexadecimal zeros). The magnitude of the constant is retained, because the exponent in the characteristic portion of the constant is adjusted upward accordingly. When non-zero hexadecimal positions are lost, rounding occurs in the leftmost hexadecimal position of the lost portion. The rounding is reflected in the rightmost position saved.

Exponent modifier

The exponent modifier specifies the power of 10 by which the nominal value of a constant is to be multiplied before it is converted to its internal binary representation. It can only be used with the fixed-point (H and F) and floating-point (E, D, and L) constants. The exponent modifier is written as En, where n can be either a decimal self-defining term, or an absolute expression enclosed in parentheses.

The decimal self-defining term or the expression can be preceded by a sign. If no sign is present, a plus sign is assumed. The range for the exponent modifier is -85 to +75. If a type extension is used to define a floating-point constant, the exponent modifier can be in the range -231 to 231-1. If the nominal value cannot be represented exactly, a warning message is issued.

Notes:
  1. Don't confuse the exponent modifier with the exponent that can be specified in the nominal value subfield of fixed-point and floating-point constants.

    The exponent modifier affects each nominal value specified in the operand, whereas the exponent written as part of the nominal value subfield only affects the nominal value it follows. If both types of exponent are specified in a DC operand, their values are added together before the nominal value is converted to binary form. However, this sum must lie within the permissible range of -85 to +75, unless a type extension is specified.

  2. The value of the constant, after any exponents have been applied, must be contained in the implicitly or explicitly specified length of the constant to be assembled.

[ Top of Page | Previous Page | Next Page | Contents | Index ]