9.12.5 ESA/390 Assembler Directives
as for the ESA/390 supports all of the standard ELF/SVR4
assembler directives that are documented in the main part of this
documentation. Several additional directives are supported in order
to implement the ESA/390 addressing model. The most important of these
- A small subset of the usual DC directive is supported.
- Stop using regno as the base register. The regno must
have been previously declared with a
.usingdirective in the same section as the current section.
- Emit the EBCDIC equivalent of the indicated string. The emitted string
will be null terminated. Note that the directives
.stringetc. emit ascii strings by default.
- The standard HLASM-style EQU directive is not supported; however, the
asdirective .equ can be used to the same effect.
- Dump the literal pool accumulated so far; begin a new literal pool.
The literal pool will be written in the current section; in order to
generate correct assembly, a
.usingmust have been previously specified in the same section.
- Use regno as the base register for all subsequent RX, RS, and SS form
instructions. The expr will be evaluated to obtain the base address;
usually, expr will merely be *.
This assembler allows two
.usingdirectives to be simultaneously outstanding, one in the
.textsection, and one in another section (typically, the
.datasection). This feature allows dynamically loaded objects to be implemented in a relatively straightforward way. A
.usingdirective must always be specified in the
.textsection; this will specify the base register that will be used for branches in the
.textsection. A second
.usingmay be specified in another section; this will specify the base register that is used for non-label address literals. When a second
.usingis specified, then the subsequent
.ltorgmust be put in the same section; otherwise an error will result.
Thus, for example, the following code uses
r3to address branch targets and
r4to address the literal pool, which has been written to the
.datasection. The is, the constants
=E'3.1416'will all appear in the
.data .using LITPOOL,r4 .text BASR r3,0 .using *,r3 B START .long LITPOOL START: L r4,4(,r3) L r15,=A(some_routine) LTR r15,r15 BNE LABEL AH r0,=H'42' LABEL: ME r6,=E'3.1416' .data LITPOOL: .ltorg
Note that this dual-
.usingdirective semantics extends and is not compatible with HLASM semantics. Note that this assembler directive does not support the full range of HLASM semantics.