Whenever possible, CMS commands are executed with a user protect key.
This protects the CMS Nucleus in cases where there is an error in the
system command that would otherwise destroy the nucleus. If the command
must execute a single instruction or small group of instructions that modify nucleus storage, then the DMSKEY or DMSEXS macros are used, so
that the system PSW key will be used for as short a period of time as is
possible. CMS SVC HANDLING DMSITS (INTSVC) is the CMS system SVC handling routine.
operation of DMSITS is as follows:
The general
1. The SVC new PSi (low storage location X'60') contains, in the
address field, the address of DMSITS1. The DMSITS module will be
entered whenever a supervisor call is executed.
2. DMSITS allocates a system and user save area. The used as a register save area (or work area)
routine.
3. The called routine is called (via a LPSW or EALR).
user save area
by the called 4. Upon return from the called routine, the save areas are released.
5. Control is returned to the caller (the routine that originally made
the SVC call). SVC TYPES AND LINKAGE CONVENTIONS SVC conventions are important to any discussion of CMS because the
system is driven by SVCs (supervisor calls). SVCs 202 and 203 are the most common CMS SVCs. SVC 202 is used
calling routines
modules).
both for
written
calling nucleus-resident routines, and for
as commands (for example, disk resident
A typical coding sequence for an SVC 202 call is the following:
LA Rl,PLIST SVC 202 DC AL4(ERRADD) Whenever SVC 202 is called, register 1 must point to a parameter list (PLIST). The for.at of this parameter list depends upon the actual
routine or co.mand being called, but the SVC handler will examine the
first eight bytes of this parameter list to find the name of the routine
or command being called.
The "DC AL4(address)" instruction following the SVC 202 is optional,
and may be omitted if the programmer does not expect any errors to occur
in the routine or command being called. If included, an error return is made to the address specified in the DC. DMSITS determines whether this DC was inserted by examining the byte following the SVC call inlinea A nonzero byte indicates an instruction, a zero value indicates that "DC AL4(address)" follows.
2-26 IBM VM/370 System Logic and program Determination--Volume 2
SVC 203 is called by macros to perform various internal system functions. It is used to define SVC calls for which no parameter list
is provided. For example, parameters are passed in registers 0 and 1.
A typical calling sequence for an SVC 203 call is as follows: SVC 203 DC H'code'
The halfvord decimal code following the SVC 203 indicates the
specific routine being called. DMSITS examines this halfword code,
taking the absolute value of the code by an LPR instruction. The first
byte of the result is ignored, and the second byte of the resulting
halfvord is used as an index to a branch table. ine address of the correct routine is loaded, and centrol is transferred to it.
It is possible for the address in the SVC 203 index table to be-zero.
In this case, the index entry will contain an 8-byte routine or co.mand name, which will be handled in the same way as the 8-byte name passed in
the parameter list to an SVC 202. The programmer indicates an error return by the sign of the halfword
code. If an error return is desired, then the code is negative. If the
code is positive, then no error return is made. The sign of the
halfword code has no effect on determining the routine that is to be
called, since DMSITS takes the absolute value of the code to determine
the routine called.
Since only the second byte of the absolute value of the code is
examined by DMSITS, seven bits (bits 1-7) are available as flags or for
other uses. Thus, for example, uses these seven bits to
indicate such things as conditional requests and variable requests. When an SVC 203 is invoked, DMSITS stores the halfword code into the IUCON location CODE203, so that the called routine can examine the seven
bits made available to it.
All calls made by means of SVC 203 should be made by macros, with the macro expansion computing and specifying the correct halfword code.
The programmer may use the HNDSVC macro to specify the address of a
routine that will handle any SVC call other than for SVC 202 and SVC 203. In this case, the linkage conventions are as required by the
user-specified SVC-handling routine. supports selected SVC calls generated by 05 and DeS/VS macros, by
simulating the effect of these macro calls. DMSITS is the initial SVC interrupt handler. If the SET DOS command has been issued, a flag in NUCON will indicate that DOS/VS macro simulation is to be used. Control
is then passed to DMSDOS. Otherwise, as macro simulation is assumed and DMSITS passes control to the appropriate as simulation routine. CftS Introduction 2-27
Previous Page Next Page