Inserting HLASM instructions into the generated source code

You can use the __asm language extension to specify assembly instructions to be embedded within the generated HLASM source code. For example, you can embed assembly statements that invoke assembler macros to obtain system services.

Use the __asm statement only to embed a short sequence of assembler instructions into a C function, to perform actions that cannot be done using C statements. If you need to use a long routine, put the assembly statements into a source file, assemble it separately, and then call the routine from the C program.

Note: The compiler supports a collection of hardware built-in functions, such as __csg. These hardware built-in functions allow the compiler more freedom in blending embedded assembly statements with the rest of the code. For this reason, a hardware built-in function might be better than an __asm statement for embedding the assembly instructions that you need.
In addition to the __asm language extension, there are language constructs for the following purposes: For information about hardware built-in functions, see Using hardware built-in functions in z/OS XL C/C++ Programming Guide.