Cambridge Supervisor Group - Planning Document 12

1. Brief description

1030create input n from data ba
1031terminate current input
1032ba' = status of input stream n
1040create output n from data ba
1041terminate current output
1042ba' = status of output stream n

2. Detailed descriptions

In all the extracodes stream numbers lie in the range 0 ≤ n ≤ 254; the extracodes monitor if n is outside this range or if a clash of stream numbers is generated. The convention is used that C = halfword pointed at by ba, C' = next halfword, etc.

1030 Create input n from data ba

The stream is set up as D-type if n is even, the P-type is n is odd. The source of the stream is specified by the store pointed at by ba, and there are three options:

(1) From tape

C = tape logical number t (0 ≤ t ≤ 126)
C'= block number N (1 ≤ N ≤ 4095)

(2) From file

C = J4
C' etc., file title (up to four words)

(3) From online device

C = m.1 where m is the mth allowed device.

[Handwritten pencilled note: m = logical device number]

1031 Terminate current input

The current input is terminated (monitors if no input selected), and null selection set up (so that further read extracodes monitor). The stream may then be dealt with in one of four ways.
(1)Ba = 0, n < 0 Stream is deleted (subsequent 1050's will monitor)
(2)Ba = 0, 0 ≤ n ≤ 254 Remainder of stream renamed as n (D if n even, P if n odd)
(3)Ba ≠ 0, 0 ≤ n ≤ 254 Whole of stream renamed as n (D if n even, P is n odd)
(4)Ba ≠ 0, n < 0 Whole of stream left for future reselection from the start with same number

(N.B. (4) is not included in (3)).

[Handwritten pencilled notes on the above: "ONL." to the left; "Same as" by (3), (4) (brace to the left, close parenthesis to the right, of (3), (4)), with arrow pointing to (1), (2); (2) ticked; "Re-initialise input" inserted after (4). I don't know the correct interpretation of these. ]

1032 Find status of input n

(1)n evenb119' = n, ba' set for stream n as below
(2)n oddb119' =(n(even) is n is present
if n is not present where m is the next highest stream present and then ba' is the data for stream m
(J4if no such m
ba' = 0if not present
.1 if P, .1*4if P and never selected
.2 if D, .2*4if D and never selected.

[Handwritten notes:
d2 = 1Tape
d21 = 1File
d20 = 1Console
d5-3 = console no. (logical)

Status marker (8/153) ]

1040 Create output n from data ba

There are four options for the destination of the stream
(1)To TAPE:C = tape number C' = amount est. C" = block number
(2)To FILE:C = -ve, even C' amount est. C" et seq. = file title (up to 4 words)
(3)To peripheral:C = peripheral code + 0.1, + *4 if a stream title is being given + translation table code in D22-18 (=0 if standard)
C' = amount est.
C" et seq. = title (if *4 set in C) (up to 4 words; N.B. brackets are not required)
C = m.3 if to online device m.
(4)Pending:C = 0.1, C' = amount est. + options of (3)

The amount estimate is in blocklets in d0 (equivalently pages in D3). The destination for a pending stream must be set by a subsequent use of 1041 Ba 0 S. Note that the program log appears to the system as output 16, and it is therefore not permissible for the user to select, create or destroy output 16.

1041 Terminate current output (monitors if no stream selected)

In all cases the current record is terminated with carriage control char. 0.0 .

(1) n ≥ 0:

(a)D1 = 1(D0 arbitrary) current output is terminated and cancelled (as if it was to NONE)
(b)D0 = 1, D1 = 0current output is terminated (so that reselection monitors)
(c)D0 = 0, D1 = 0current output is broken, so that further output is to the next part of this stream; and the next part is set up according to the data in ba (as in 1040). If Ba = 0 then the destination is set to be to the same peripheral type with the residue of the previous limit and no title, or faults if it is not to a peripheral.

In cases (b), (c), if the current (part) stream is pending then S points to the destination data (as in 1040) which may not be to TAPE. (But note that if to peripheral, a stream title is not allowed, and if given is ignored.)

If the stream being terminated is to TAPE, then on return to the program b97 is set to the last block used.

(2) n = N*4 + m (0 ≤ N ≤ 255; 0 ≤ m ≤ .7)

The (part) stream is renamed as input N (P type if m has D2 = 1, D otherwise); the stream is broken (as (c) above) if m is even, and terminated (as (b) above) if m is odd. An attempt to rename a stream whose destination is NONE causes a monitor 17.

1042 Find status of output n

The treatment of even and odd n is exactly as for the 1032 extracode. The following data is set into ba to give information concerning the stream:
D0 = 1if to tape
D1 = 1if to file
D6-2 peripheral code (= 0 if tape, file, none, or pending)
D7 = 1if currently selected as binary
D8 = 1if output limit has been exceeded for the first time
D9 = 1if   "      "      "        "       "     second time
D10= 1if pending
D11= 1if ever selected
D22-18translation table code
D23= 1if exists.
[next two entries added in handwriting:]
D12= 1if console
d5-3 =logical console no.

3. Faults

Errors detected in the use of the input parts of these extracodes (1030, 1031, 1041 (2)) cause fault 16, while those in the output parts (1040, 1041 (1)) cause fault 17.

B91 is set to describe the fault, and can take the following values:
0Unimplemented facility
1No stream selected
2Stream number out of range
3Illegal tape number
4Illegal block number
5Output estimate too large
6Limout exceeded
7Peripheral code out of range
8Sending 'pending' document to tape
9Attempt to cancel a stream being renamed
10Stream number clash
11Logical tape does not exist
12Too many parts in a broken stream
13Renaming a 'none' stream.

9 February 1966                                        B.L.

Copyright © 1966 University of Cambridge Computer Laboratory. Distributed by permission. Thanks to Barry Landy, Roger Needham and David Hartley for giving permission to distribute these documents. Thanks to Barry Landy for lending me the paper document from which this was scanned. Any typographical errors probably arose in the course of OCR.

Previous Planning Document: 11. The File Dictionary System: I - General Description, DWB, 11 February 1966 (supersedes number 6)
Next Planning Document: 13. Input and Output in Foreign Codes, MFB and BL, 17 November 1966
Return to Cambridge Supervisor Planning Documents
Return to CUCPS TITAN page
Return to CUCPS home page
Return to University of Cambridge home page

Contact: CUCPS Committee (
This HTML version last updated: $Date: 1999/03/07 20:17:40 $