Isn’t there is some C library function (maybe unique to XLC/C++) that lets you get the value of R13 (current DSA pointer)? With that pointer value in hand, couldn’t one chain up the DSA stack to get to the saved registers at entry, or is that not possible?
At worst, an inline ASM routine to copy the value of the current R13 to a C pointer variable, then chain up the DSA stack? Peter From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Charles Mills Sent: Wednesday, November 15, 2023 12:39 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: External Functions in C on z/OS I see, in my C++ projects, EFPL, ENVB, EVALB and SHVB structs that appear to me to have been produced from IBM macros by the EDCDSECT tool. Have you looked for the IRX macros in SYS1.MACLIB? Are you familiar with EDCDSECT? Slightly changing the subject, to interface with the Rexx environment from a called function you will need the entry R0, I found no great way to get that. I had to write a tiny front end in assembler that passes R0 to a C/C++ main(). Charles On Wed, 15 Nov 2023 10:57:14 -0600, Eric Erickson <esf...@windstream.net> wrote: >I've written quite a few callable external functions for Rexx over the years. >On z/OS I've always used assembler as we needed to access system services for >a variety of tasks. I've written them in C for other platforms (OS/2 & >Windows) over the years. I need to write some on z/OS, but I want to use C, >but can not seem to find any examples or header files for the Rexx Control >Blocks. I can't believe nobody has done this over the years? Is it even >supported? -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN