I don't know the answer to your question but I share your general 
consternation. This used to be so simple: program, task or subroutine, on entry 
STM and chain.

I've spent enough time on it to think there is no good general answer. I could 
be/hope I am wrong.

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of John McKown
Sent: Tuesday, May 30, 2017 6:39 AM
To: [email protected]
Subject: Save areas (not XPLINK).

As best as I can tell, there are 5 different Save Area formats. There is
the historic 72 byte format. This saves bits 32..63 of GPR 14-12. There is
an F4SA which is 144 bytes and contains bits 0..63 of GPRs 14-12. There is
a F5SA which holds bits 0..63 of the GPRs 14-12 and bits 0..31 of GPRs
0-15. There is F7SA which holds bits 0..63 of GPRs 14-12 and ARs 14-12 plus
"alet of previous save area" (isn't this just AR13 at entry?). And finally,
there is F8SA which is bits 0..63 of GPRs 14-12, ARs 14-12, "alet of
previous savearea", bits 32..63 of GPRs 0-15.

ref:
https://www.ibm.com/support/knowledgecenter/SSLTBW_2.2.0/com.ibm.zos.v2r2.iead200/iead200571.htm

First question: Why save the "high word" of regs 0-15 in addition to the
entire double word of regs 14-12 (all but GPR15)?

Second question: Why say "alet of previous savearea" rather than AR13? Is
there a case where this is _not_ in AR13 at entry? If so, how would I know?

Philosophy question: If I am writing a non-LE enabled HLASM subroutine,
should I check the "save area type" to ensure that my routine is properly
callable from any non-XPLINK routine? I know that the standard says that it
is the _caller's_ responsibility to do this. But I'm paranoid. And I don't
way to ASSuME that the caller is paying attention and by so doing possibly
introduce a memory overlay in the caller. Also, if I get a "bad" type of
savearea, should I "do something", such as using the linkage stack, or
should I abend or maybe return a "failed" return code?

-- 
Windows. A funny name for a operating system that doesn't let you see
anything.

Maranatha! <><
John McKown

Reply via email to