references to main storage from either processor are handled as if they were made
on the IPL processor. Existing user programs remain valid for performance data;
they receive the statistics for the main (or IPL) processor.
References to the PSA of the attached processor (or non-IPL processor, in multi­
processor mode) may be made as follows: first, retrieve the value of PREFIXB,
the value of the prefix register for the other processor (the attached processor in
this case). Next, specify addresses that are the sum of the value of PREFIXB and
the PSA displacement. References to 0 through 4095 are made by summing the
value of PREFIXA and the PSA displacement to form the request address. Several
system values that are processor independent are maintained in 0 through 4095, such as the restart PSW and the trace table vectors.
Note: If a reference is made to a real page frame that CP has determined to be
disabled, results cannot be predicted. The CaRET ABLE entry corresponding to
the real page address is checked and, if a disabled condition is found, the operation
is terminated and a program check for a specification exception is presented to the
virtual machine. DIAGNOSE Code X'08' -- Virtual Console Function
Privilege class G
DIAGNOSE Code X'08' enables a virtual machine running in supervisor state to
issue CP commands. The virtual machine must specify the command, the com­
mand parameters, and whether CP is to return the command response to the user's
terminal or to a buffer. In addition to returning the command response, CP sets a
completion code in the Ry register and may set a condition code.
Entry values: When DIAGNOSE Code X'08' is issued, the Rx and Ry registers
must be set up as follows:
Rx --Rx must point to the character string in virtual storage that contains the
CP commands and parameters. If the character string contains multiple com­
mands, each command and its associated parameters must be separated from
adjacent commands by the value X'15'.
Ry --The high-order byte contains flag bits; the other three bytes specify, in
bytes, the length of the CP commands and parameters. The maximum allow­
able length is 240 characters.
Set the flag bits as follows. If CP is to reject a password entered on the same line
as a LINK command, set the high-order bit to a value of one (X'80'). CP rejects
passwords only if the installation specified password suppression during system
generation. If CP is to return the command response in a buffer, set the second
flag bit to a value of one (X'40').
Exit values: If the Ry register contains the value X'OOOOOOOO', the DIAGNOSE
Code acts as a no-operation (NaP) instruction. As a consequence, the issuing vir­
tual machine is placed into a CP-READ state.
If the command response is to be returned in a buffer, Rx and Ry cannot be con­
secutive registers nor can either be register 15. In addition, the Rx+ 1 and Ry+ 1
registers must be setup as follows:
DIAGNOSE Instruction in a Virtual Machine 225
Rx+ 1 --Rx+ 1 must point to the buffer in virtual storage where CP is to return
the command response.
Ry+ 1 --Ry+ 1 must specify, in bytes, the length of the buffer. This value
must not exceed 8192.
Condition If the command response is to be returned in a buffer, CP sets a
condition code and returns information as follows:
condition code 0 condition code 1
The request was successful. The Rx+ 1 register points
to the buffer that contains the command response.
The Ry + 1 register specifies the length of the response.
The request was unsuccessful. The response does not
fit into the buffer. The Ry+ 1 register contains a value
that specifies how many bytes of the response would
not fit into the buffer.
Completion Codes: When CP returns to a program executing a DIAGNOSE Code X'08' instruction, the length value that was supplied in register Ry is replaced by
the CP completion code value. This value is zero if the CP console function was
successfully executed. If an error occurred, the completion code is the numeric
value expressed in the message describing the error. For example, if error message
DMKCFM045E is issued, CP sets a completion code of 45.
If the user has not specified a command response buffer, error messages and
informational messages are generated according to the current values established
by SET EMSG, SET IMSG, and SET MSG commands.
If a command response buffer is used, error and informational messages are always
put into the buffer instead of being written to the console. Each line of the
response is followed by a new line character (X'15'). If the buffer is not long
enough to contain all of the response lines, only as many complete lines as can fit
into the buffer are supplied, so the last character written into the response buffer
by CP is always a new line character. Any unused portion of the response buffer is
not changed. The setting of IMSG is ignored (it is considered always to be ON) and the setting of EMSG determines only whether the error message code is
retained. (SET EMSG OFF is treated the same as SET EMSG ON; SET EMSG TEXT suppresses error message codes.) Messages controlled by SET MSG (such
as "PUN file nnnn to ... ") are not put into the command response buffer unless SET MSG ON is in effect.
The completion code values returned by CP are not affected by the values of EMSG and IMSG, or by the use of a command response buffer.
If CP is executing multiple commands and encounters an invalid command, proc­
essing stops and CP ignores the remaining commands.
Following are two examples showing how to specify DIAGNOSE Code X'08'. The
first example shows how a program issues the QUERY FILES command. In this
example the response is returned to the user's terminal. Note that in virtual storage
environment, a load real address (LRA) instruction must be used to load the Rx
register.
226 VM/SP System Programmer's Guide
Previous Page Next Page