Re: Saving Caller's 64-bit Regsiters

2022-01-24 Thread Charles Mills
This problem is complex in theory but simple in (your) practice. Save/restore the lower halves with an STM/LM R14,R12,12(R13) on entry/exit. Save and restore the upper half of any register you destroy using a save area of your choice. The lower half of an otherwise unused register is good. A

Re: Saving Caller's 64-bit Regsiters

2022-01-24 Thread Seymour J Metz
I'm a bit confused. I understand that there is no way to determine whether the the caller has provided a 144-byte save area. However, I don't understand the issue for running the forward chain, assuming that all called routines have set the forward pointer, other than detecting the end of the

Re: Saving Caller's 64-bit Regsiters

2022-01-24 Thread Farley, Peter x23353
Especially since in z/OS it is now documented to pass a 144-byte save area to the step-level "PGM=" executable. AFAIK, what size save area either the online TMP or the batch TMP's (IKJEFTxx, IRXJCL) pass to Rexx is not documented. I don’t know what z/VSE documents as the program-level save

Re: Saving Caller's 64-bit Regsiters

2022-01-24 Thread Seymour J Metz
On Friday I submitted this to IBM: Chapter 12. TSO/E REXX programming services of z/OS 2.5 TSO/E REXX Reference, SA32-0972-50 does not specify whether external functions are called with a 72-byte save area or a 144-byte save area. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3

Re: Saving Caller's 64-bit Regsiters

2022-01-24 Thread Gary Weinhold
For both VSE and zOS, there is REXX documentation (VSE'sis at https://www.ibm.com/docs/en/zvse/6.2?topic=packages-interface-writing-external-function-subroutine-code that states that on entry to the called routine Register 13 contains the address of a register save area. What it doesn't say is

Re: Saving Caller's 64-bit Regsiters

2022-01-24 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 01/24/2022 02:01:29 PM: > 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

Re: Saving Caller's 64-bit Regsiters

2022-01-24 Thread Tom Marchant
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

Re: Saving Caller's 64-bit Regsiters

2022-01-24 Thread Tom Marchant
When you say that it "makes no sense", I think you mean that you don't understand it. The second word of a save area cannot be set by the caller. Or, rather, if it is, it will be destroyed by the called program. How does a program know how a caller will use the save area that is passed to

Re: Saving Caller's 64-bit Regsiters

2022-01-24 Thread Tom Marchant
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