Replying to my own post to elaborate a little.

When a program allocates a save area to pass to its callers, there is only 
one word, the second word, that it can use in the new save area. 
Everything else is reserved for the called program. The oldest documentation 
for the standard 72-byte save area that I have been 
able to find was published in 1966, but I'm sure the convention is much 
older than that.
http://www.bitsavers.org/pdf/ibm/360/os/R01-08/C28-6541-1_Control_Program_Services_Apr66.pdf
That manual says that the forward chain is optional. And so, the forward 
chain has never been reliable.

When I'm following save area chains in a dump, starting with R13, I look 
at the second word. If it is an address, I know that the save area at that 
address is a standard 72-byte save area. If it is F4SA, F5SA, F7SA, or F8SA, 
offset X'80' from R13 is the address of the save area, and I know what 
format it is. 

It is a little like the problem of where to store the value of R13 upon 
entry to my program. It doesn't do me any good to store it in the save 
area that my caller passed me. So I save it in the save area that I 
allocate for the programs that I call.

-- 
Tom Marchant

On Mon, 24 Jan 2022 11:20:20 -0500, Tom Marchant <m42tom-ibmm...@yahoo.com> 
wrote:

>If your program can be called by a program that you don't control, and that 
>doesn't document that it provides something more, you have to assume 
>that you re only provided a 72-byte save area.
>
>There is no code that a program can provide in the first word of a save area 
>that could describe the save area. That is because the first word is defined 
>as for the use of language products.
>
>-- 
>Tom Marchant
>
>On Fri, 21 Jan 2022 09:32:07 -0500, Dave Clark <dlcl...@winsupplyinc.com> 
>wrote:
>
>>My program is being
>>called by REXX and I'm not aware of any documentation stating what kind of
>>register save area REXX provides.  That is why I asked and was wondering
>>if there is, perhaps, a code in the first word of the save area that
>>indicated the format used -- and, in the absences of such a code, the
>>72-byte savearea is all there is.

Reply via email to