Page of GC20-1807-7 As Updated April 1, 1981 by TNL GN25-0829
The DMSKEY key stack has a current maximum depth of seven for each
routine. In this context, a "routine" is anything invoked by an SVC call.
The DMSKEY LASTUSER option causes the current PSi key to be placed in
the stack, and a new key inserted into the PSW, determined as follows:
the SVC system save area stack is searched in reverse order (top to
bottom) for the first save area corresponding to a user routine. The PSW key that was in effect in that routine is then taken for the new PSW key. (If no user routine is found in the search, then LASTUSER has the
same effect as USER.) This option is used by as macro simulation
routines when they wish to enter a exit routine; the exit
routine is entered with the PSi key of the last user routine on the SVC system save area stack.
The NOSTACK option of DMSKEY may be used with NUCLEUS, USER, or LASTUSER (as in, for example, DMSKEY NUCLEUS, NOSTACK) if the current key
is not to be placed on the DMSKEY stack. If this option is used, then
no corresponding DMSKEY RESET should be issued.
The DMSEXS ("execute in system mode") macro instruction is useful in
situations where a routinp. is being executed with a user protect key,
but wishes to execute a single instruction that, for example, sets a bit
in the NUCON area. The single instruction may be specified as the
argument to the DMSEXS macro, and that instruction will be executed with
a system PSW key. Programs that modify or manipulate bits in DftSNUC or
other CMS control blocks may, however, hinder the operation of CMS causing it to function ineffectively.
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 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 PSi 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 S VC new PS W (low storage loca tion 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
is used as a register save area (or work area)
3. The called routine is called (via a LPSW or BALR).
user save a.rea 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).
256 System programmer's Guide
SVC TYPES AND LINKAGE CONVENTIONS conventions are important to dU! discussion of eMS 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
both for
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 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 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, 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 inline. A
nonzero byte indicates an instruction, a zero value indicates that "DC
AL4(address)" follows. SVC 203 is called by CKS macros to perform various internal system
functions. It is used to define SVC calls for which no parameter list
is provided. For example, DKSFREE 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. DKSITS 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
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 will contain an 8-byte routine or command
name, which will be handled in the same way as the 8-byte name passed in the paraaeter list to an SVC 202. Part 3. Conversational Monitor System (CMS) 257
Previous Page Next Page