We use XPLINK for our C++ code, and our assembler routines generally use
EDCXPRLG/EDCXEPLG.
There are a bunch of options on these macros that allow you to customize
the kind of XPLINK entry/exit code that you need.

Our prototypes use "C" linkage (which is slightly different and a little
better IMO than "OS_DOWNSTACK".
The thing to do is to take a look at various linkage options and see what
assembler gets generated by the compiler - makes everything clear.

One very nice thing to do is to use the XPLINK stack in your assembler
routine for working storage, save areas. etc.
The CEEDSA macro is essential for using the stack.



Kirk Wolf
Dovetailed Technologies
http://dovetail.com

On Tue, Feb 6, 2018 at 3:17 PM, Charles Mills <charl...@mcn.org> wrote:

> > since they seem to use J
>
> Nyah. Too advanced. Given SYSSTATE ARCHLVL=2,OSREL=ZOSV1R6 I see
>
>          USING *,15
> ABEND    B     IHB0002B       branch around prologue's constant areas
> * PPA1 constant area
>          DC    AL1(IHB0002N+4-*)   offset to the name
>          DC    X'CE' .             CEE signature
>          DC    X'A0' .             CEE flags (ext proc, has DSA)
>          DC    AL1(0+0+16)      .  member flags
>
> And
>
>          CL    0,12(,12)           check for stack overflow
>          BNH   *+10                branch if enough space
>          L     15,116(,12)         load overflow rtn entry address
>          BALR  14,15               invoke overflow routine
> * at this point R0 has the new NAB, R2 has the newly acquired address
>
> Charles
>
>
> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
> Behalf Of John McKown
> Sent: Tuesday, February 6, 2018 12:53 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: RDJFCB function in C++
>
> On Tue, Feb 6, 2018 at 2:38 PM, Charles Mills <charl...@mcn.org> wrote:
>
> > I found my approach below in the IBM documentation on my "day one" of
> > C++/assembler integration. I have never done it any other way.
> >
> > What you are doing is appealing. There is something annoyingly
> > inefficient about a 32-bit pointer to a 32-bit copy of a 32-bit value.
> > I don't think I ever pass shorts but I guess that would lead to a
> > 32-bit pointer to a 32-bit copy of a 16-bit value, given C's integer
> > promotion. (XPLINK is better IIRC.)
> >
> > Do you use EDCPRLG and EDCEPIL with your approach?
> >
>
> ‚ÄčNope - I use the "standard" LE macros: CEEENTRY MAIN=NO and CEETERM.‚Äč I
> guess that I should use the EDC* macros since they seem to use J...
> instructions instead of B...
>
> ----------------------------------------------------------------------
> 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