HLASM Language Reference
HLASM Language Reference HLASM Language Reference
DC Instruction ROUTINE B GAMMA DXD 5D DELTA DXD 1F ZETA DXD XL22 . . DC Q(GAMMA) DC Q(DELTA) . . ROUTINE C EPSILON DXD 4H ZETA DXD 4F . . DC Q(EPSILON,ZETA) . . Each of the three routines is requesting an amount of work area. Routine A wants | 2 doublewords and 4 fullwords; Routine B wants 5 doublewords, 10 fullwords, and | 22 bytes; Routine C wants 4 halfwords and 4 fullwords. During program linking, | identically named dummy sections are combined, retaining their strictest alignment | and longest length. For example, Routines B and C both request storage named | ZETA: the resulting allocation will be 22 bytes on a fullword boundary. When | program linking is complete, the sum of these individual dummy external section | lengths is placed in the location of the CXD instruction labeled OMEGA. Routine A | can then allocate the amount of storage that is specified in the CXD location, and | each dummy external section's offset within the allocated storage is found in the | Q-type offset constant referencing its name. Q-type offset constants are described | at “Offset Constant—Q” on page 159. DC Instruction You specify the DC instruction to define the data constants you need for program execution. The DC instruction causes the assembler to generate the binary representation of the data constant you specify into a particular location in the assembled source module; this is done at assembly time. | Note that the DC instruction's name — Define Constant — is somewhat misleading: | DC simply creates initial data in an area of the program. The contents of that area | may be modified during program execution, so the original data isn't truly | “constant.” If you want to declare values that are more likely to behave like | constants, use literals (“Literals” on page 40); the assembler attempts to detect and | diagnose instructions that might change the contents of a field defined by a literal. If a control section has not been established previously, DC will initiate an unnamed (private) control section. The DC instruction can generate the following types of constants: 126 HLASM V1R5 Language Reference
DC Instruction Figure 32. Types of Data Constants Type of Constant Function Example Address Defines address mainly for the use of fixed-point and other instructions L 5,ADCON ADCON DC A(SOMWHERE) Binary Defines bit patterns FLAG DC B'1' Character Decimal Fixed-point Floating-point Graphic Defines character strings or messages Used by decimal instructions Used by the fixed-point and other instructions Used by floating-point instructions Defines character strings or messages that contain pure double-byte data CHAR DC C'string of characters' ZAP AREA,PCON PCON DC P'1' AREA DS PL3 L 3,FCON FCON DC F'1' LE 2,ECON ECON DC E'1.5' DBCS DC G'' Hexadecimal Defines large bit patterns PATTERN DC X'FFFF' ┌─,───────┐ ►►──┬────────┬──DC─── ▼ ─operand─┴────────────────────────────────────►◄ └─symbol─┘ symbol is one of the following: An ordinary symbol A variable symbol that has been assigned a character string with a value that is valid for an ordinary symbol A sequence symbol If symbol denotes an ordinary symbol, the ordinary symbol represents the address of the first byte of the assembled constant. If several operands are specified, the first constant defined is addressable by the ordinary symbol. The other constants can be reached by relative addressing. operands An operand of six subfields. The first five subfields describe the constant. The sixth subfield provides the nominal values for the constants. A DC operand has this format: ►►──┬────────────────────┬──type──┬────────────────┬────────────────► └─duplication_factor─┘ └─type_extension─┘ ►──┬──────────────┬──┬──────────┬──nominal_value───────────────────►◄ | └─program_type─┘ └─modifier─┘ Chapter 5. Assembler Instruction Statements 127
- Page 96 and 97: Part 2. Machine and Assembler Instr
- Page 98 and 99: General Instructions Chapter 4. Mac
- Page 100 and 101: Input/Output Operations For further
- Page 102 and 103: Branching with Extended Mnemonic Co
- Page 104 and 105: Symbolic Operation Codes variations
- Page 106 and 107: Operand Entries Registers You can s
- Page 108 and 109: Operand Entries “Program Structur
- Page 110 and 111: Operand Entries Format │ Coded or
- Page 112 and 113: Examples of Coded Machine Instructi
- Page 114 and 115: Examples of Coded Machine Instructi
- Page 116 and 117: Examples of Coded Machine Instructi
- Page 118 and 119: Examples of Coded Machine Instructi
- Page 120 and 121: Chapter 5. Assembler Instruction St
- Page 122 and 123: *PROCESS Statement *PROCESS Stateme
- Page 124 and 125: ACONTROL Instruction ►►──
- Page 126 and 127: ACONTROL Instruction FLAG(PAGE0) in
- Page 128 and 129: AINSERT Instruction character_strin
- Page 130 and 131: AMODE Instruction alias_string is t
- Page 132 and 133: CATTR Instruction Figure 25. AMODE/
- Page 134 and 135: CATTR Instruction | statements for
- Page 136 and 137: CCW1 Instruction data_count is an a
- Page 138 and 139: CEJECT Instruction If symbol is an
- Page 140 and 141: CNOP Instruction Figure 29 (Page 2
- Page 142 and 143: COPY Instruction In the following e
- Page 144 and 145: CSECT Instruction symbol in the nam
- Page 148 and 149: DC Instruction duplication_factor c
- Page 150 and 151: DC Instruction Figure 33 (Page 2 of
- Page 152 and 153: DC Instruction With EBCDIC spaces
- Page 154 and 155: DC Instruction Further information
- Page 156 and 157: DC Instruction | Symbols used in su
- Page 158 and 159: DC Instruction The length attribute
- Page 160 and 161: DC Instruction Notes: 1. Don't conf
- Page 162 and 163: DC Instruction—Character Constant
- Page 164 and 165: DC Instruction—Character Constant
- Page 166 and 167: DC Instruction—Graphic Constant r
- Page 168 and 169: DC Instruction—Fixed-Point Consta
- Page 170 and 171: DC Instruction—Fixed-Point Consta
- Page 172 and 173: DC Instruction—Decimal Constants
- Page 174 and 175: DC Instruction—Address Constants
- Page 176 and 177: DC Instruction—Address Constants
- Page 178 and 179: DC Instruction—Offset Constant re
- Page 180 and 181: DC Instruction—Length Constant Le
- Page 182 and 183: DC Instruction—Hexadecimal Floati
- Page 184 and 185: DC Instruction—Hexadecimal Floati
- Page 186 and 187: DC Instruction—Hexadecimal Floati
- Page 188 and 189: DC Instruction—Binary Floating-Po
- Page 190 and 191: DC Instruction—Binary Floating-Po
- Page 192 and 193: DROP Instruction DROP Instruction T
- Page 194 and 195: DS Instruction USING DSECTA,14 ALBL
DC Instruction<br />
Figure 32. Types of Data Constants<br />
Type of<br />
Constant Function Example<br />
Address<br />
Defines address mainly<br />
for the use of fixed-point<br />
and other instructions<br />
L 5,ADCON<br />
ADCON DC A(SOMWHERE)<br />
Binary Defines bit patterns FLAG DC B'1'<br />
Character<br />
Decimal<br />
Fixed-point<br />
Floating-point<br />
Graphic<br />
Defines character strings<br />
or messages<br />
Used by decimal<br />
instructions<br />
Used by the fixed-point<br />
and other instructions<br />
Used by floating-point<br />
instructions<br />
Defines character strings<br />
or messages that contain<br />
pure double-byte data<br />
CHAR DC C'string of characters'<br />
ZAP AREA,PCON<br />
PCON DC P'1'<br />
AREA DS PL3<br />
L 3,FCON<br />
FCON DC F'1'<br />
LE 2,ECON<br />
ECON DC E'1.5'<br />
DBCS DC G''<br />
Hexadecimal Defines large bit patterns PATTERN DC X'FFFF'<br />
┌─,───────┐<br />
►►──┬────────┬──DC─── ▼ ─operand─┴────────────────────────────────────►◄<br />
└─symbol─┘<br />
symbol<br />
is one of the following:<br />
An ordinary symbol<br />
A variable symbol that has been assigned a character string with a value<br />
that is valid for an ordinary symbol<br />
A sequence symbol<br />
If symbol denotes an ordinary symbol, the ordinary symbol represents the<br />
address of the first byte of the assembled constant. If several operands are<br />
specified, the first constant defined is addressable by the ordinary symbol. The<br />
other constants can be reached by relative addressing.<br />
operands<br />
An operand of six subfields. The first five subfields describe the constant. The<br />
sixth subfield provides the nominal values for the constants.<br />
A DC operand has this format:<br />
►►──┬────────────────────┬──type──┬────────────────┬────────────────►<br />
└─duplication_factor─┘<br />
└─type_extension─┘<br />
►──┬──────────────┬──┬──────────┬──nominal_value───────────────────►◄<br />
| └─program_type─┘<br />
└─modifier─┘<br />
Chapter 5. Assembler Instruction Statements 127