On Fri, 2011-04-22 at 18:35 -0600, Frank Swarbrick wrote: > Where can an application programmer who can barely spell SVC and PC > get an understanding of what these are? (I know the SVC is supervisor > call, but that's about it.)
Well, how to write an SVC is documented here: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2A8B0/23.0 What the SVC instruction does on a hardware level is rather simple, actually and is documented in the "Principles of Operation" manual. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DZ9ZR003/7.5.137 In a basic nutshell, there are two areas in "low core". One is the SVC New PSW and the other is the SVC Old PSW. When you execute and SVC instruction, the CPU stores the current PSW in the Old PSW location and then loads the PSW from the New PSW location. The SVC number is placed in another fixed location. The new PSW is basically set up for supervisor state, key 0, disabled for interrupts, and the instruction portion points to what is call the SVC FLIH (First Level Interrupt Handler). This routine basically saves the user's registers in a fixed location, then does other things depending on the SVC type. There are 4 types: 1, 2, 3, 4, and 6. OK, there is a type 5, but that type basically is "not implemented" and causes an abend, so I don't count it. That's a brief, not entirely technically accurate synopsis of what an SVC instruction does and the initial processing of the interrupt handler. SVC causes what is generally called a "synchronous interrupt". === Now, the PC instruction is paired with the PR instruction. And is far more complicated to describe because it is much "smarter". http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DZ9ZR003/10.34 for PC and http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DZ9ZR003/10.35 for PR. I've never written an PC. But basically, z/OS contains a "table" which contain the PC numbers. Each table entry sets up an environment based on the subtype of the PC (which is defined not in the instruction itself, but in the table) and a PSW to use. It sets up the environment and goes to the specified code (which may be in the current address space, the LPA, or could even cause execution of code residing in an entirely different address space). This is where it get "hairy" and my knowledge is sadly lacking. -- John McKown Maranatha! <>< ---------------------------------------------------------------------- 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

