>I'm used to doing a BSM to return as a subroutine to have 
>addressing modes match. I had assumed that the caller did 
>BSSM not just BASR or BALR

Whether BASSM, BASR, or BALR bit 32 of the 64-bit GR will be on if the 
caller was AMODE 31.
But if the call was done via
LA    14,return_address
B     0(15)

Then you're out of luck.

I trust that "BSM R14" was a typo and you meant "BSM 0(R14)"

If you know that you're not called by BASSM, then BSM 14,0 upon entry will 
make sure that you can return via BSM.
But if you are (or can be) called by BASSM, that does not work. That's why 
the TAM instruction upon entry is not helpful for such a case - it only 
tells you the current AMODE which might not match the caller's AMODE.


Peter Relson
z/OS Core Technology Design

Reply via email to