Examples of passing data to the target module

These examples all perform the following function: pass control using the address of the entry name (XCTLEP), have registers 2 through 12 restored, and have the target module receive data in register 1. The control parameter list is inline.

Example 1

An XCTL issuer (not in AR mode) wants to pass a 6-byte token to the target module. The issuer puts the token into register 1 and issues the macro.
XCTL   (2,12),EPLOC=XCTLEP

When the target module receives control, register 1 contains the token.

Example 2

An XCTL issuer (not in AR mode) wants to pass data that resides at the location ADDRDATA.
XCTL   (2,12),EPLOC=XCTLEP,MF=(E,ADDRDATA)

When the target module receives control, register 1 contains the address of ADDRDATA.

Example 3

An XCTLX issuer (in primary or AR mode) wants to pass an address of a parameter list that was built by the CALL macro. The parameter list resides at the location PARM1. Additionally, the issuer wants to limit the search for the target module.
XCTLX  (2,12),EPLOC=XCTLEP,LSEARCH=YES,MF=(E,PARM1)

When the target module receives control, register 1 contains the address of PARM1.

Example 4

An XCTLX issuer (in primary or AR mode) wants to pass a parameter list consisting of the addresses of three parameters. The issuer wants XCTLX to build a user parameter list at the address contained in register 3, and then pass this address to the target module. The three parameters are DATA1, DATA2, and DATA3.
XCTLX  (2,12),EPLOC=XCTLEP,PARAM=(DATA1,DATA2,DATA3),MF=(E,(3))

When the target module receives control, register 1 contains the address of the user parameter list that contains the fullword addresses of DATA1, DATA2, and DATA3, in that order.