Extended PLIST: For an extended parameter plist, no restriction is put on the
structure of the argument list passed to the called routine or command. Register 0 points to the following consecutive words:
(a) DC A (CMDBEG)
(b) DC A (ARGBEG)
(c) DC A(ARGEND)
(d) DC A(O) where the first three addresses are defined as in the following example:
CMDBEG EQU *
DC C'testprog'
ARGBEG EQU *
DC C' (file 2)'
ARGEND EQU *
CMDBEG EQU *
ARGBEG EQU *
ARGEND EQU *
-indicates the beginning of the command name.
-indicates the beginning of the argument list.
-indicates the end of the argument list.
a. The first word is the beginning address of the command.
b. The second gives the beginning address of the argument list.
c. The third gives the address of the byte immediately following the end of
the argument list.
d. The fourth word may be used to pass any additional information required
by individual called programs. If not used to pass additional information,
this word should be zero so that programs which can receive optional
information via this word may detect that none is provided in this call.
Notes:
1. It is specifically allowed that these four words be moved to some location conĀ­
venient for the command resolution routines, or convenient for some other
program executed between the caller's SVC 202 and entry to the program for
which the parameter list is intended. For this reason, the called program may
not assume additional words follow word 4, or that the storage address of these
4 words bears any relationship to other data addresses.
2. For function calls in the System Product Interpreter, two additional words are
available. See the VM / SP System Product Interpreter Reference, SC24-5239,
for more information on function calls and the two additional words. SVC 203 SVC 203 is called by CMS macros to perform various internal system functions. It
is used to define SVC calls for which no parameter list is provided. For example,
DMSFREE 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 halfword decimal code following the SVC 203 indicates the specific routine
being called. DMSITS examines this halfword code, taking the absolute value of
Functional Information 337
User-Handled SVCs the code by an LPR instruction. The first byte of the result is ignored, and the secĀ­
ond byte of the resulting halfword is used as an index to a branch table. The
address of the correct routine is loaded, and control 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 contains an 8-byte routine or command name, which is 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 half word 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, DMSFREE 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 NUCON 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: OS and VSE Macro Simulation SVC Calls
CMS supports selected SVC calls generated by OS and VSE 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 indicates that VSE macro
simulation is to be used. Control is then passed to DMSDOS. Otherwise, OS macĀ­
ro simulation is assumed and DMSITS passes control to the appropriate OS simuĀ­
lation routine.
Invalid SVC Calls
There are several types of invalid SVC calls recognized by DMSITS.
1. Invalid SVC number. If the SVC number does not fit into any of the four
classes described above, then it is not handled by DMSITS. An appropriate
error message is displayed at the terminal, and control is returned directly to
the caller.
2. Invalid routine name in SVC 202 parameter list. If the routine named in the
SVC 202 parameter list is invalid or cannot be found, DMSITS handles the sitĀ­
uation in the same way as it handles an error return from a legitimate SVC rouĀ­
tine. The error code is -3.
338 VM/SP System Programmer's Guide
Previous Page Next Page