From: | glen herrmannsfeldt <gah@ugcs.caltech.edu> |
Newsgroups: | comp.compilers |
Date: | Thu, 27 Mar 2014 19:21:34 +0000 (UTC) |
Organization: | Aioe.org NNTP Server |
References: | 14-03-020 14-03-023 14-03-065 14-03-068 14-03-070 |
Keywords: | PL/I, errors, history |
Posted-Date: | 27 Mar 2014 15:25:45 EDT |
Bakul Shah <usenet@bitblocks.com> wrote:
(snip
> PL/I had ON and SIGNAL statements. SIGNAL would signal an exception.
> ON would catch it. REVERT to cancel the effect of ON. Web search
> indicates it was defined in 1964 but implemented later. May be the
> PL/I designered borrowed it from an earlier language/facility?
As mentioned earlier, some features of PL/I were implementations of
features of OS/360.
OS/360 has SPIE, Specify Program Interrupt Exit, where what they call
exit is what others would call an interrupt routine. If a program
interrupt occurs (fixed or floating point overflow, zerodivide,
illegal instruction, and such) it will call the routine at the
specified address. When that routine returns, it goes back to the
original program, possibly with registers or memory modified.
There is, then, the corresponding ON unit such as FIXEDOVERFLOW or
ZERODIVIDE. Other exception conditions such as end of file, of even
end of page when the system counts lines on a page, can also have ON
units.
ON units stay in effect on entering different blocks, either a new
procedure or a BEGIN block. On exit from a block, any ON units on from
that block are unstacked. REVERT goes back to the one on entering the
current block.
It seems that when multitasking is used, ON units can also be
inherited by subtasks. I am not sure at all what happens when you do
that, but I expect that it complicates the implementation.
-- glen
Return to the
comp.compilers page.
Search the
comp.compilers archives again.