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
DMSITS handles the situation in the
return fro. a legitimate SVC routine. same way it handles an error
The error code is -3. Invalid SVC 203 code. If an illegal code follows SVC message is displayed, and the ABEND routine is called
execution.
203, an error
to terminate SEARCH HIERARCHY FOR SVC 202 When a program issues SVC 202, and passes a routine or command name in
the parameter list, DMSITS must search for the specified routine or cOllmand. (In the case of SVC 203 with a zero in the table entry for the
specified index, the same logic must be applied.)
The search order is as follows:
i. A check is made to see if there is a routine with the specified
name currently in the system transient area. If so, then tontrol is transferred there.
2. The system function name table is searched to see if a command by
this name is nucleus resident. If successful, control goes to the
specified nucleus routine. 3. A search is made for a disk file with the specified name as the
filename, and MODULE as the filetype. The search is made in the
standard disk search order. If this search is successful, then the
specified module is loaded by LOADMOD and control passes to the
storage location now occupied by the command. 4. If all searches so far have failed, then rftSINA (ABBREV) is called
to see if the specified routine name is a valid system abbreviation
for a system com.and or function. User-defined abbreviations and
synonyms are checked at the same time. If this search is
successful, then steps 2 through 4 are repeated with the full
nonabbreviated name. 5. If all searches fail, then an error code of -3 is forced. USER AND TRANSIENT PROGRAM AREAS There are two areas which can hold program modules which LOADMOD from the disk. These are called the user program
transient program area.
are loaded by
area and the
The user program area starts at location X'2COOO' and extends upward
to the loader tables. However, the high-address end of that area can be
allocated as free storage by DMSFREE. Generally, all user programs and
certain system commands, such as EDIT and COPYFILE, execute in the user
program area. Because only one program can be executing in the user
program area at one time, unless it is an overlay structure, it is
impossible for one program in the user program area to invoke, by means
of SVC 202, a module which is also intended to execute the user program area.
The transient program area is two pages, running X'EOOO' to location X'10000'. It provides an area for
that may also be invoked from the user program area by
from location
system commands
means of an SVC 2-68 IBM VM/370 System Logic and Program Determination--Volume 2
Previous Page Next Page