PMFJI here. No, he specifically said ". . . if your code . . . guarantees to callers to preserve R1 . . .". IOW, if you do guarantee to your callers that you will preserve the value in system work registers (14 through 1) then be sure to save and restore what you claim to guarantee.
Peter -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Charles Mills Sent: Monday, June 13, 2016 3:28 PM To: [email protected] Subject: Re: LINK and high order word of R1 So you are saying "if you write a standard (legacy) linkage AMODE<=31 subprogram and use *any* system service then you are obligated to do an STMG/LMG R14,R1,xxxxx"? (Not criticizing or sarcastically contradicting you, just re-stating what you said to be certain.) Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Paul Gilmartin Sent: Monday, June 13, 2016 12:10 PM To: [email protected] Subject: Re: LINK and high order word of R1 On Mon, 13 Jun 2016 11:19:06 -0700, 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 program? > I asked a similar question a while back, concerning STORAGE. An IBM expert explained that certain registers (0, 1, 14, 15?) are fair game for system services. So, if your code, even in AMODE<=31 with a 72-byte save area guarantees to callers to preserve R1 and uses STORAGE, you must do something more to preserve the high word. -- 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 [email protected] with the message: INFO IBM-MAIN
