I wrote the LINKed program so I guess the interface is defined any way I want it to be. <g> Seriously, it is assembler called from C++. I would have to plow through a bunch of manuals and do a fine parsing on the language I am sure. There is also a C option as to whether C can count on the high words of the registers, which I set to "use the high words" as a theoretical performance booster.
Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Greg Dyck Sent: Monday, June 13, 2016 11:49 AM To: [email protected] Subject: Re: LINK and high order word of R1 On 6/13/2016 11:18 AM, Charles Mills wrote: > Does that mean that for standard "old-fashioned" AMODE 31 72-byte > savearea linkage I am obligated to save the high word of R1 before > issuing LINK in a called program? If so, this would seem to be a > compatibility issue for older code that uses LINK. Or is R1 fair game > as a work register in a called The fine manual states- Upon return to the caller, the GPRs contain whatever values the called program placed there. So it all depends on how the 'interface' to the LINK'd to program is defined. If R1 is unpredictable on return then use the high half as you wish. If R1 defined as unchanged or returns a 32 bit value you need to save and restore the high half. Greg ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
