z/OS JES2 Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Special register notation

z/OS JES2 Macros
SA32-0996-00

Many JES2 macro instruction keywords allow you to code a register as a valid specification. If you do code a register (for example, R0 or R15), be certain to enclose the symbol representing that register in parenthesis. A symbol enclosed in parenthesis is called register notation (for example, (R0) or (R1)).

If an operand of a JES2 macro instruction is written using register notation, the resulting macro expansion loads the parameter contained in the designated register into either parameter register 1 or parameter register 0.

For example, if an operand is written as (R15) and if the corresponding parameter is to be passed to the control program in register 1, the macro expansion would contain the instruction:

LR  R1,R15

Before macro expansion, the processor can load parameter registers; this is called pre-loading. When preloading a parameter register, use the JES2 equated symbols for register 0 or 1 (that is, R1 or R0) to indicate to the macro which registers contain values to be passed. If you do not use the JES2 equated symbols, you will cause the generation of an extra instruction.

For example, RONE, an absolute symbol equated to R1, should not be specified on the macro statement if the register required is R1. The macro will not recognize RONE as register 1 and will attempt to load the parameter register R1 from the RONE specification with the following redundant instruction:

LR   R1,RONE

The format description shows whether special register notation can be used, and for which operands. This is demonstrated by the following example:

[symbol]   $EXAMP   {abc-addrx} , {def-addrx}
                    {(R1)     }   {(R0)     }

Both operands can be written in the addrx form, and therefore can be written using register notation. Ordinary register notation indicates that the parameter register should be loaded from the designated register by the macro expansion. The format description also shows that the abc operand can be written as (R1), and the def operand can be written as (R0). If either of these special notations is used, the processor must have loaded the designated parameter register before the execution of the macro instruction.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014