On Tue, 4 Apr 2023 16:37:39 -0500, Charles Mills wrote: >I just had a similar problem: "how do you determine your entry R0 from C?" I >asked here and got no answer. I had to front end the C with a tiny assembler >program (57 lines including extensive comments; 11 executable instructions). >Why did the C need its entry R0? Because it is called from Rexx, and needs to >call IRXEXCOM, and so needs the Rexx environment block. > In: <https://www.ibm.com/docs/en/zos/2.5.0?topic=irxexcom-entry-specifications> I read: Register 0 Address of an environment block (optional) "optional" is intriguing. What are the other options? Must R0 point to addressable storage? The environment block begins with an identifier, CL8‘ENVBLOCK’. If the content of R0 doesn't match, is it simply ignored?
Does C provide access to the entry RSA? If so, the STM 14,12,12(,13) leaves R0 at RSA+20. But you still need to pass the IRXEXCOM to >Why the ^%$^%$#$^% do people come up with these non-standard linkages? Rexx >passes a bunch of parameters -- why not pass the Environment Block address >that way? > I think the REXX code germinated on CMS where there's less discipline. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
