LE Vendor Interfaces -- You better have  double Phd in Math and Engineering 

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Tom Marchant
Sent: Wednesday, April 27, 2016 4:05 PM
To: [email protected]
Subject: Re: mixed AMODE with HLL | 64-bit to 31-bit

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.

--
Tom Marchant

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to