User and Transient ProgralH Areas
Two areas hold programs that are loaded from disk. These areas are called the user
program area and the transient program area. (See Figure 35 , Figure 36 , and
Figure 37 on page 322 for a description of CMS storage usage.)
The user program area starts at location X'20000' and extends upward to the load­
er tables. Generally, all user programs and certain system commands (such as
EDIT, and COPYFILE) are executed in the user program area. Since only one
program can be executing in the user program area at anyone time, it is impossible
(without unpredictable results) for one program being executed in the user program
area to invoke, by means of SVC 202, a module that is also intended to be exe­
cuted in the user program area.
The transient program area is two pages long, extending from location X'EOOO' to
location X'FFFF'. It provides an area for system commands that may also be
invoked from the user program area by means of an SVC 202 call. When a tran­
sient module is called by an SVC, it is normally executed with the PSW system
mask disabled for I/O and external interrupts.
A program being executed in the transient program area may not invoke another
program intended for execution in the transient program area.
DMSITS starts the programs to be executed in the user program area enabled for
all interrupts but starts the programs to be executed in the transient program area
disabled for all interrupts. The individual program may have to use the SSM (Set
System Mask) instruction to change the current status of its system mask.
Called Routine Starl- Up Table "Called" Type
SVC 202 or 203 -
Nucleus resident
SVC 202 - Nucleus
Extension Module
SVC 202 or 203 -
Transient area MOD- ULE SVC 202 or 203 - User area
User-handled OS - VSE Nucleus res-
ident
Figure 39 and Figure 40 on page 344 show how the PSW and registers are set up
when the called routine is entered.
System Mask Storage Key Problem Bit
Disabled System Off User Defined User Defined Off Disabled User Off Enabled User Off Enabled User Off Disabled System Off Figure 39 (Part 1 of 2). PSW Fields When Called Routine Starts
Functional Information 343
"Called" Type System Mask Storage Key Problem Bit
as - VSE Transient Disabled System Ofr area module
Figure 39 (Part 2 of 2). PSW Fields When CaUed Routine Starts
Registers Registers Register Register Register
Type 0-1 2 -11 12 13 14 15 SVC Same as Unpredictable Address User save Return Address of 202 or caller of called area Address called rou- 203 routine to tine DMSITS Other Same as Same as caller Address User save Return Same as
caller of caller area address to caller DMSITS Figure 40. Register Contents When CaUed Routine Starts
Returning to the Calling Routine
Return Location
When the called routine finishes processing, control is returned to DMSITS, which
in turn returns control to the calling routine.
The return is accomplished by loading the original SVC old PSW (which was saved
at the time DMSITS was first entered), after possibly modifying the address field.
The address field modification depends upon the type of SVC call, and upon
whether or not the called routine indicated an error return.
For SVC 202 and 203, the called routine indicates a normal return by placing a
zero in register 15 and an error return by placing a nonzero code in register 15. If
the called routine indicates a normal return, then DMSITS makes a normal return
to the calling routine. If the called routine indicates an error return, DMSITS passes the error return to the calling routine, if one was specified, and abnormally
terminates if none was specified.
For an SVC 202 not followed by "DC AL4(address)" or "DC AL4(1)," a normal
return is made to the instruction following the SVC instruction, and an error return
causes an abend. For an SVC 202 followed by "DC AL4(address)", a normal
return is made to the instruction following the DC, and an error return is made to
the address specified in the DC, unless the address is equal to 1. If the address is 1,
both normal and error, return is made to the next instruction after the "DC AL4(l)" instruction. In either case, register 15 contains the return code passed
back by the called routine.
For an SVC 203 with a positive halfword code, a normal return is made to the
instruction following the halfword code, and an error return causes an abend. For
an SVC 203 with a negative halfword code, both normal and error returns are
made to the instruction following the halfword code. In any case, register 15 con­
tains the return code passed back by the called routine.
344 VM/SP System Programmer's Guide
Previous Page Next Page