HLASM Language Reference

HLASM Language Reference HLASM Language Reference

faculty.cs.niu.edu
from faculty.cs.niu.edu More from this publisher
22.02.2015 Views

DC Instruction duplication_factor causes the nominal_value to be generated the number of times indicated by this factor. See “Subfield 1: Duplication Factor” on page 132. type further determines the type of constant the nominal_value represents. See “Subfield 2: Type” on page 133. type_extension determines some of the characteristics of the constant. See “Subfield 3: Type Extension” on page 134. | program_type | assign a programmer determined 32-bit value to the symbol naming the DC | instruction, if a symbol was present. See “Subfield 4: Program type” on | page 135. modifier describes the length, the scaling, and the exponent of the nominal_value. See “Subfield 5: Modifier” on page 136. nominal_value defines the value of the constant. See “Subfield 6: Nominal Value” on page 140. For example, in: 1EBP(7)L2'12' the six subfields are: Duplication factor is 1 Type is E Type extension is B | Program type is P(7) Modifier is L2 Nominal value is 12 If all subfields are specified, the order given above is required. The first, third, fourth and fifth subfields can be omitted, but the second and sixth must be specified in that order. Rules for DC Operand 1. The type subfield and the nominal value must always be specified unless the duplication factor is zero. If the duplication factor is zero, only the type must be specified. | 2. The duplication factor, type extension, program type, and modifier subfields are optional. 3. When multiple operands are specified, they can be of different types. 4. When multiple nominal values are specified in the sixth subfield, they must be separated by commas and be of the same type. Multiple nominal values are not allowed for character or graphic constants. | 5. The descriptive subfields, apart from the program type, apply to all the nominal | values. The program type applies to only the symbol naming the DC | instruction, if a symbol was present. Separate constants are generated for each separate operand and nominal value specified. 128 HLASM V1R5 Language Reference

DC Instruction 6. No spaces are allowed: Between subfields Between multiple operands General Information About Constants Constants defined by the DC instruction are assembled into an object module at the location at which the instruction is specified. However, the type of constant being defined, and the presence or absence of a length modifier, determines whether the constant is to be aligned on a particular storage boundary or not (see “Alignment of Constants”). Symbolic Addresses of Constants: The value of the symbol that names the DC instruction is the address of the first byte (after alignment) of the first or only constant. Length Attribute Value of Symbols Naming Constants The length attribute value assigned to the symbols in the name field of the constants is equal to: The implicit length (see “Implicit Length” in Figure 33) of the constant when no explicit length is specified in the operand of the constant, or The explicit length (see “Value of Length Attribute” in Figure 33) of the constant. If more than one operand is present, the length attribute value of the symbol is the length in bytes of the first constant specified, according to its implicit or explicit length. Alignment of Constants The assembler aligns constants on different boundaries according to the following: On boundaries implicit to the type of constant (see “Implicit Boundary Alignment” in Figure 34 on page 130) when no length is specified. On byte boundaries (see “Boundary Alignment” in Figure 34) when an explicit length is specified. Bytes that are skipped to align a constant at the correct boundary are not considered part of the constant. They are filled with binary zeros. Notes: 1. The automatic alignment of constants and areas does not occur if the NOALIGN assembler option has been specified. 2. Alignment can be forced to any boundary by a preceding DS or DC instruction with a zero duplication factor. This occurs whether or not the ALIGN option is set. Figure 33 (Page 1 of 2). Length Attribute Value of Symbol Naming Constants Type of constant Implicit Length Examples B as needed DC B'11' 1 Value of Length Attribute Chapter 5. Assembler Instruction Statements 129

DC Instruction<br />

6. No spaces are allowed:<br />

Between subfields<br />

Between multiple operands<br />

General Information About Constants<br />

Constants defined by the DC instruction are assembled into an object module at<br />

the location at which the instruction is specified. However, the type of constant<br />

being defined, and the presence or absence of a length modifier, determines<br />

whether the constant is to be aligned on a particular storage boundary or not (see<br />

“Alignment of Constants”).<br />

Symbolic Addresses of Constants: The value of the symbol that names the DC<br />

instruction is the address of the first byte (after alignment) of the first or only<br />

constant.<br />

Length Attribute Value of Symbols Naming Constants<br />

The length attribute value assigned to the symbols in the name field of the<br />

constants is equal to:<br />

The implicit length (see “Implicit Length” in Figure 33) of the constant when no<br />

explicit length is specified in the operand of the constant, or<br />

The explicit length (see “Value of Length Attribute” in Figure 33) of the<br />

constant.<br />

If more than one operand is present, the length attribute value of the symbol is the<br />

length in bytes of the first constant specified, according to its implicit or explicit<br />

length.<br />

Alignment of Constants<br />

The assembler aligns constants on different boundaries according to the following:<br />

On boundaries implicit to the type of constant (see “Implicit Boundary<br />

Alignment” in Figure 34 on page 130) when no length is specified.<br />

On byte boundaries (see “Boundary Alignment” in Figure 34) when an explicit<br />

length is specified.<br />

Bytes that are skipped to align a constant at the correct boundary are not<br />

considered part of the constant. They are filled with binary zeros.<br />

Notes:<br />

1. The automatic alignment of constants and areas does not occur if the<br />

NOALIGN assembler option has been specified.<br />

2. Alignment can be forced to any boundary by a preceding DS or DC instruction<br />

with a zero duplication factor. This occurs whether or not the ALIGN option is<br />

set.<br />

Figure 33 (Page 1 of 2). Length Attribute Value of Symbol Naming Constants<br />

Type of<br />

constant<br />

Implicit<br />

Length<br />

Examples<br />

B as needed DC B'11' 1<br />

Value of<br />

Length<br />

Attribute<br />

Chapter 5. Assembler Instruction Statements 129

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!