That's what I did, for example to be able to call SWAREQ etc. from C or certain machine instructions which cannot be reached from C otherwise. Very small ASSEMBLER routines with clean C interfaces.
Because we are only using 31-bit C with standard linkage conventions and NORENT, the linkage to the ASM routines is a no-brainer. No XPLINK. Even no LE dependencies or considerations. LE doesn't even notice that there are some small ASM routines doing some system-related work. Kind regards Bernd Am 15.08.2022 um 21:23 schrieb Kirk Wolf:
IMO, If you are going down the path of writing C/C++ for z/OS of much significance, you will likely need to write some assembler routines that you can call from C/C++. Just bite the bullet and figure out the calling conventions (XPLINK?) and you will be glad in the long run. The compiler inlining support is another option that often good, but in many cases it can be tricky because you have to carefully declare all of the register clobbers, not to mention the crazy syntax and symantics of __asm. Kirk Wolf Dovetailed Technologies, LLC http://coztoolkit.com Dovetailed Technologies: +1 636.300.0901 Note: Our website and domain name have changed from dovetail.com to coztoolkit.com
---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN