>I assume that there is a special method of returning to a AMODE 64 >caller since there is no mention in the R14 description. I have a >vague impression that the low bit of the return address being 1 (as >opposed to 0) indicates a return in AMODE 64.
I would say that your assumption is incorrect. For things like ATTACH and LINK, BR 14 (or BSM 0,14) work fine. If you have defined that your interface is to be called by BASSM (regardless of your AMODE) then you are expected to return by BSM. If you are called by BASSM from AMODE 64 then it would be true that the low bit of R14 would be on. If you are called by BASR and switch AMODEs, you can issue BSM 14,0 at the beginning in order to accommodate BSM 0,14 at the end. >1) If in AMODE64 when the STIMERX macro was issued, >why was bit 32 on in R15? Seems wrong to me. I'd say it's because you're expected not to need it or care, so no change was made to the existing logic which set the high bit on when PSW bit 32 (on both for AMODE 31 and AMODE 64) is on. Could it have been done differently? Sure. Will it be changed? Not likely. >2) Why didn't the "LA 1,STIMECB" abend on an S0C4-38 >when bit 32 on the base reg was on? Because you cannot get a PIC 38 on a LA instruction. As someone mentioned, it is just doing architecturally-defined arithmetic. >>AMODE 64 routines should be using relative branch and generally >>should establish addressability to a static data area >What if the code is shared? That goes against decades of coding to be >reentrant and refreshable. There is no conflict with what I wrote versus being reentrant and refreshable. If reentrant / refreshable you would also have addressability to a dynamic data area. But you would still use relative branch and would still have addressability to whatever static data you need. Peter Relson z/OS Core Technology Design ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
