An AMODE 64 target routine often needs to edict whether it is to be entered by BASSM vs BASR/BALR (it cannot "force" that to be done, but it may misbehave if the edict is not followed). A fairly typical convention is for the target routine to capture the caller's AMODE in R14 via BSM 14,0 so that later it can do BSM 0,14. If the routine has preserved 64-bit R14, this works for all caller AMODEs. (An AMODE 64 BASR cannot be returned to by BSM 0,14 of the entry reg 14 without the sort of manipulation that BSM 14,0 does). The BSM-on-entry also can help to accommodate a call that might have been accomplished somewhat "manually" -- set reg 14, set reg 15, BR 15.
But this approach does not work for BASSM, because it captures the target routine's AMODE rather than the caller's AMODE and thus a trailing BSM would return in the target routine's AMODE rather than the caller's AMODE. For BASSM linkage, that leading BSM needs not to be done, and in the general case there is no way to know. Peter Relson z/OS Core Technology Design ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN