---------------------------<snip>-------------------------
Later when S/370 came along the designers had recognized the deficiencies of SVC and they came up with PC (Program Call) as a lighter weight and more flexible mechanism. PC functions can be instantiated dynamically (much more so than SVCs) and they have the virtue that the PC instruction passes control more-or-less directly to the target PC function, avoiding a great deal of processing overhead.

Return from the (original) PC instruction was accomplished by the PT (Program Transfer) function, which switched state and branched to the target instruction in a single operation - way faster than returning from an SVC.

Later in S/370-ESA the stacking PC was invented and that used the (then new) linkage stack for saving and restoring the caller's state. When the linkage stack is used, the PR instruction (Program Return) is used to return control and restore the caller's state all in a single operation.
-----------------------------<unsnip>------------------------
WAY BACK WHEN I worked at a time-sharing service bureau running systems based on CP67/CMS, we used still another mechanism. CP67 was modified to use a BAL to a particular address in low storage, which went to a setup routine, which in turn called the appropriate service. Reason: interrupts took too long to process The actual service and its parameters were determined by the contents of storage immediately following the BAL instruction. All SVC's in the virtual machine were processed by the CMS code in the user's virtual machine and interactions between CMS and CP67 were handled via HVC (Hypervisor Call aka DIAGNOSE) and its parm list.

Interrupts are expensive; avoid them whenever possible; even the PSW-SWAP is very slow!!!

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to