Section 3.15

Group 15  Time-sharing instructions

The instructions of group 15 are illegal in programmers' mode (except the three-address 150 instruction, which is specially treated by the monitor program); they are used in monitoring mode for special purposes, mainly connected with time-sharing.  They are described below for the sake of completeness but any attempt to use them (except in the monitor program) will cause suspension due to illegal instruction.  15 group instructions in engineering mode have the same effect as in monitoring mode except that the 152-instruction does not enter programmers' mode.

The pre-150 instruction

When a program running in programmers' mode is interrupted for any reason a special piece of built-in micro-program called the pre-150 instruction is obeyed.  An instruction cannot be read from store until the information in the arithmetic unit, about the program being interrupted, has been stored; so this special built in instruction is obeyed.

The first action of the pre-150 instruction is to set the monitoring stat - this inhibits further interruptions, removes restrictions on reservations etc. and validates group 15 instructions.  The machine is now in monitoring mode.  Absolute location 1 is now read - it gives the address of word 0 of the program's directory.  The control address of the program is now written into the modifier position of word 2 of the directory and overflow in the sign bit - i.e. the link is stored in word 2 in the same manner as the 86 instruction stores it and overflow is cleared.  Next the program timer is added into word 1 of the directory; if word 1 is positive after this addition this means that timer overflow has occurred i.e. the program has exceeded the time requested - and program failure is set as a reason for entry.  The pre-150 instruction now writes the requirement of the program just left into the upper half of word 0 of the directory - the lower half being left unaltered.  The requirement is as follows:

(a)   Peripheral lockout - D0, D1 are clear, the k-bits of the device concerned are stored in D16 to D23 and the mode in D11 to D15.

(b)  Drum lockout - D0, D1 are 10 with the m.s. 4 bits of the 24-bit absolute drum address (specifying the drum control number) in D20 to D23.  These are clear for machines with only one drum control.

(c)  Core store lockout - D0, D1 are 01 with the address locked out in D9 to D23. In all other cases the upper half of word 0 is cleared.

The pre-150 instruction ends by jumping to absolute address 2.

Timing   The pre-150 instruction takes approximately 160 microsecs.

Function number 150  [1111 000]

(a)  Programmers' mode

(3)   Enter Monitor program to perform action Z, operands X and Y.

(2)   Illegal.

This instruction, in programmers' mode is treated specially by the Monitor program.  For further details see section 5.3.

(b)  Monitoring and Engineers' Mode

Jump to Y if there is no reason for entry, otherwise x' = reason for entry.  This instruction is normally obeyed in absolute address 2, immediately after the pre-150 instruction.  The cases where there is no reason for entry are core store lockout, end of transfer and one second since last interrupt.  The reasons for entry (and their values) are:

Peripheral lockout                  128
Core store parity failure            32
Peripheral or drum incident       64
Reservation line parity failure    16
Spring cleaning (one minute)       8
Program incident                       4

If there is no reason for entry the instruction simply jumps to Y and does not write to X.  If there is a reason for entry the instruction does not jump and the integer representing the appropriate combination of reasons (most commonly only one reason) is written into X.

If the 150 instruction is obeyed in engineers' mode - or immediately after switching to programmers' mode - a reason for entry may come up due to some of the "reason for entry" stats having been set some time previously - these stats are only cleared by the 150 instruction.  The two and three address forms are identical - Z is not used in the 3-address form.

Timing (microsecs)

Jump

No Jump

3-address:

  20

    36

2-address:

  40

    56

2-address unmodified:

  20

    36

plus 16 microsecs for each replacement.

 

Function number 151  [1111 001]

(a)  Programmers' Mode

This instruction is illegal.

(b) Monitoring and Engineers' Mode

Search a list starting at Y till a word is found whose upper half is a satisfied requirement.  x' = address of this word.

The index words of the programs in the machine are in the form of a list - i.e. the lower half of each contains the address of the next, the upper half containing the requirement as described above under the pre-150 instruction.  If the requirement is clear it is always satisfied; if it is a peripheral, the drum or a core store location the appropriate check takes place to see if it is now available; if D0 and D1 of the requirement are 11 the requirement is considered as not satisfied - this combination is never written by the pre-150 instruction but is inserted by the monitor program if it is necessary to stop a program for any reason.

The 151 instruction examines these words in turn, starting at y, and it looks at successive entries (effectively by repeated replacements) until an entry is found whose requirement is satisfied - the address of this word is written to X.  It is normal for X to be absolute address 1 since 1 must contain the address of the index word when the program is entered.

The 151 instruction is the same in the two and three address forms - in the three address form Z is not used.

Timing (microsecs)

3-address:

 48 + l6(n+m)

2-address:

 68 + l6(n+m)

2-address unmodified:

 48 + l6(n+m)

plus 16 microsecs for each replacement
where n is the number of words searched and m is the number of those whose unsatisfied requirement is a core store lockout.

Function number 152  [1111 010]

(a)  Programmers' Mode

This instruction is illegal.

(b)  Monitoring and Engineers' Modes

Enter programmers' mode setting the reservations from x, jump to ym setting OVR if ys =1

