On Thu, 1 Sep 2016 10:42:41 -0500, Janet Graff wrote: >Suppose I have a 64-bit XPLINK C Module that uses > >#pragma linkage(assembler_routine, OS_NOSTACK) > > to call the 64-bit assembler_routine. > >Would the 64-bit assembler subroutine use the EDCXPRLG
No. EDCXPRLG is for an assembler program that follows XPLINK conventions. >or some variation of standard linkage 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. >(obviously we'd need to save off 13 double word registers and not 13 single >word registers)? Correct. >How does the #pragma linkage affect the linkage convention between C and >assembler? The #pragma tells the compiler that you want to call a program that follows standard OS linkage. It will allocate a 144-byte save area for you to use and put the address in register 13. If your program was a 31-bit XPLINK program, the save area would only be 72 bytes. > >Suppose that 64-bit assembler copies the parameter list to 31-bit land, >switches to 31-bit and then calls a non-LE, non-XPLINK 31-bit assembler >subroutine. At that point we'd be safe using standard linkage, correct? Yes, but you'd need to copy not just the parameter list, but the parameters as well. And if your assembler routines modified any of those data areas that are passed, you'd need to copy it back to the areas that were provided. If I were to write new code such as you describe, I would use AMODE 64 programs and F4SA to save registers in each one. It's not that hard, and the samples in the book are well tested. -- Tom Marchant ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
