2. DMSITS allocates a system and user save area. The user save area is used as a
register save area (or work area) by the called routine.
3. The called routine is called (via a LPSW or BALR).
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 202 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 for calling nucleus-resident routines, and for calling routines writ­
ten as commands (for example, disk resident modules). SVC 202 can also be used
for calling nucleus extensions.
A typical coding sequence for an SVC 202 call is the following:
LA R1, PLIST SVC 202 DC AL4(ERRADD)
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 unless the address is equal to 1. If the address is 1, return is made to the
next instruction after the "DC AL4(1)" instruction. DMSITS determines whether
this DC was inserted by examining the next byte following the SVC call. A nonze­
ro byte indicates an instruction, a zero value indicates that "DC AL4(address)" or
"DC AL4(1)" follows.
If you want to ignore errors, you can use the following sequence:
LA R1,PLIST SVC 202 DC AL4(1) Whenc ver an SVC 202 is issued, the contents of general purpose register 0 and 1 (GPR0 and GPRl) are passed intact to the called routine. GPR1 must point to an
eight-character string, which may be the start of a tokenized plist. This character
string must contain the symbolic name of the routine or command being called.
The SVC handler only examines the name and the high-order byte of GPRl. The
called routine decides whether to use the extended PLIST or the tokenized PLIST
by examining the high-order byte of GPR1.
Note: Although an extended PLIST is provided, the called routine might not be set
up to use the extended PLIST.
The following values may be found in the high-order byte of register 1:
Functional Information 335'
Value X'OO' X'Ol' X'02'
X'05'
X'06' X'OB' X'OC' X'OD' X'OE' X'FE'
X'FF'
Meaning eMS supplied
extended PLIST
pointer in
register O? The call did not originate from an EXEC file or a command No
typed at the terminal.
The call is from an EXEC 2 exec or the System Product Yes
Interpreter when "ADDRESS COMMAND" is specified.
See "Dynamic Linkage/SUBCOM" in this manual. Yes
Used by the System Product Interpreter for external function Yes
calls.
The command was invoked as an immediate command. This Yes
setting should never occur with SVC 202. The command was called as a result of its name being typed Yes
at the terminal, by the "CMDCALL" command to invoke
the command from EXEC 2, or from a System Product
Interpreter EXEC when "ADDRESS CMS" is specified.
The call is the result of a command invoked from an CMS No
EXEC file with "&CONTROL" set to something other than "NOMSG" or "MSG". The call is the result of a command invoked from an CMS No
EXEC file with "&CONTROL MSG" in effect (indicates
that messages are to be displayed at the terminal).
The call is the result of a command invoked from an CMS No
EXEC file with "&CONTROL NOMSG" in effect.
This is an end-of-command call from DMSINT (CMS con-No
sole command handler). See the NUCEXT function in the
VM/SP CMS Command and Macro Reference for further
details.
This is a service call from DMSABN (ABEND) or from No NUCXDROP. See the NUCEXT function in the VM/SP CMS Command and Macro Reference for details.
Tokenized PLIST: For a tokenized parameter list, the symbolic name of the func­
tion being called (8 character string, padded with blank characters on the right if
needed) is followed by extra arguments depending on the actual routine or com­
mand being called. These arguments must be "tokenized"; that is, every parenthe­
sis is considered an individual argument, and each argument may have a maximum
length of eight characters.
336 VM/SP System Programmer's Guide
Previous Page Next Page