I'm contemplating my first HLASM function to be called from XPLINK C++. (I'm
quite experienced with HLASM in general, including old-fashioned OS/360
linkage.) It's not going to be a very complex function: three input
parameters, minimal processing and a return code.

 

Gosh, it seems like the documentation is fragmented here and there! There
seems to be a little bit in LE Vendor Interfaces, a little bit in the LE
P/G, a little bit in LE Writing ILC, a little bit in the XLC P/G, . The only
example I find is tiny and uses a couple of obscure features.

 

If this is actually all documented in one place somewhere, with a couple of
good examples, please just point me there.

 

The arguments come in to the HLASM in R1-R3. If the C++ says FOO(17) then R1
will contain 17 and if the C++ says BAR(&SOJACK) then R1 will contain the
address of SOJACK?

 

I put the return code in R3, like I used to put it in R15?

 

R4-R7 I guess I need to preserve? In my case I can live without touching
them. But if I needed to alter them, I have to save them? Where? Anywhere I
want in my writeable storage? There is no saving "convention" like the old
STM 14,12,12(13)? 

 

R7 I need to preserve because R7 is the return address, like R14 in the old
days. EDCXEPLG will handle return linkage just so long as R4-R7 and R12 are
good?

 

Where is the DSA? Where is my writeable storage? My "work area"?

 

I guess I need to preserve R12?

 

So R13 through R3 and R8 through R11 are mine to play with without saving
and restoring, other than that the parms come in in R1-R3 and the return
code needs to end up in R3?

 

Thanks,

 

Charles 

 

Reply via email to