This is the call syntax in HLASM for calling the stub routine CUNLASE (case conversion for 31-bit callers) and CUN4LASE (case conversion for 64-bit callers). A
sample program, CUNSASMA, is provided in SYS1.SAMPLIB.
For AMODE (31)
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
GETMAIN ........ Obtain storage for parameter area
* in primary address space.
LR R4,R1 Save parameter area address
USING CUNBAPRM,R4 Make parameter area addressable
XC CUNBAPRM,CUNBAPRM Init PARAMETER AREA TO BINARY 0
LA R15,CUNBAPRM_VER Get Version
ST R15,CUNBAPRM_VERSION Store to parameter area
LA R15,CUNBAPRM_LEN Initialize Length
ST R15,CUNBAPRM_LENGTH Move to parameter area
LA R0,CUNBAPRM_TO_UPPER Get conversion type
STC R0,CUNBAPRM_CONV_TYPE Store to parameter area
*
* Supply source buffer pointer, length and ALET.
* Supply target buffer pointer, length and ALET.
* Supply DDA buffer pointer, length and ALET.
* Note: A DDA is always required. The required DDA length is
* defined by constant CUNBAPRM_DDA_REQ.
*
* Fill all required fields of the parameter area.
CALL CUNLASE,((R4)) Call stub routine with CUNBAPRM
* address as argument.
CUNBAIDF DSECT=YES Provide Mappings (CUNBAPRM, return and
* reason codes, constants for version
* and length).
For AMODE (64)
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
GETMAIN ........ Obtain storage for parameter area
* in primary address space
LR R4,R1 Save parameter area address
USING CUN4BAPR,R4 Make parameter area addressable
XC CUN4BAPR,CUN4BAPR Init PARAMETER AREA TO BINARY 0
LA R15,CUN4BAPR_VER Get Version
ST R15,CUN4BAPR_VERSION Version Store to parameter area
LA R15,CUN4BAPR_LEN Initialize Length
ST R15,CUN4BAPR_LENGTH Move to parameter area
LA R0,CUN4BAPR_TO_UPPER Get conversion type
ST R0,CUN4BAPR_CONV_TYPE Store to parameter area
*
* Supply source buffer pointer, length and ALET.
* Supply target buffer pointer, length and ALET.
* Supply DDA buffer pointer, length and ALET.
* Note: A DDA is always required. The required DDA length is
* defined by constant CUN4BAPR_DDA_REQ.
* Set flags
*
* CALL CUN4LASE,((R4)) Call stub routine with CUN4BAPR
* address as argument.
* CUN4BAID DSECT=YES Provide Mappings (CUN4BAPR, return and
* reason codes, constants for version
* and length).