I call a C routine to compress char data from my asm code. These are
the steps I use.
1)Load CEEPIPI and save its address.
2)Load the C routine, and save its address.
3)Get stg for the CEEXPIT table.
4)Build the parm list to pre-init the table, then call CEEPIPI to init it.
5)Build the parm list for the C code.
6)Build the parm list for the LE call.
7)Call CEEPIPI using the address saved earlier, with the parm list just
created.
Steps 1 thru 5 are done once. Step 6 & 7 get done on every call.
This works for me.
-- Dave
On 8/19/2014 3:28 PM, Donald Likens wrote:
I have been looking at the LE documentation now for days and still not sure
what I need to do to have my Assembler program call C or C++ programs. I need
this interface to be very efficient because I will be calling these subroutines
maybe more than a 1,000,000 times a day. What I have come up with is to use
CEEPIPI to build the environment.
LA R5,PPTBL GET ADDRESS OF PIPI TABLE
ST R5,@CEXPTBL CEEXPTBL-ADDR -> PIPI TABLE
L R15,PPRTNPTR GET ADDRESS OF CEEPIPI ROUTINE
* INVOKE CEEPIPI ROUTINE
CALL (15),(INITSUB,@CEXPTBL,@SRVRTNS,RUNTMOPT,TOKEN)
I will have three subroutines so I think I need to put each one of these
routines in the preinit table.
Now I think I need to use CEEPIPI again when I want to call each subroutine.
ST R11,PARM
L R15,PPRTNPTR GET ADDRESS OF CEEPIPI ROUTINE
CALL (15),(CALLSUB,PTBINDEX,TOKEN,PARM, X
SUBRETC,SUBRSNC,SUBFBC) INVOKE CEEPIPI ROUTINE
Note:
Note: The C routines have not been created yet, so I can't try these things out.
Questions:
1) Do I have it correct?
2) Do I even need LE?
3) The book talks about XPLINK. I don't quite understand it. Is this something
I should explore more?
----------------------------------------------------------------------
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