• Keine Ergebnisse gefunden

Toreduce programming time, the programmer can equate symbols to fre-

OPERATION CODE DEFINITION INSTRUCTION

7. Q-type address constants may not be specified in literals

Examples of literals appear throughout the balance of the DC instruction discussion.

Operand Subfield i: Duplication Factor

The duplication factor may be omitted. If specified, it causes the constant(s) to be generated the number of times indicated by the factor.

The factor may be specified either by an unsigned decimal self-defining term or by a positive absolute expression that is enclosed by parentheses.

The duplication factor is applied after the constant is assembled. All symbols in the expression must be previously defined.

Note that a duplication factor of zero is permitted except in a literal and achieves the same result as it would in a DS instruction. A DC

instruction with a zero duplication factor will not produce control dictionary entries. See "ForclngAlignment" under "DS -- Define Storage."

Note: If duplication is specified for an address constant containing a location counter reference, the value of the location counter used in each duplication is incremented by the length of the operand.

Operand Subfield 2: Type

The type subfield defines the type of constant being specified. From the type specification, the assembler determines how it is to interpret the constant and translate it into the appropriate machine format. The type is specified by a slngle-letter code as shown in Figure 5-1.

Code Type of Constant C Character

8-bit code for each character

4-bit code for each hexadecimal digit Binary format

Signed, flxed-polnt binary format;normally a full word Signed, fixed-polnt binary format;normally a half word 8-blt ASCII code for each character

Short floating-polnt format; normally a full word Long floatlng-point format; normally a double word Extended floating-point format; normally two double words (Assembler F only)

Packed decimal format Zoned decimal format

Value of address; normally a full word Value of address; normally a half word

Base register and displacement value; a half word Space reserved for external symbol addresses; each address normally a full word

Value of address; a full 16-bit halfword

Space reserved for dummy section offset (AsseWDier F only)

Figure 5-1. .Type Codes for Constants

Further information about these constants is provided in the discussion of the constants themselves under "Operand Subfield 4:

Constant."

Operand Subfield 3: Modifiers

Modifiers describe the length in bytes desired for a constant (in contrast to an implied length), and the scaling and exponent for the constant. If multiple modifiers are written, they must appear in this sequence: length, scale, exponent. Each is written and used as described in the following text.

LENGTH MODIFIER: This is written as Ln, where n is either an unsigned decimal self-defining term or a positive absolute expression enclosed by parentheses. Any symbols in the expression must be previously defined.

The value of n represents the number of bytes of storage that are assembled for the constant. The maximum value permitted for the length modifiers supplied for the various types of constants is summarized in Appendix F.

This table also indicates the implied length for each type of constant; the implied length is used unless a length modifier is present. A length modifier may be specified for any type of constant. However, no boundary

alignment will be provided when a length modifier is given.

Use of a length modifier may cause truncation. For example:

DC C'ABCDXYZ' will generate a 7-byte constant, whereas

DC CL6'ABCDXYZ'

will generate a 6-byte constant and cause Z to be lost. Truncation of C, X, B, Z, A, Y, and P constants is not flagged as an error. However, F, H, E, D, and L constants will be flagged if significant bits are lost.

Finally, each type of constant has an imposed or natural length modifier range limit. Appendix F shows which constants can be flagged for truncation of significant digits. It also shows the allowable length modifier range for each constant.

Bit-Length Specification: The length of a constant, in bits, is specified by L.n, where n is specified as stated above and represents the number of bits in storage into which the constant is to be assembled. The value of n may exceed eight and is interpreted to mean an integral number of bytes

plus so many bits. For example, L.20 is interpreted as a length of two bytes plus four bits.

Assembly of the first or only constant with bit-length specification starts on a byte boundary. The constant is placed in the high or low order end of the field depending on the type of constant being specified. The constant is padded or truncated to fit the field. If the assembled length does not leave the location counter set at a byte boundary, and another bit length constant does not immediately follow in the same statement, the remainder of the last byte used is filled with zeros. This leaves the location counter set at the next byte boundary. Figure 5-2 shows a fixed-point constant with a specified blt-length of 13, as coded, and as it would appear in storage. Note that the constant has been padded on the left to bring it to its designated 13-bit length.

As coded:

Operation Operand

DC FL.13'579'

In storage:

byte byte

padding[

_010010'00011000

579 fill byte

Figure 5-2. Bit-Length Specification (Single Constant)

The implied length of BLCON is two bytes. A reference to BLCON would cause the entire two bytes to be referenced.

When bit-length specification is used in association with multiple constants (see Operand Subfield 4: Constant following), each succeeding constant in the llst is assembled starting at the next available bit.

Figure 5-3 illustrates this.

As coded:

Name Operation Operand

BLMCON DC FL.I0'161,21,57'

In storage:

byte byte byte byte byte