No; the dispatcher gets the PSW from the top RB and the registers from the TCB. 
NB: where are the 12 new FP registers and the non-overlapping vector registers.

The PSW at the time of entry is in the caller's RB and the registers at the 
time of entry are in the new RB. Thus it ever was.

Out of curiosity, what are the fields for the GR top halves?

--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי
נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר

________________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of 
Steve Austin <steve.aus...@macro4.com>
Sent: Wednesday, May 1, 2024 4:03 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: finding callers key in svc

I believe the PSW will be in the PRB rather than the SVRB; the registers
will be in the SVRB.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Erik Janssen
Sent: Tuesday, April 30, 2024 6:14 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: finding callers key in svc

I must be doing something wrong, because if I do that it indicates key 0. I
was expecting key 9 somewhere...

On Tue, 30 Apr 2024 08:50:13 -0500, Wayne Driscoll
<wayne.drisc...@broadcom.com> wrote:

>If you are in a Type 2, 3 or 4 SVC, the PSW at the time of the SVC
>instruction is in the SVRB whose address is in R5 upon entry, that is
>the RBOPSW you would want to interrogate. Your code is looking at the
>PSW at the time the callers RB was created, mostly via a LINK or ATTACH
>SVC, since it was a problem program.
>Wayne Driscoll
>Note: all opinions are strictly my own.
>
>On Tue, Apr 30, 2024 at 4:02 AM Erik Janssen <
>0000062c999269e8-dmarc-requ...@listserv.ua.edu> wrote:
>
>> <snip>
>> >
>> >As to the initial question, as pointed out, it depends on the type
>> >of the
>> SVC. The SVC owner knows what type it is (because they defined it)
>> and can look in the right place for that type of SVC, just as they
>> look in the right place for the caller's regs (for which the answer
>> is different than the psw/key, but similarly depends on the type of the
>> SVC.
>> >
>> </snip>
>>
>> I had the idea that this code in the SVC would give me the key the
>> SVC caller was executing in:
>>
>>         USING RBBASIC,R5          POINT TO REQUEST BLOCK
>>         L     R7,RBLINK           LOAD CALLER RB IN REG 7
>>         DROP  R5                  DROP SVC RB MAPPING
>>         USING RBBASIC,R7          AND NOW MAP CALLER RB
>>         L     R1,RBOPSW           GET CALLER PSW AND PUT IN REG 1
>>         N     R1,=X'00F00000'     ONLY PSW KEY
>>         SRL   R1,16               SHIFT TO 000000K0
>>         ST    R1,KEY              STORE CALLER KEY
>>         DC    H'0'                    FORCE ABEND
>>
>> However, when I call this SVC from an problem program the switches to
>> key
>> 9 before the call:
>>
>>          SPKA  X'90'(0)                      SWITCH TO KEY 9
>>          SVC   255
>>
>> I see that R1 has a value of x'00000080' (key 8) at the time of the
>> abend, where I was expecting x'00000090'.
>> Is see that it is possible that there are more request blocks. I'm I
>> not looking at the right one, and if so, how do you know if you
>> reached the top RB, or is my approach really wrong?
>>
>> Kind regards,
>>
>> Erik Janssen.
>>
>> ---------------------------------------------------------------------
>> - For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to lists...@listserv.ua.edu with the message: INFO
>> IBM-MAIN
>>
>
>
>--
>Wayne Driscoll
>Software Engineer | Mainframe Software Division Broadcom Software
>
>*Office: *630-300-1931* Mobile:* 630-247-1632
>wayne.drisc...@broadcom.com

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
This e-mail message has been scanned and cleared by Google Message Security
and the UNICOM Global security systems. This message is for the named
person's use only. If you receive this message in error, please delete it
and notify the sender.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to