On 13 March 2017 at 15:10, Tom Marchant <[email protected]> wrote: [me] >>There is no mention of any R13 requirement, and this makes sense >>because all the callable services are stubs that figure out which PC >>to issue, and then issue it. > > There isn't much that these stubs can do to figure out what PC to > issue without using any registers.
They can use 0, 1, 14, 15. And "General and access registers 0, 1, 14, and 15 are not restored", so they can clobber those too. > I looked for "save area" in that > manual and found references in Appendices E and F that seem to > indicate a requirement for a save area address in R13. Those are examples, not definitions. The calling conventions section has no reference to R13 that I can find. >>What is slightly less clear is if R15 >>must point to the entry point of what you call. > > It seems clear to me. "Register 15 is set up by the CALL macro; it > contains the entry point address of the service stub that is being > called." Sure - that's if you choose to link the service stubs into your code, which I can see no reason for LE or C or COBOL or indeed anyone to do. If you call the service directly, they don't suggest using the CALL macro; they show a BALR R14,R15 directly. Whether R15 actually needs to be set is unknown. > In any case, R14 is the return address. That is standard linkage, not XPLINK. How does XPLINK know where to return to? Tony H. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
