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)", 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 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 half word code, a normal return is .ade
to the instruction following the half word 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 contains the return code passed 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, DftSITS always
returns to the calling routine by loading the SVC old PSW, 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 fro. 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 DftSIIS after it had completed processing.
If the called routine
storage protect key of Save Area, has system status, so that it runs with a PSW 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 NUftRET and ERRET (normal and
error return address) fields. For other SVCs, 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.
If this action is taken by the called routine, then thp. SVCTRACE facility may print misleading information, since SVCTRACE assumes that
these fields are exactly as they were when D!SITS was first entered. Whenever an SVC call is made, DMSITS allocates two save areas for that
particular SVC call. Save areas are allocated as needed. For each SVC call, a system and user save area are needed.
2-32 IBM VM/310 System Logic and Program Determination--Volume 2
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 allocated by that command are released.
The System Save Area is used by DMSITS to save the value of the SVC old PSi 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 protected free
storage.
The user save area contains 12 doublewords (24 words), allocated in
unprotected free storage. DKSITS 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 USAVEPTR 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 Data Areas and 199!£. The most important fields, and their-uses, are as follows: CALLER CALLER CODE OLDPSi (Fullword) The address of the SVC instruction that resulted in
this call.
(Doubleword) Eight-byte symbolic name of the called routine.
For as and user-handled SVC calls, this field contains a
character string of the form SVC nnn, where nnn is the SVC nu.ber in decimal.
(Halfword) For SVC 203, this field contains the halfword code
following the SVC instruction line.
(Doubleword) The SVC old PSi at the time that DMSITS was
entered. (Fullword) The address of the calling routine to which control
is to be passed in the case of a normal return from the called
routine.
ERRET (Fullword) The address of the calling routine to which control
is to be passed in the case of an error return from the called
routine. EGPRS (16 Fullwords, separately labeled EGPRO, EGPR1, EGPR2, EGPR3, ••• , EGPR15) The entry registers. The contents of the
general registers at entry to DMSITS are stored in these
fields. EFPRS (4 Doublewords, separately labeled EFPRO, EFPR2, EFPR4, EFPR6) The entry floating-point registers. The contents of the
floating-point registers at entry to DMSITS are stored in
these fields. SSAVENY.T (Fullword) The address of the next system save area in the chain. This points to the system save area that is being
used, or will be used, for any SVC call nested in relation to
the current one. SSAVEPRV (Fullword) The address of the previous system save
the chain. This points to the system save area for
call in relation to which the current call is nested.
area in
the SVC USAVEPTR (Fullword) Pointer to the user save area for this SVC call. CMS Introduction 2-33
Previous Page Next Page