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:

"I put F7SA in word1 (not F4SA!) because I saved the caller's registers in the caller provided save area in that format."

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.


Tony Thigpen

Tom Marchant wrote on 2/1/22 17:08:
On Mon, 31 Jan 2022 17:02:37 -0500, Tony Thigpen <t...@vse2pdf.com> wrote:

Michael,

Again, bear with me. I am trying to wrap my head around this stuff.

On your last point about using F7SA for a 144 byte save area. You
said you put F7SA in the 144 byte area because the previous save
area was a 216 bytes and use as a F7SA.

This is correct. The second word describes how a called program
uses the save area that it is passed. If an AR-mode program knows
that none of the programs that it calls will require more than a
144-byte save area, it can provide only that, even though it needed
a 216-byte save area for its own use and marked the save area that
it obtained as F7SA. There is no conflict here.

Then, that means that Tom's 2012 presentation has flaws.
On slide 24, the save area labeled 'F5SA' should have 'F4SA'.

No, it shouldn't. The first program provided only a 72-byte save area.
The second program needs to save the 64-bit registers but cannot
use F4SA because it wasn't provided a 144-byte save area. So it
allocates a 216-byte save area and saves the high halves starting at
x'90' in its own save area. This leaves 144 bytes for programs that it
calls. The save area is marked F5SA because that is the format that
it used to save its caller's registers.

The third program needs a 144-byte save area to save its caller's
registers, so it saves the registers in F4SA format in the caller's save
area (the one marked F5SA), and stores F4SA in the save area that
it allocates.

On slide 25, the middle save area should have 'F4SA' and the right save
area should have 'F5SA'.

This would be wrong. The second program did not use F4SA format
to save its caller's registers because it did not know that it had a
144-byte save area to use. And the third save area used F4SA format
and not F5SA format because it expects a 144-byte save area.

And a similar flaw in slides 26 and 27.

Similarly, these are as intended, and they match the documentation.

--
Tom Marchant

Reply via email to