> Are you sure?  Which rc is going to survive after
> rc = GETSP231(&fullwd2,&fullwd1,&rc);

The one on the left of the equal sign! (Which is the value in R15 when you
execute EDCEPIL.)

By far the easier one to deal with, IMHO. No worries about "pass by
reference," no parameter counting, easy to deal with directly in a C if,
etc.

If it were I, I would 

MODESET KEY=ZERO,MODE=SUP GO INTO SUPERVISOR MODE
STORAGE OBTAIN,LENGTH=(R9),SP=231,LOC=ANY
LR    R3,R1
LR    R5,R15
MODESET KEY=NZERO,MODE=PROB BACK TO MORTALITY
ST    R3,somewhere to pass back
*-------------------------------------------------------------
LR    R15,R5  RC for caller
EDCEPIL

I would also use more meaningful variable names than fullwdn.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Bob Rutledge
Sent: Saturday, April 06, 2013 12:28 PM
To: [email protected]
Subject: Re: C and Assembler question

Scott Ford wrote:
> Guys: 
> I have an Assembler routine below i want to call in C. I have changed it
to be LE conforming. 
...
> great

Are you sure?  Which rc is going to survive after

rc = GETSP231(&fullwd2,&fullwd1,&rc);

Bob

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