The TRP instruction is like a CAL instruction except that it specifies a service number instead of a memory address. This service number is just the numerical form of the system call, which is the published subroutine that the OS makes available to users. Once the operating system gets control, it looks the service number up in a table and branches to the actual subroutine that implements that service. In this way, no user program can jump to a location that the operating system doesn't want it to; it can only jump to the entry point of the service subroutine. Generally, the first thing that the service subroutine does is to check the user program's "papers," i.e. it verifies that the request is in order, all the parameters are okay, and that this user has permission to call this routine. If not, then a system error will abort the program. (This is termed an abend in IBM-ese, which is a contraction of "abnormal end.") |