Ref: Your note of 29 January 2018, 07:49:23 -0500 Someone wrote: > For this topic, it doesn't matter whether it's C or Metal C.
>From z/OS XL C/C++ V2.1.1, you can embed inline assembly instructions in C/C++ programs without having to use Metal C, and those instructions can include system macros. The C/C++ compiler invokes HLASM (at APAR level PI21235 or above) to assemble a source file containing all of the fragments, with the source provided in main storage and the binary object code returned in main storage (using HLASM exits), then the binary code fragments are embedded at the appropriate points in the C object code. There are various restrictions, in that for example no relocatable address constants are allowed, but macros are allowed. Each inline code fragment is defined to HLASM as a separate CSECT (which makes it easy to pick out the binary code for that fragment from the overall object output, and also reduces the risk of assembly-time dependencies between separate fragments). I don't consider it a very programmer-friendly environment, but it does mean that in theory any hardware function or software interface that you could access in HLASM can also be accessed in C/C++ without having to use Metal C or call a separate HLASM subroutine. Jonathan Scott HLASM, IBM Hursley, UK
