Combining C or C++ and Assembler programs

This topic describes how to communicate between z/OS® XL C/C++ and assembler programs. To write assembler code that can be called from z/OS XL C/C++, use the prolog and epilog macros described in this topic. For more information about how the z/OS Language Environment® works with assembler, see z/OS Language Environment Programming Guide, and z/OS Language Environment Writing Interlanguage Communication Applications.

z/OS Language Environment provides a set of assembler macros for use with 64–bit assembler programs. For information about writing 64–bit assembler programs see z/OS Language Environment Programming Guide for 64-bit Virtual Addressing Mode.

Access to z/OS UNIX is intended to be through the z/OS UNIX XL C/C++ runtime library only. The z/OS XL C/C++ compiler does not support the direct use of z/OS UNIX callable services such as the assembler interfaces. You should not directly use z/OS UNIX callable services from your z/OS XL C/C++ application programs, because problems can occur with the processing of the following:
  • Signals
  • Library transfers
  • fork()
  • exec()
  • Threads
There are comparable z/OS XL C/C++ runtime library functions for most z/OS UNIX callable services, and you should use those instead. Do not call assembler programs that access z/OS UNIX callable services.