HLASM Programmer's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


External function processing

HLASM Programmer's Guide
SC26-4941-06

The assembler calls an external function each time it processes a SETAF or SETCF instruction. The assembler loads the external function module when the first call to the module is encountered. The assembler expects the external function module to be generated in 31-bit addressing mode (AMODE 31). The external function must return to the assembler in the same addressing mode from which it was called after restoring the registers to the values they contained at the time of the call. Only one copy of the load module is loaded, so it must be serially reusable. The assembler must be able to locate the external function module as follows:

z/OS
The external function must be a link-edited load module in a partitioned data set, or a program object in a PDSE, that is in the standard search sequence. The external function can also be located in the Link Pack Area (LPA).
z/VM
The external function must have a file type of MODULE and be located on one of the accessed disks. To generate the module, use the CMS LOAD and GENMOD commands. When the LOAD command is issued, specify the RLDSAVE option to make the module relocatable. If RLDSAVE is not specified, the assembler program or data storage might be overlaid during execution.
z/VSE
The external function must be a relocatable phase in a sublibrary that is specified in the LIBDEF phase search chain. The external function can also be located in the Shared Virtual Area (SVA).

Using the SIZE Option to Reserve Storage: External function modules are loaded by the assembler during the assembly, which is after the assembler completes initialization. Therefore, allow enough virtual storage in the address space (z/OS and CMS) or the partition (z/VSE) in which the assembler runs, so that the external function modules can be loaded successfully, and for any storage that your external function might acquire. You can reserve storage for your external function modules by reducing the amount of storage the assembler uses. Use the SIZE assembler option to control the amount of storage the assembler uses.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014