Re: Determining AR or Primary Mode
On Thu, 4 Feb 2021 19:44:00 -0500 Tony Harminc wrote: :>On Thu, 4 Feb 2021 at 18:12, Steve Smith wrote: :>> The instruction is IAC, in PoOp Chapter 10. :>Hmmph... I never noticed that one. I use EPSW (generally R0,0) and the :>appropriate TMLx instruction(s) to examine whichever bits I'm :>interested in. IAC has the advantage of setting the condition code :>directly based on the AS bits, but EPSW is more general, and is not a :>semi-privileged instruction subject to extraction-authority control :>(though I doubt that matters in most z/OS environments). IAC also provides the value needed for SAC, should you wish to restore it. It would have been nice if there was also an IAM/SAM set rather than needing to use the TAM condition code to decide which variant of SAM to issue. -- Binyamin Dissen http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel Should you use the mailblocks package and expect a response from me, you should preauthorize the dissensoftware.com domain. I very rarely bother responding to challenge/response systems, especially those from irresponsible companies.
Re: Determining AR or Primary Mode
It is uncommon to want to do this. If you are SVC-entered or PC-entered, you should know (because at some point you set up the definition). If you are branch-entered when it might be either primary or AR, you would usually save status via BAKR, then switch unconditionally to whichever mode you want to run in and then when you want to determine what mode your caller was in you would use ESTA with the option to extract the PSW from the linkage stack and look at the result (doing the same sort of test that was mentioned if you had done EPSW). It is typically much far more convenient to run in a known state and then, if you need to do something based on your called state, switch conditionally to that, and then switch back to the known state. Peter Relson z/OS Core Technology Design
Re: Determining AR or Primary Mode
On Thu, 4 Feb 2021 at 18:12, Steve Smith wrote: > > The instruction is IAC, in PoOp Chapter 10. Hmmph... I never noticed that one. I use EPSW (generally R0,0) and the appropriate TMLx instruction(s) to examine whichever bits I'm interested in. IAC has the advantage of setting the condition code directly based on the AS bits, but EPSW is more general, and is not a semi-privileged instruction subject to extraction-authority control (though I doubt that matters in most z/OS environments). Tony H.
Re: Determining AR or Primary Mode
The instruction is IAC, in PoOp Chapter 10. sas On Thu, Feb 4, 2021 at 5:51 PM esst...@juno.com wrote: > Hello > . > Im looking for an assembler instruction that informs me if I'm in AR or > primary mode. > . > Im on a z/OS 2,1 system- > I thought there was an instruction that would test for AR Mode or Primary > Mode. > . > I read the TAR (test Access) instruction and I don't see how that > instruction would > determine if a program or a routine was entered in Primary or Access > Register (AR) mode. > Is there an instruction to inform me of the mode ? > Is there different way to test ? > . > Paul D'Angelo > . > . >
Determining AR or Primary Mode
Hello . Im looking for an assembler instruction that informs me if I'm in AR or primary mode. . Im on a z/OS 2,1 system- I thought there was an instruction that would test for AR Mode or Primary Mode. . I read the TAR (test Access) instruction and I don't see how that instruction would determine if a program or a routine was entered in Primary or Access Register (AR) mode. Is there an instruction to inform me of the mode ? Is there different way to test ? . Paul D'Angelo . .