Base address
The term base address is used throughout this manual to mean the location counter value within a control section from which the assembler can compute displacements to locations, or addresses, within the control section. Do not confuse this with the storage address of a control section when it is loaded into storage at execution time.
The USING instruction has three formats:
- The first format specifies a base address, an optional range, and one or more base registers. This format of the USING instruction is called an ordinary USING instruction, and is described under Ordinary USING instruction.
- The second format specifies a base address, an optional range, one or more base registers, and a USING label which can be used as a symbol qualifier. This format of the USING instruction is called a labeled USING instruction, and is described under Labeled USING instruction.
- The third format specifies a base address, an optional range, and a relocatable expression instead of one or more base registers. This format of a USING instruction is called a dependent USING instruction, and is described under Dependent USING instruction. If a USING label is also specified, this format of the USING instruction is called a labeled dependent USING instruction.
Note: The assembler identifies and warns about statements
where the implied alignment of an operand does not match the requirements
of the instruction. However, if the base for a USING is not aligned
on the required boundary, the assembler cannot diagnose a problem.
For example:
DS1 DSECT
DS H
REGPAIR DS 2ADL8 Halfword alignment
DS2 DSECT
REGPAIR_ALIGN DS 2ADL8 Doubleword alignment
CSECT
...
USING DS1,R1 Ordinary USING
USING DS2,REGPAIR Dependent USING
STPQ R0,REGPAIR REGPAIR is not a quadword
STPQ R0,REGPAIR_ALIGN But REGPAIR_ALIGN is
The first STPQ instruction is diagnosed as an alignment error. The second STPQ instruction is not, even though the same storage location is implied by the code.
You must take care to ensure base addresses match the alignment requirements of storage mapped by a USING. For a description of the alignment requirements of instructions, see the relevant z/Architecture® Principles of Operation.