as: ESA/390 Directives

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