I have no experience with this specifically (I do have lots of 31-bit C/HLASM 
experience) but if you are writing the HLASM from scratch, or re-writing it 
somewhat anyway, I would think the easiest thing would be just to write the 
HLASM to be 64-bit.

I found the thought of 64-bit to be scary but the reality was not too bad. (One 
of my called routines switches back and forth because it references 
above-the-bar storage.) Yes, those high halves will get you again and again. 
Yes, LLGTR and LLGT are your friends. I kind of got into the habit of just 
thinking of them as "my load instructions." I checked with Dr. Shum and he said 
there was no performance penalty relative to "normal" loads. 

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Joe Monk
Sent: Tuesday, June 28, 2022 10:33 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: is there any documentation on using the new 64 bit instructions?

If youre using LE, you can't mix 31 and 64 bit, because 64-bit C using LE
uses a 64-bit XPLINK which passes parameters from the stack above the bar.

I think you will have to write a glue assembler module to receive control
in AMODE 64 then SAM31 CALL  SAM64 and back.

Joe



On Tue, Jun 28, 2022 at 9:13 AM Colin Paice <colinpai...@gmail.com> wrote:

> I've been working on calling an (amode 31) assembler program from a 64 bit
> C program, and have been struggling.Is there is a good guide on how to use
> these new instructions?
> For example
> 1)
> I've found you need to use a  LLGTR R1... instruction to clear the register
> before using a L R1... because without it the high part of the register
> will have some 64 bit rubbish in it
>
> 2)
> I used
>
> BAKR  R14,0
> PR
> But it kept returning in amode 24 bit mode.  It needs BSM   14,0  before
> the  BAKR.__
>
> The POP tells you all about the instructions - but not how to use it.  The
> z/OS doc says use BACK/PR  without mentioning the  BSM, so this is not
> completely trustworthy.
> _________________________
> Is there a better place to ask?
>
> Colin
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

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

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