When the command terminates execution, or if DMSITS cannot execute it,
the return code is passed in register 15.
A zero return code indicates successful completion of the command. A positive return code indicates that the command was completed, but
with an- apparent error; and a negative code returned by DMSITS indicates
that the typed in com.and could not be found or executed at all.
In the last case, DMSINT assumes that the coamand is a CP command and
issues a DIAGNOSE instruction to pass the command line to the CP environment. If the co.mand is not a CP command, DMSINT calls DMSCiR to
type a message indicating that the command is unknown and the main control loop of DMSINT is entered at the beginning.
If the return code from DMSITS is positive or zero, DMSINT saves the
return code hriefly and calls module DMSAUD to update the Master Pile Directory (MFD) on the user's appropriate user's disk. DMSINT also
frees the TXTLIB chain and releases pages of storage if required.
After updating the master file directory, DMSINT Checks the return
code that was passed back. If the code is zero, DMSINT types a ready
message and the processor time used by the given command. Control is
passed to the beginning of the main control leop of DMSINT. If the
return code is positive, an error message is typed, along with the
Frocessor time used. The command caused the typing of an error aessage of the format: DMSxxxnnnt 'text' where DMSxxx is the module name, nnn
is the message identification number, t is the message type, and 'text'
is the message explaining the error. Control is then passed to the
beginning of the main control loop.
Method of Operation for DMSITS DMSITS (INTSVC) is the CMS system SVC handling routine. Since CMS is SVC driven, the SVC interruption processor is more complex than the
other interruption processors.
The general operation of DMSITS is as follows:
1. The SVC new PSi (low-storage location X'60') contains, in the
address field, the address of DMSITS1. Thus, the DMSITS routine is
entered whenever a supervisor call is executed.
2. DMSITS allocates a system and user save area, as described belove The user save area is a register save area used by the routine,
which is invoked later as a result of the SVC call.
3. The called routine is invoked.
4. Upon return
deallocated. from the called routine, the save areas are
5. Control is returned to the caller (the routine which originally
made the SVC call).
The following expands upon various features of the general operation
that has just been described. CMS Method of Operation and Program organization 2-65
TYPES OF SVCS AND LINKAGE CONVENTIONS The types of SVC calls recognized by DMSITS. and the linkage conventions
for each are as follows: ihen a called routine returns contrel to DMSITS, the user
storage key may be in the PSi. Because the called routine may also have
turned on the problem bit in the PSW, the most convenient way for DMSITS to restore the system PSi is to cause another interruption, rather than
to attempt the privileged Load PSi instruction. DMSITS does this by
issuing SVC 201, which causes a recursive entry into DMSITS. DMSITS determines if the interruption was caused by SVC 201, and if so,
determines if the SVC 201 was from within DHSITS. If both conditions
are met, control returns to the instruction following the SVC 201 with a PSi that has the problem bit off and the system key restored. SVC 202: SVC 202 is the most commonly used SVC in the CMS system. It used--tor calling nucleus resident routines and for calling routines
written as commands. A typical coding sequence for an SVC 202 call is the following:
LA R1,PLIST SVC 202 DC AL4(ERRADD) Whenever SVC 202 is called, register 1 must point to a parameter list (PLIST). The format of this parameter list depends upon the actual
routine or command being called, but the SVC handler examines the first
8 bytes of the list to find the name of the routine or command being
called. It searches for the routine or mOdule as described for SVC 201. The DC AL4(address) following the SVC 202 is opticnal, and may be
omitted if the programmer does not expect any errors to occur in the
routine or command being called. DMSITS can determine whether this DC
was inserted by examining the byte following the SVC call. If it is
nonzero, then it is an instruction; if it is zero, then it is a ntC AL4(address)". SVC 203: SVC 203 is used by CMS macros to perform various internal system-functions. SVC 203 is an SVC call for which no parameter list is
Frovided. An example is DMSFREE, for which the parameters are passed in
registers 0 and 1.
A typical sequence for an SVC 203 call follows: SVC 203 DC B'code'
The halfword decimal code following the SVC 203 indicates the
specific routine being called. DMSITS examines this halfword code as
follows: (1) the absolute value of the code is taken, using an LFR instruction, (2) the first byte of the result is ignored, and the second
byte of the resulting halfword is an index into a branch table, (3) the
address of the correct routine is loaded, and control is transferred
there, as the called routine.
It is possible for the address in the SVC 203 index table to be zero.
In this case, the index entry contains an 8-byte routine or command
name, which is processed in the same way as the 8-byte name passed in
the parameter list passed to SVC 202. 2-66 IBM VM/370 System Logic and Program Determination--Volume 2
Previous Page Next Page