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
If this action is taken by the called routine, then the SVCTR1CE facility may print misleading information, since SVCTRACE assumes that
these fields are exactly as they were when DKSITS was first entered.
Whenever an SVC call is made, DKSITS 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. When the SVC-called routine returns, the save areas are not released, but are kept for the next At the completion Qf each command. all SYC 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. 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 USAYEPTR 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 Control Block Log!£. The most important fields, and their-uses, are as-follows:--- Field CiLLER CALLEE CODE OLDPSW NRKRET ERRET EGPRS EFPRS (Fullword) The address of the SVC instruction that resulted in
this call.
(Doubleword) Eight-byte symbolic name of the called routine.
For OS and user-handled SVC calls, this field contains a
character string of the form SVC nnn, where nnn is the SYC number 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 DKSITS vas
entered.
(Fullword) The address of the calling routine to which control
is to be passed in the case of a normal return fro. the called
routine.
(Fullword) The address of the calling routine to which control
is to he passed in the case of an error return from the called
routine.
(16 Fullwords, separately labeled EGPRO, EGPR1, EGPR2, EGPR3, ••• , EGPR15) The entry registers. The contents of the
general registers at entry to DKSITS are stored in these
fields.
(4 Doublewords, separately labeled EFPRO, EFPR2, EFPR4, EFPR6) The entry floating-point registers. The contents of the
floating-point registers at entry to DKSITS are stored in
these fields.
266 IBK VM/370 System Programmer's Guide
Previous Page Next Page