CALLED ROUTINE START-UP TABLE
Figures 29 and 30 show how the PSW and registers are set up when the
called routine is entered. I ------------------------------------------------------------, I "Called" Type System Mask Storage Key Problem Bit 1-------- ISVC 202 or 203 I - Nucleus I resident , ISVC 202 or 203 I - Transient I area MODULE SVC 202 or 203 User area User-handled as - DOS/VS Nucleus
resident
as - DOS/VS Transient
area module
Disabled System Off Disabled User Off Enabled User Off Enabled User Off Disabled system Off Disabled system Off Figure 29. PSi Fields When Called Routine Starts
Registers Registers Register RegisterlRegister
Type o -1 2 -11 12 13 I 14
----- I SVC 202 Same as Unpre- Address User IReturn or 203 caller dictable of save I address
called area I to
routine I DftSITS I Other Same as Same as Address User IReturn caller caller of save I address
caller area I to I tftSITS Figure 30. Register Contents When Called Routine Starts RETURNING TO THE CALLING ROUTINE ,
Register I 15 I I Address I of I called I routinel I Same as I caller , I I .J When the called routine finishes processing, control is returned to DMSITS, which in turn returns control to the calling routine.
The return
was saved
is accomplished by loading
at the time DMSITS was
the original SVC old PSW (which
first entered), after possibly
264 IBM VM/370 System programmer's Guide
modifying the address field.
upon the type of SiC call, and -- ----- all The address field modification depends
upon whether or not the called routine
For SiC 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)", a normal return is
.ade 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. 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 In any case, register 15 contains the return code passed
tack by the called routine.
For macro simulation SVC, calls, and for user-handled SVC calls, no
error return is recognized by DMSITS. As a result, DMSITS always
returns to the calling routine by loading the svc old PSi, which was
saved when DMSITS was first entered. Upon entry to DMSITS, all registers are saved as they were when the SVC instruction was first executed. Upon exiting from DMSITS, all registers
are restored from the area in which they were saved at entry.
The exception to this is register 15 in the case of SVC 202 and 203. Upon return to the calling routine, register 15 always contains the
value that was in register 15 when the called routine returned to DMSITS after it had completed processing.
If the called routine
storage protect key of Save Area.
has system status, so that it runs with a PSi 0, then it may store new values into the System If the called routine wishes to modify the location to which control
is to be returned, it must modify the following fields: • For SVC 202 and 203, it must modify the NUMRET and ERRET (normal and
error return address) fields. • Fer ether SiCs, it must modify the address field of OLDPSW. To modify the registers that are to be returned to the calling routine,
the fields EGPR1, EGPR2, ••• , EGPR15 must be modified.
Part 3. Conversational Monitor System (CMS) 265
Previous Page Next Page