Page 1 of 1

DIAGNOSE CODE documentation

PostPosted: Thu Sep 01, 2016 1:41 pm
by sensuixel
Hello

I recently found in an old Xephon release a program whose purpose is to retrieve information from PR/SM.
As I looked at the code, I found something new to me : DIAGNOSE CODE

FIX0     DS     0H
         LA     R0,1                   AUTHORIZATION SVC : AUTH ON
         MODESET  MODE=SUP,KEY=ZERO
         LRA    R1,0(R8,0)             LOAD REAL ADDRESS OF BUFFER
         LA     R0,4                   GET INFORMATION FROM PRSM
         DC     X'83',X'10',X'0204'    DIAGNOSE CODE 0204
         LTR    R0,R0                  EXECUTION CORRECT ?
         BNZ    ITSBAD                 NO
         MODESET  MODE=PROB,KEY=NZERO
         XR     R0,R0                  AUTHORIZATION SVC : AUTH OFF


Can anyone point me to a documentation on the subject, I did'nt find anything thus far and I find it really interesting.

Thank you

Re: DIAGNOSE CODE documentation

PostPosted: Thu Sep 01, 2016 1:50 pm
by enrico-sorichetti
most of the information related to DIAGNOSE will be found in the VM manuals

the DIAGNOSE instruction is really simple

it is the DIAGNOSE CODE that determines the work done

and that depends on WHO processes the diagnose

CP dependent - for systems running under VM
MODEL dependent - for systems running on bare iron

BTW the snippet is just wrong,

since the DIAGNOSE wants REAL addresses
the areas used for the diagnose should be pagefixed

Re: DIAGNOSE CODE documentation

PostPosted: Thu Sep 01, 2016 4:37 pm
by sensuixel
Thank you, I never would have searched in the z/VM library.

Re: DIAGNOSE CODE documentation

PostPosted: Thu Sep 01, 2016 4:59 pm
by enrico-sorichetti
since I had the link handy, here it is
https://www.ibm.com/support/knowledgece ... diagco.htm