Section 5.4

Dealing with Own Programming Failures


There is a special fast facility to enable programmers to deal partially with their own program failures.  This facility is mainly intended to be used by NEBULA and other compilers; it is not recommended that ordinary programmers should use it unless they are very experienced.  Only style 0 (off - standard) and style 7 are available - if the facility is on, any program failure will cause a jump to the specified address, with the address of the offending instruction (and state of OVR) in the preceding register.  The program should then see if the failure is of a type it recognises - if it is it takes appropriate action, otherwise it should return by a 150/23 instruction.

In order to make the facility fast the monitor program is not able to decode the type of failure.  It may be any of the following:

(a)     Illegal instruction i.e. 35-37, 46, 47, 96, 105-107, 113, 127-137, 147, 151-157.  Disengage for tape decks.

(b)     Illegal two-address form i.e. 125, 144-146, 150.

(c)     Impermissible operand in the instructions 40-45, 90-95, 97, 100, 101, 103, 121, 125, 140, 141, 142, 143.

(d)     Isolated 140, 141, 142 or string longer than 13.

(e)     Reservation violation in working or drum store or peripherals.

(f)     Replaced or pre-modified 150 instructions - these will be obeyed correctly after the 150/23.

(g)     Writing to drum or peripheral with OVR set.

(h)     Signals, successful jumps, overflow, floating-point overflow, drum and peripheral transfers if these events are being monitored.

(i)     Rewind on magnetic tape (Mode 14)

Note that illegal operands or Z-address in 150 instructions will not be picked up at this stage and the program cannot therefore deal with these itself.

The facility is switched on or off by a 150/20 instruction with X-address *OWN.

N.B. The style 7 routine to deal with program failures must not contain any program failures.  The monitor program temporarily regards premodified or replaced 150 instructions as program failures and for this reason they must not be contained in *OWN style 7 routines.