XPLINK parameter passing and return code conventions

XPLINK uses a logical argument list consisting of contiguous 32-bit words, where some arguments are passed in registers and some in storage.

The argument list is located in the caller's stack frame at a fixed offset (+2112) from the stack register (GPR 4). It provides space for all arguments, including those passed in registers. It also includes an extra unused word (4 bytes), which might be required in compatibility situations, at the end of the argument area. Its size is sufficient to contain all the arguments passed on any call statement from a procedure associated with the stack frame.

Function return values are also returned in registers. When the return value will not fit in registers, it is always returned in a buffer allocated by the caller. For more details on XPLINK parameter and return value conventions, see z/OS Language Environment Vendor Interfaces.