Thanks all.

My 64-bit to 31-bit shim assembles just peachy but the linker thinks it's a 31-bit animal.

Is there something other than AMODE 64 to tell the linker "yes, this really is AMODE(64)"?

Does it matter of it's driven from USS instead of batch?

Thanks.

-- R; <><


On 04/27/16 17:05, Tom Marchant wrote:
On Wed, 27 Apr 2016 09:45:06 -0400, Rick Troth wrote:

How should I call a 31-bit routine from a 64-bit routine? Obviously the
64-bit routine will have had to allocate all its storage below the bar.
But what about linkage? In assembler, it's pretty well documented. What
about higher level languages? To be specific, I have a chunk of C code
that needs to call a 31-bit interface. It's easy to compile it for
31-bit or 64-bit, but the latter doesn't link. (No real surprise there;
just disappointment.)
If you are 64-bit C code, that means you are XPLINK-64, and you can only
call an AMODE 64 program, because the save area that LE allocates for you
will be above the bar. On entry to your AMODE 64 assembler routine, you
will need to save the caller's registers in F4SA format.

Any parameters passed will also be above the bar. If you are going to call
an AMODE 31 program, you'll have to copy them below the bar. And maybe
copy information back before you exit.

I've looked over what docs I can find and don't see any way to cast the
call or explicitly tell the compiler "we're changing AMODE for this
one". Now am thinking it's either something really easy but not widely
known or it's just not possible. Which is it? Thanks.
The book you need is the LE Vendor Interfaces manual. I found that it
makes the POO seem like light reading.


----------------------------------------------------------------------
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