There is an address of next save area but no ALET of next save area. How does that work?
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Assembler List [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf of Tom Marchant [000000a69b48f3bb-dmarc-requ...@listserv.uga.edu] Sent: Wednesday, February 2, 2022 10:22 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Saving Caller's 64-bit Registers On Tue, 1 Feb 2022 22:36:48 -0500, Tony Thigpen <t...@vse2pdf.com> wrote: >Tom, > >I have reread and reread it. If what Michael seems to be saying is >true, then your charts are wrong. But(!), I think your charts are >right and Michael's wording is giving me problems. I thought I >had this all worked out until Michael's 1/31/22, 16:37 (EST) post >where he said: Michael had one thing wrong, and I have also been writing it wrong in this discussion. That is that a program that uses F7SA format can allocate any size save area that it wants. That is wrong, and I will try to explain why. When a program that alters access registers receives control, it needs to save AR13 and the ASC mode. It is not good enough to save these in the caller's (216-byte) save area, because, when it is ready to return to its caller, it needs to restore AR13 and the ASC mode in order to address the caller's save area. So the ASC mode and AR13 are stored in the new save area, just as the caller's R13 is stored in the new save area. For a standard 72-byte save area, R13 is stored at offset 4. For F4SA, F5SA, F7SA and F8SA, R13 is stored at offset x'80' of the new save area. >"I put F7SA in word1 (not F4SA!) because I saved the caller's registers >in the caller provided save area in that format." In Michael's example, he had program A calling program B and passing it a 216-byte save area, because that is the requirement of program B. Program B saves program A's registers and access registers (except for R13 and AR13) in the save area that program A provided. Program B obtains a new save area, sets F7SA in the new save area, and saves R13 and AR13 in the new save area, along with program A's ASC mode. So program B in Michael's example cannot allocate a 144-byte save area if it is truly using F7SA format. But when B calls C, if C doesn't need to change the Access Registers, it can use F4SA and mark his new save area with F4SA, even if C obtains a 216-byte save area for the programs that it calls. >I wish you would update some of your charts with colored slots using: >Red, slots filled in by caller when he allocated the space. >Green, slots filled in by callee when he first gets control. If I do something like that, it would have to be more like: Red, filled in by program A Green, filled in by program B Blue, filled in by program C -- Tom Marchant