This instruction is used to exit from the time-sharer.  The Y address specifies the point at which ordinary program is to be entered - it is treated as a link in the same form as used by the 87 instruction.  The reservations and monitoring conditions are taken from x as follows:

D9 to D23 of x is the lower reservation and datum point (D18 to D23 should always be zero) - D33 to D47 of x is the upper reservation (i.e. the last location within reservations);  D0, D1, D24, D25 are set to 1 if monitoring on signals, overflow, jumps and floating point overflow respectively is required.  D2 is a 1 for strong reservations (normally the case) and D26 is a 1 if floating point operations are not to be rounded.

Before the 152 instruction is obeyed absolute location 1 must be set (usually by a 151 instruction) as the address of word 0 of the program's directory.  Since the link is held in word 2 of the directory (since that is where the pre-150 instruction stores it) and the reservations are conventionally held in word 5 of the directory the usual form of the 152 instruction is:

  152XY   5    2    1

In engineers' mode the reservation lines are ignored and the 152 instruction obeys the link in Y and sets the monitoring condition stats.

The 152 instruction is the same in the two and three address forms - in the three address form Z is not used.

Timing (microsecs)

3-address:

  72

2-address:

  92

2-address unmodified:

  72

plus 16 microsecs for each replacement.

Function number 153  [1111 011]

This instruction is illegal in all modes.

Function number 154  [1111 100]

(a)  Programmers' Mode   This instruction is illegal.

(b)  Monitoring and Engineers' Modes

Jump to Y if device not failed or write failure information to X and abandon the transfer.  This instruction should be preceded by a 140.13 or 141.13 instructions to select a peripheral device or drum control.

When a program is interrupted due to a peripheral or drum incident the 150 instruction only gets 1 bit of information saying that this has occurred.  It is necessary to interrogate all the devices until one of them says it has failed - it says this by the 154 instruction failing to jump.  Thus the 154 instruction (preceded by a Y replaced 140.13 instruction) is used at the end of a loop scanning the peripherals - the loop is left when the failed device has been found.  A word of information about the device is written into X and the transfer abandoned.  This information consists of the current and finishing addresses of the transfer, which are written into D9-D23 and D33-D47 respectively, and a number of bits, giving either the type of failure or the state of various staticisors in the device, are written into D0-D7 and D24-D31. For further details of this information see the relevant parts of section 5.5.

In the case of the drum two words are obtained.  The word written into X is similar to that for peripherals and in addition the failing drum address is written into X+1.  For details of the information bits see section 5.5.5.  The drum address in the preceding 141.13 instruction may be any address on the required drum control.

The 154 instruction is the same in the two and three address forms - in the three address form Z is not used.

Timing (microsecs)

                                

Jump

No Jump

3-address:

  20

   116

2-address:

  40

   136

2-address unmodified:

  20

   116

plus 16 microsecs for each replacement.

 

Function number 155  [1111 101]

(a)  Programmers' Mode    This instruction is illegal.

(b)  Monitoring and Engineers' Mode   Abandon transfer on selected device.

This instruction should be preceded by a 140.13 or 141.13 instruction to select a peripheral device or drum control - the instruction then abandons the transfer, if any, on the selected device.  In the case of character devices the 155 instruction abandons whatever transfer happens to be taking place on the control containing the selected device.  The addresses are not used in the 155 instruction - they may have any value and there is no distinction between the two and three address forms.

Timing  The 155 instruction takes about 20 microsecs.

 

Function number 156  [1111 110]

This instruction is illegal in all modes.

Function number 157  [1111 111]

(a) Programmers' Mode  This instruction is illegal.

(b) Monitoring and Engineers' Mode   Stop, displaying addresses.

The machine stops after obeying the instruction and will continue with the next instruction if the STOP and RUN buttons are pressed.  The function lights say 157 and the TX and/or TY lights are lit in the 2-address case.  The X and Y addresses, after all modification and replacement, can be seen in the upper and lower halves of H respectively.  In the 3-address form Z is displayed in the upper half of J - in the 2-address form the upper half of J is the same as the upper half of H.  The lower half of J is the address of the next instruction and the single step button causes the next instruction to be obeyed without being displayed.

Orion 2 differences

The information in this section refers in general both to Orion 1 and Orion 2.   Described here are the differences to be noted when reading the section for Orion 2.

Note timings are not correct for Orion 2.

The pre-150 instruction

Subsection (a)  On Orion 2 D11 to D15 are clear.

Subsection (b)  On Orion 2 these are not necessarily clear.

Function Number 150

Subsection (b)   Core store parity failure and reservation line parity failure are not reasons for entry.   If they do occur then the machine comes to a stop.

Function Number 152

D18 to D23  need not be zero in X.

Function Number 156

This instruction is not illegal in Monitoring and Engineers' Mode.   Its effect is to jump to X if peripheral Y is involved in a transfer which is not completed.

Function Number 157

Subsection (b)   This instruction stops the machine and displays X, X+1 (where appropriate) Y and Z addresses on the control panel in the appropriate registers.  By carrying out appropriate action, the machine continues by obeying the next instruction etc.