Register Restoration
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 oldPSW, which was saved when DMSITS was first entered.
Upon entry to DMSITS, all registers are saved as they were when the SVC instruc
tion 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 SVC202 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.
Called Routine Modifications to System Area
If the called routine has system status, so that it runs with aPSW storage protect
key of0, then it may store new values into the System Save Area.
If the called routine wishes to modify the location to which control is to be
returned, it must modify the following fields:
For SVC202 and 203, it must modify the NUMRET and ERRET (normal and
error return address) fields.
For other SVCs, it must modify the address field ofOLDPSW. To modify the registers that are to be returned to the calling routine, the fields EGPRl, EGPR2, through EGPR15 must be modified.
If this action is taken by the called routine, then the SVCTRACE facility may print
misleading information, since SVCTRACE assumes that these fields are exactly as
they were when DMSITS was first entered. Whenever an SVC call is made,
DMSITS allocates two save areas for that particular SVC call. Save areas are allo
cated as needed. For each SVC call, a system and user save area are needed.
When the SVC-called routine returns, the save areas are not released, but are kept
for the next SVC. At the completion of each command, all SVC save areas allo
cated by that command are released.
The System Save Area is used by DMSITS to save the value of the SVC oldPSW at the time of the SVC call, the calling routine's registers at the time of the call, and
any other necessary control information. Since SVC calls can be nested, there can
be several of these save areas at one time. The system save area is allocated in pro
tected free storage.
The user save area contains 12 double words (24 words), allocated in unprotected
free storage. DMSITS does not use this area at all, but simply passes a pointer to
this area (via register 13.) The called routine can use this area as a temporary work
area, or as a register save area. There is one user save area for each system save
area. TheUSAVEPTR field in the system save area points to the user save area.
The exact format of the system save area can be found in the VM /SP Data Areas
and Control Block Logic, Volume 2. The most important fields, and their uses, are
as follows:
Functional Information 345
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
Upon entry to DMSITS, all registers are saved as they were when the SVC instruc
tion 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
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.
Called Routine Modifications to System Area
If the called routine has system status, so that it runs with a
key of
If the called routine wishes to modify the location to which control is to be
returned, it must modify the following fields:
For SVC
error return address) fields.
For other SVCs, it must modify the address field of
If this action is taken by the called routine, then the SVCTRACE facility may print
misleading information, since SVCTRACE assumes that these fields are exactly as
they were when DMSITS was first entered. Whenever an SVC call is made,
DMSITS allocates two save areas for that particular SVC call. Save areas are allo
cated as needed. For each SVC call, a system and user save area are needed.
When the SVC-called routine returns, the save areas are not released, but are kept
for the next SVC. At the completion of each command, all SVC save areas allo
cated by that command are released.
The System Save Area is used by DMSITS to save the value of the SVC old
any other necessary control information. Since SVC calls can be nested, there can
be several of these save areas at one time. The system save area is allocated in pro
tected free storage.
The user save area contains 12 double words (24 words), allocated in unprotected
free storage. DMSITS does not use this area at all, but simply passes a pointer to
this area (via register 13.) The called routine can use this area as a temporary work
area, or as a register save area. There is one user save area for each system save
area. The
The exact format of the system save area can be found in the VM /
and Control Block Logic, Volume 2. The most important fields, and their uses, are
as follows:
Functional Information 345