HLASM Language Reference
HLASM Language Reference HLASM Language Reference
USING Instruction In this MVC instruction, the (unqualified) first operand is resolved with the ordinary USING, and the (qualified) second operand is resolved with the labeled USING. Domain of a Labeled USING Instruction The domain of a labeled USING instruction (called the labeled USING domain) begins where the USING instruction appears in a source module. It continues to the end of the source module, except when: A subsequent DROP instruction specifies the label used in the preceding labeled USING instruction. A subsequent USING instruction specifies the same label used in the preceding labeled USING instruction. The second specification of the label causes the assembler to end the domain of the prior USING with the same label. You can specify the same base register or registers in any number of labeled USING instructions. However, unlike ordinary USING instructions, as long as all the labeled USINGs have unique labels, the assembler considers the domains of all the labeled USINGs to be active and their labels eligible to be used as symbol qualifiers. With ordinary USINGs, when you specify the same base register in a subsequent USING instruction, the domain of the prior USING is ended. The assembler converts implicit address references into their explicit form using the base register or registers specified in a labeled USING instruction when the following conditions are met: The address reference appears in the domain of the labeled USING instruction. The address reference takes the form of a qualified symbol and the qualifier is the label of the labeled USING instruction. | The address lies within the range of the labeled USING instruction. Dependent USING Instruction The dependent USING instruction format specifies a base address and a relocatable expression instead of one or more base registers. If a USING label is also specified, this format USING instruction is called a labeled dependent USING instruction. Dependent USING ►►───┬─────────────────┬─USING─┬─base───────────── ┬─,address───────►◄ ├─label───────────┤ └─(base─┬────── ┬─) ─┘ └─sequence_symbol─┘ └─,end─┘ label 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 sequence_symbol is a sequence symbol. 226 HLASM V1R5 Language Reference
USING Instruction base specifies a base address, which must be a relocatable expression. The value of the expression must lie between 0 and 2 31 −1. address is a simply relocatable expression that represents an implicit address within the | range of an active USING instruction. The range of an active USING is | considered to be that which is valid for generating 12-bit or 20-bit | displacements. end specifies the end address, which can be a relocatable or an absolute expression. The value of the expression must lie between 0 and 2 31 −1. The end address may exceed the (base address + default range) without error. The end address must be greater than the base and must have the same relocatability attributes. The implicit address denoted by address specifies the address where base is to be based, and is known as the supporting base address. As address is a relocatable expression, it distinguishes a dependent USING from an ordinary USING. The assembler converts the implicit address denoted by address into its explicit base-displacement form. It then assigns the base register from this explicit address as the base register for base. The assembler assumes that the base register contains the base address base minus the displacement determined in the explicit address. The assembler also assumes that address is appropriately aligned for the code based on base. Warnings are not issued for potential alignment problems in the dependent USING address. A dependent USING depends on the presence of one or more corresponding labeled or ordinary USINGs being in effect to resolve the symbolic expressions in the range of the dependent USING. The following example shows the use of an unlabeled dependent USING: EXAMPLE CSECT USING EXAMPLE,R1,R11 Ordinary USING . . USING IHADCB,DCBUT2 Unlabeled dependent USING LH R,DCBBLKSI Uses R1 or R11 for BASE . . DCBUT2 DCB DDNAME=SYSUT2,... The following example shows the use of two labeled dependent USINGs: EXAMPLE CSECT USING EXAMPLE,R1,R11 Ordinary USING . . DCB1 USING IHADCB,DCBUT1 Labeled dependent USING DCB2 USING IHADCB,DCBUT2 Labeled dependent USING MVC DCB2.DCBBLKSI,DCB1.DCBBLKSI Uses R1 or R11 for BASE . . DCBUT1 DCB DDNAME=SYSUT1,... DCBUT2 DCB DDNAME=SYSUT2,... Chapter 5. Assembler Instruction Statements 227
- Page 196 and 197: DS Instruction The size of a storag
- Page 198 and 199: DSECT Instruction DSECT Instruction
- Page 200 and 201: DXD Instruction ASEMBLY2 CSECT USIN
- Page 202 and 203: END Instruction change but no addit
- Page 204 and 205: EQU Instruction EQU Instruction The
- Page 206 and 207: EQU Instruction 5. The length attri
- Page 208 and 209: EXITCTL Instruction sequence_symbol
- Page 210 and 211: ISEQ Instruction must be greater th
- Page 212 and 213: LOCTR Instruction A CSECT , See not
- Page 214 and 215: LTORG Instruction If symbol is an o
- Page 216 and 217: MNOTE Instruction When two literals
- Page 218 and 219: OPSYN Instruction ,ERROR, SEV 1 An
- Page 220 and 221: ORG Instruction AFTER is defined in
- Page 222 and 223: ORG Instruction If you specify mult
- Page 224 and 225: POP Instruction POP Instruction The
- Page 226 and 227: PRINT Instruction Note: If the next
- Page 228 and 229: Process Statement Process Statement
- Page 230 and 231: REPRO Instruction NOPRINT instructs
- Page 232 and 233: RSECT Instruction 4. AMODE or RMODE
- Page 234 and 235: START Instruction START Instruction
- Page 236 and 237: TITLE Instruction The name value is
- Page 238 and 239: USING Instruction Only the characte
- Page 240 and 241: USING Instruction Base Registers fo
- Page 242 and 243: USING Instruction If register 0 is
- Page 244 and 245: USING Instruction A variable symbo
- Page 248 and 249: USING Instruction Range of a Depend
- Page 250 and 251: XATTR Instruction external_symbol i
- Page 252 and 253: XATTR Instruction SCOPE ►►─
- Page 254 and 255: XATTR Instruction 234 HLASM V1R5 La
- Page 256 and 257: Part 3. Macro Language &SYSDATC Sys
- Page 258 and 259: Introduction to Macro Language Chap
- Page 260 and 261: Introduction to Macro Language The
- Page 262 and 263: Introduction to Macro Language Macr
- Page 264 and 265: MACRO and MEND Statements The assem
- Page 266 and 267: Prototype Statement Macros that are
- Page 268 and 269: Model Statements generated from tha
- Page 270 and 271: Model Statements ▌5▐ ▌6▐
- Page 272 and 273: Model Statements Notes: 1. You can
- Page 274 and 275: Positional Parameters Symbolic para
- Page 276 and 277: Processing Statements Processing St
- Page 278 and 279: AREAD Instruction Assign Local Time
- Page 280 and 281: COPY Instruction sequence_symbol is
- Page 282 and 283: System Variable Symbols System Vari
- Page 284 and 285: &SYSADATA_MEMBER System Variable Sy
- Page 286 and 287: &SYSCLOCK System Variable Symbol &S
- Page 288 and 289: &SYSECT System Variable Symbol depe
- Page 290 and 291: &SYSIN_MEMBER System Variable Symbo
- Page 292 and 293: &SYSJOB System Variable Symbol &SYS
- Page 294 and 295: &SYSLIN_DSN System Variable Symbol
USING Instruction<br />
base<br />
specifies a base address, which must be a relocatable expression. The value<br />
of the expression must lie between 0 and 2 31 −1.<br />
address<br />
is a simply relocatable expression that represents an implicit address within the<br />
| range of an active USING instruction. The range of an active USING is<br />
| considered to be that which is valid for generating 12-bit or 20-bit<br />
| displacements.<br />
end<br />
specifies the end address, which can be a relocatable or an absolute<br />
expression. The value of the expression must lie between 0 and 2 31 −1. The<br />
end address may exceed the (base address + default range) without error. The<br />
end address must be greater than the base and must have the same<br />
relocatability attributes.<br />
The implicit address denoted by address specifies the address where base is to be<br />
based, and is known as the supporting base address. As address is a relocatable<br />
expression, it distinguishes a dependent USING from an ordinary USING. The<br />
assembler converts the implicit address denoted by address into its explicit<br />
base-displacement form. It then assigns the base register from this explicit address<br />
as the base register for base. The assembler assumes that the base register<br />
contains the base address base minus the displacement determined in the explicit<br />
address. The assembler also assumes that address is appropriately aligned for the<br />
code based on base. Warnings are not issued for potential alignment problems in<br />
the dependent USING address.<br />
A dependent USING depends on the presence of one or more corresponding<br />
labeled or ordinary USINGs being in effect to resolve the symbolic expressions in<br />
the range of the dependent USING.<br />
The following example shows the use of an unlabeled dependent USING:<br />
EXAMPLE CSECT<br />
USING EXAMPLE,R1,R11 Ordinary USING<br />
.<br />
.<br />
USING IHADCB,DCBUT2 Unlabeled dependent USING<br />
LH R,DCBBLKSI Uses R1 or R11 for BASE<br />
.<br />
.<br />
DCBUT2 DCB DDNAME=SYSUT2,...<br />
The following example shows the use of two labeled dependent USINGs:<br />
EXAMPLE CSECT<br />
USING EXAMPLE,R1,R11 Ordinary USING<br />
.<br />
.<br />
DCB1 USING IHADCB,DCBUT1 Labeled dependent USING<br />
DCB2 USING IHADCB,DCBUT2 Labeled dependent USING<br />
MVC DCB2.DCBBLKSI,DCB1.DCBBLKSI Uses R1 or R11 for BASE<br />
.<br />
.<br />
DCBUT1 DCB DDNAME=SYSUT1,...<br />
DCBUT2 DCB DDNAME=SYSUT2,...<br />
Chapter 5. Assembler Instruction Statements 227