On Tue, 18 Dec 2018 12:24:38 -0600, Pierre Fichaud wrote:

>I have 64-bit C code that attempts to fetch() IGGCSI00.
>I've used pragma linkage on IGGCSI00 but got nowhere.
>I am getting the following:
>
>EDC5256S An AMODE64 application is attempting to fetch() an AMODE31 
>executable. (errno2=0xC4070068)
>
>The C program was compiled with :
>langlvl(LIBEXT),ARCH(5),TUNE(7),GONUMBER,FLAG(I),XPLINK(STOREARGS),EXPORTALL,SPILL(448),LP64,GOFF
>
>Reading the doc on fetch() and XPLINK in the C/C++ and LE bookshleves doesn't 
>shed nay light on this.
>I think I am forced to write a64-bit assembler program that then calls 
>IGGCSI00 with parameters in 31-bit memory.

I think you will need to write a small AMODE(64) assembler program that will 
either LOAD, CALL, and DELETE IGGCSI00, or LINK to IGGCSI00. It isn't too 
difficult. Some things to remember:

o The save area that XPLINK-64 provides will be above the bar. If that behavior 
can be modified, I don't know how.
o Use F4SA format to save the registers on entry. LE will pass you a 144-byte 
save area.
o GETMAIN storage for a 144-byte save area plus whatever other storage you need 
for passing parameters.
o Save the 8-byte address of the save area you were passed in offset 128 
(X'80') of the new save area.
o Mark the new save area with "F4SA" in offset 4.
o Copy your parameters to your below the bar storage.
o SAM31 to go to AMODE(31) before making the call.
o If necessary, copy results to where your C program can find them.
o SAM64 before trying to restore registers.

-- 
Tom Marchant

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to