The simple answer to the "problem child" case is not "don't do that", but instead:
If you use it, you save it and restore it for your caller. Don't expect anyone else to save it, so if you really need it after you get started then save again in your own storage before you call someone else who may or may not preserve it. Peter -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Paul Gilmartin Sent: Wednesday, October 17, 2018 6:38 PM To: [email protected] Subject: Re: COBOL 64bit On Wed, 17 Oct 2018 15:20:44 -0700, Charles Mills wrote: >And FWIW there is another overlapping complexity here besides AMODE 64 -- >speaking in theory only, because there is no reality of 64-bit COBOL. > >... A program could be AMODE 31 but either destroy the high halves of a >caller's registers and/or expect a called program to preserve the high halves >of its registers. (There are many common uses of all 64 bits of a register >outside of AMODE 64.) > Sounds like a "Don't do that!" Must a 31-bit caller not depend on both halves of R2-R13 being preserved by a 31-bit subroutine? -- 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
