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
The sign of the halfword code indicates whether the programmer
expects an error return; if so, the code is negative: if not, the code
is positive. Note that the sign of the halfword code has no effect on determining the routine which is to be called, because DMSITS takes the atsolute value of the cede to determine the called routine.
Because 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. For example, DMSFREE uses these seven bits to indicate such
things as conditional requests and variable requests. Therefore, DMSITS considers the codes H'3' and H'259' to be identical, and handles them
the same as H'-3' and H'-259', except for error returns. When an SVC 203 is invoked, DMSITS stores the halfword code into the NUCON location CODE203, so that the called routine can interrogate the
seven bits made available to it. The programmer may use the HNDSVC macro to specify
the address of a routine that processes any SVC call for SVC numbers 0 through 200 and 206 through 255.
If the HNDSVC macro is used, the linkage conventions are as required
by the user specified SVC-handling routine.
There is no way to specify a normal or error return from a
user-handled SVC routine& OS MACRO CA11§: CMS supports certain of the SVC calls generated by OS macros, by simulating the effect of these macro calls.
The proper linkages are set up by the os macro generations. DMSITS does not recognize any way to specify a normal or error return from an OS macro simulation SVC call. All SVC functions supported for CMSjDOS are handled by
the CMS module DMSDOS. DMSDOS receives control from DHSITS (the CMS SVC handler) when that routine intercepts a DOS SVC code and finds that the DOSSiC flag in DOSFLAGS is set in NueON. DMSDOS acquires the specified SVC code from the OLDPSi field of the
current SVC save area. Using this code, DMSEOS computes the address ef
the routine where the sve is to be handled. Many eMS/DOS routines (including DMSDOS) are contained in a
discontiguous shared segment (nCSS). Most SiC cedes are executed within DMSDOS, but seme are in separate modules external to DMSDOS. If the SiC code requested is external to DMSDOS, its address is computed using a
table called DCSSTAB; if the code requested is executed within DMSDOS, the table SVCTAB is used to compute the address of the code to handle
the SiC. DOS SVC calls are discussed in more detail in "Simulating a DOS Under CMS" in this section. INVALID SiC £!1LS: recognIzed-by DMSITS. There are several
These are: types of invalid SVC calls Invalid SiC number. If the SiC number does not fit into any of the
classes described above, it is not handled by DMSITS. An error message is displayed at the terminal, and control is returned
directly to the caller. Invalid routine name in SVC 202 parameter list. If the routine na.ed
in the SVC 202 parameter list is invalid or cannot be found, then CMS Method of Operation and Program Organization 2-67
Previous Page Next Page