For AMODE(24) and AMODE(31) assembler language programs, you can optionally specify your own DFHEIENT macro. To declare that an assembler language programs is AMODE(64), you use the z/OS® Assembler SYSSTATE macro. For AMODE(64) assembler language programs, you must specify the DFHEIENT macro, and you can optionally specify your own DFHEIRET macro.
For example, by default, the translator sets up only one base register (register 3), which might cause addressability problems for your program. You can provide your own DFHEIENT macro with the CODEREG operand so that you can specify more than one base register. If you code your own version of the DFHEIENT macro with the same label as the CSECT statement, it can replace the CSECT statement in your source program. If you code the DFHEIENT macro without a label, it must immediately follow the CSECT statement.
INSTRUCT CSECT
EXEC CICS SEND MAP('DFH$AGA') MAPONLY ERASE
END
The following example code increases the number of base
and data registers for this program: INSTRUCT DFHEIENT CODEREG=(2,3,4),
DATAREG=(13,5),
EIBREG=6
EXEC CICS SEND
MAP('DFH$AGA')
MAPONLY ERASE
END
The symbolic register DFHEIPLR is equated to the first DATAREG either explicitly specified or obtained by default. The DFHECALL macro ensures that register 13 addresses the save area that DFHEISTG defined in dynamic storage, so it is advisable to use register 13 as your first data dynamic-storage register. If you do not, the code generated by DFHECALL adds extra instructions to manipulate register 13.
DFHEIPLR is assumed by the expansion of a CICS® command to contain the value set up by DFHEIENT. You should either dedicate this register or ensure that it is restored before each CICS command.
IEABRCX DEFINE Define relative branch mnemonics
RELATIVE DFHEIENT CODEREG=0,STATREG=(8,9),STATIC=MYSTATIC
....
EX R2,VARMOVE Execute instruction in static area
....
MYSTATIC DS 0D Static data area
MYCONST DC C'constant' Static data value
VARMOVE MVC WORKA(0),WORKB Executed instruction
LTORG , Literal pool
For
more information about the IEABRCX macro, see IEABRCX — Relative branch macro extension in
z/OS MVS Programming: Assembler Services Reference, Volume 2.Assembler language programs that are translated with the DLI option have a DLI initialization call inserted after each CSECT statement. Assembler language programs that are larger than 4095 bytes and that do not use the CODEREG operand of the DFHEIENT macro to establish multiple base registers, must include an LTORG statement to ensure that the literals, generated by either DFHEIENT or a DLI initialization call, fall in the range of the base register.
In general, an LTORG statement is needed for every CSECT that exceeds 4095 bytes in length.
The translator inserts the DFHEIRET macro, with no parameters specified, immediately before the END statement (unless you specify the NOEPILOG translator option to prevent this). END must be in uppercase for the translator to recognize it. If the DFHEIRET macro is invoked before this translator-inserted DFHEIRET macro, the translator-inserted macro does not generate any code.
CICS Transaction Server supports non-Language Environment® assembler language programs that run in 64-bit addressing mode.
*ASM XOPTS(NOPROLOG NOEPILOG)
SYSSTATE AMODE64=YES
The SYSSTATE statement must be on one line, because CICS does not support continuation for this statement. For more information about the SYSSTATE macro, see SYSSTATE — Identify system state in z/OS MVS Programming: Assembler Services Reference, Volume 2.
If the SYSSTATE macro is not specified, or is specified without parameter AMODE64=YES when any of these CICS-supplied macros first generates code, these macros generate AMODE(24) or AMODE(31) code.
You must specify the DFHEIENT macro parameters to specify that your program uses relative addressing instructions, because only relative addressing is supported. For relative addressing, you do not need any base registers to address your program instructions, but you must use at least one register to address static data in your program. Use the STATREG and STATIC parameters to set up one or more static registers.
12,DFHEIENT - AMODE 64 - STATIC REQUIRED
DFHEIENT CODEREG=0,DATAREG=13,EIBREG=11,STATREG=3,STATIC=STAT
DFHEIENT STATIC=STAT
The translator inserts the DFHEIRET macro, with no parameters specified, immediately before the END statement (unless you specify the NOEPILOG translator option to prevent this). END must be in uppercase for the translator to recognize it. If the DFHEIRET macro is invoked before this translator-inserted DFHEIRET macro, the translator-inserted macro does not generate any code.
For more information about the DFHEISTG storage, see Extensions to dynamic storage. For more information about the DFHECALL and DFHEIRET macros, see DFHECALL macro.