On Thu, 1 Sep 2016 13:32:58 -0500, Janet Graff wrote: >Suppose I have a 64-bit XPLINK C program that calls an assembler program using: > >#pragma linkage(MYSUB, OS_NOSTACK); > >What linkage should the 64-bit assembler routine use? Obvious it can't just >be standard linkage because it needs to save off 13 double words instead of 13 >single word registers. But does the assembler routine need EDCXPRLG?
As I wrote in my previous reply, "I would save the registers in F4SA format. See the Assembler Services Guide, Linkage Conventions, chapter 2. Make sure you are using at least the z/OS 1.12 edition of the book. The chapter was extensively rewritten for that release." The XPLINK-64 program will provide the address of a 144-byte save area in register 13. No, the assembler routine does not need, and should not use, EDCXPRLG. That is for an assembler routine that conforms to XPLINK linkage requirements. Your assembler program is not an XPLINK program. >What if that 64-bit assembler routine calls a 31-bit non-LE, non-XPLINK >assembler subroutine? At that point we're just using standard linkage, right? Right. There is no problem with that. Your 64-bit assembler program would allocate a 144-byte save area. The 31-bit programs that you call will only use 72 bytes of it. The linkage conventions for 64-bit programs were designed to be compatible with 31-bit programs. Please read the Linkage Conventions chapter of the Assembler Services Guide. Mr. Relson did an excellent job of rewriting it to make it clear for the z/OS 1.12 edition of the book. Sample code is provided. -- Tom Marchant ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
