UNIVERSITY MATHEMATICAL LABORATORY, CAMBRIDGE

SUPERVISOR PLANNING DOCUMENT 17
CONSOLES OTHER THAN TELETYPES AND CHARACTER EQUIVALENCES

1. Types of Console

We have to consider Teletype Model 33 teleprinters, Creed teleprinters and GPO Telex. We must also bear in mind Flexowriter input, since it is desirable to retain compatibility with non-console input as far as possible.

2. Types of Communication

We have to consider three types of communication.

  1. Control signals to the on-line system
  2. Control signals to sub-systems
  3. Characters going to compilers and object programs.

We specialise class (a) to include only three signals:

  1. cancel last character
  2. cancel last line
  3. emergency return to command status, to take effect whatever the status of the program.

All other control signals (e.g. Finish INPUT mode) are grouped with class (b).

The essential distinction is that class (a) and class (b) require supervisor attention, whereas class (c) involves compiler attention. To put it another way, we have to write supervisor program to deal with classes (a) and (b), but class (c) only requires us to lay down conventions to be followed by compiler writers.

3. Break

It is proposed that BREAK should be used for the sole purpose of returning to command status, no matter what is happening. This implies that BREAK must be recognised even when the computer is sending output to the console. The teletypes and our own Creed teleprinters have a BREAK key that opens the line, and the software deals with this. On GPO Telex we cannot open the line, hence the following technique is suggested. If the line is in write state (i.e. computer sending output) break is generated by repeatedly hitting a key whose code includes several ones : this has the effect of flooding the line with ones. If the line is in read state then the otherwise redundant line-feed is used to signal 'BREAK'.

4. Control Signals

There are two forms of control possible. One is to generate a fault when a particular character comes in : this fault can be trapped if the program wishes to detect the control signal. The other form of control is to pass the character to the program as a "carriage control" character.

On the Teletypes we have available a number of characters in "control shift". At present, ALT MODE sets fault 65 (and is used to signify end of input in INPUT modes, and EOT, RUBOUT and WRU come through as "carriage controls". On Creed teleprinters and Telex we do not have such a control shift. We therefore nominate an "escape" character, which causes the next character to be regarded as a "control shift" character. If the escape character is followed by another occurrence of the escape character, it is passed through as an ordinary character. Suitable escape characters would be suffix 2 on Creed teleprinters and % on GPO Telex. The situation is summarised in the following table :
TeletypeCreedTelex Action
XOFF2X%XErase last line
RUBOUT2R%R Backspace (i.e. delete last character)
ALTMODE2A%AEnd INPUT/ Set fault 65
WRU2W%WCarriage control 6.3
---22---Suffix 2 transmitted
------%%% transmitted

Note that RUBOUT has been chosen for logical backspace - this follows the existing PDP7 conventions. Note also that WRU has not been used on the TELEX, since there is likely to be a monitoring teleprinter on the line which would be activated by WRU.

5. Implication and Complications

5.1 Response.

XOFF and RUBOUT are non-printing characters. It is suggested that on receiving RUBOUT the system should delete the last character and output a left arrow. On receiving XOFF the system should output a word such as CANCELLED followed by newline. On receiving 2X or %X it should respond with carriage-return, line feed.

5.2 The Well route and the direct route.

For the well route there are no complications regarding the erase last line/last character (except possibly in implementation). Ideally there ought to be an input mode in which these actions are suppressed, but this is of low priority.

The direct route presents some complications. It is essential that the same conventions about erasing should apply whatever system is being used, and in order to avoid an impossible multiplication of effort, this means that erasing must be done by the Supervisor rather than by the individual systems. Equally, it is necessary that the user should be able to switch off the automatic erasing. If input were always read a line at a time there would be no difficulty, but if input is to be taken by characters there has to be a way of indicating when a line or part line is to be processed. A solution can be found in the fact that the input buffering system works in terms of records, which usually correspond to lines, but need not do so. Therefore we can have two modes of input, NORMAL and ABSOLUTE.

In normal mode, input from the console does not become available to the program until a record separator appears, at which time the input is available either as a line or as single characters, deletions having occurred where necessary. Since carriage return is a perfectly good record separator we can work on a basis that each line is processed when the carriage return appears. But by introducing a dummy record separator (0. 0) we can get a partial line processed and made available to the program. From the Teletype we can introduce a dummy record separator by one of the control keys: EOT seems the obvious choice, and the fact that it is non-printing is a positive advantage.

From Creed and Telex it will be necessary to use 2E and %E respectively.

In ABSOLUTE mode the erasing is switched off, and characters are read one at a time exactly as they come from the console.

6. Character Equivalences

It is essential that compilers and systems which are publicly offered should be able to take their input from any console, and preferably from any input medium. In many cases this can be achieved by defining one-to-one equivalences between characters, as is already done, for example, in the Autocode system. An alternative is to be able to define multi-character sequences as equivalents for non-existent characters, e.g. GT for "greater than", etc. Further complications arise if, for example, one wishes to edit a document which contains composite characters from a console which does not have a backspace. In all these situations the onus must be on the compiler/system not the supervisor. That is, all printing characters must have distinct internal codes. For example, a compiler which accepts certain equivalences must be able to switch off the equivalencing within string quotes. It is recognised that not all problems of this nature can be solved elegantly.

6.1 The Basic Character Set

It is desirable that if possible all systems which include one-to-one equivalences should use the same equivalences. We should decide on a set of standard equivalences and if necessary change existing systems to conform.

Following this idea further, we define a BASIC CHARACTER SET which can be represented on all devices with certain one-to-one equivalences. A suggestion for this character set is given as basis for argument. The character set consists of

A - Z            0 - 9     )
                           )    These are available
+   -   .   /              )
(   )   = space            )    on all devices.
CharacterEquivalent on
TeletypeEdsac 5
(Creed)
TelexFlexo CardsMercury 5
,,Suffix 2,,,,
***@***
>>>'>>>
::::::
????
[[[£[[
]]]%%]]

All systems/languages should be capable of accepting input in the basic character set, though this does not prevent them using other characters when these are available. The main implication of this rule is that systems that make use of composite characters and lower-case letters should provide an alternative input mode.

6.2 Other character equivalences

The following equivalences are suggested as good practice.
TeletypeEdsac 5Flexo PrinterCards
~
\|π|
*Suffix 10** (in numbers)
$§

7. Internal Code

Updated internal code tables are attached: note that internal codes have been assigned for GPO Telex characters.

APPENDIX
INTERNAL CODE TABLES

A = ASCII (On-line Consoles & PDP7 8-track tape)
F = Titan Flexowriter (7-track tape)
T = Titan Teleprinter (5-track tape)
P = Line Printer
M = Mercury Autocode Teleprinter (5-track tape)
C = FORTRAN Card Code
G = GPO Telex
ALL = all devices at present available

Notes for the tables

(1)These characters change to the other set of internal code and do not correspond to anything on the external device.
(2)Redundant shifts are ignored during input. Appropriate shifts are automatically inserted on output, and it is never necessary to output an explicit shift character.
(3)On output, run-out is upper-case on 7-track tape, blank tape on 8-track or 5-track tape (Titan or Mercury). On input 7.3 will only come from 5-track Titan code tape, (since blank tape is figure shift in Mercury code) or from 8-track tape.
(4)Bogus characters not explicitly rejected are translated to 7.7 inner set.
(5)These codes are identical with the corresponding inner set codes for upper case letters.
(6)Erase will never occur on input from 5-track Titan code tape, since it is identical with figure shift.

INNER SET

CodeCharacterDevices
0.0
0.1SpaceALL
0.2TabFA
0.3BackspaceF
0.4Shift outer(1)
0.5Shift inner(1)
0.6LC/LSF/TM(2)
0.7UC/FSF/TM(2)
 
1.0(ALL
1.1)ALL
1.2,FPCMAG
1.3πPCM
1.4?PCMG
1.5&CA
1.6*ALL
1.7/ALL
 
2.00ALL
2.11"
2.22"
2.33"
2.44"
2.55"
2.66"
2.77"
 
3.08"
3.19"
3.2<FPCA
3.3>ALL
3.4=ALL
3.5+ALL
3.6-ALL
3.7.ALL
 
4.0'FPCMAG
4.1AALL
4.2B"
4.3C"
4.4D"
4.5E"
4.6F"
4.7G"
 
5.0H"
5.1I"
5.2J"
5.3K"
5.4L"
5.5M"
5.6N"
5.7O"
 
6.0P"
6.1Q"
6.2R"
6.3S"
6.4T"
6.5U"
6.6V"
6.7W"
 
7.0X"
7.1Y"
7.2Z"
7.3Run-outAFT(3)
7.4£G
7.5
7.6
7.7FaultAFC(4)

If no chacacter is indicated, the code is unassigned at present and should not be used.

OUTER SET

CodeCharacterDevices
0.0
0.1SpaceALL
0.2
0.3
0.4Shift outer(1)
0.5Shift inner(1)
0.6LC/LSF/TM(2)
0.7UC/FSF/TM(2)
 
1.0F
1.1F
1.2×F
1.3;FA
1.4StopcodeF
1.5$A
1.6BellAG
1.7:FTCAG
 
2.0M
2.1[FTCA
2.2]FTCA
2.3FTM
2.4M
2.5TM
2.6UnderlineFC
2.7Vertical BarFPC
 
3.0%AG
3.1M
3.2@AG
3.3A
3.4A
3.5\A
3.6"A
3.7Suffix 2T
 
4.0Suffix 10T
4.1AF(5)
4.2B"
4.3C"
4.4D"
4.5E"
4.6F"
4.7G"
 
5.0H"
5.1I"
5.2J"
5.3K"
5.4L"
5.5M"
5.6N"
5.7O"
 
6.0P"
6.1Q"
6.2R"
6.3S"
6.4T"
6.5U"
6.6V"
6.7W"
 
7.0X"
7.1Y"
7.2Z"
7.3~F
7.4§F
7.5#A
7.6!A
7.7EraseAFTM(6)

CARRIAGE CONTROL CHARACTERS

(NL  =  Newline,         CR  =  Carriage Return,      LF  =  Line Feed)

(a) INPUT

0.1LF not immediately preceded by CR
2.0CR not immediately followed by LF
2.1NL or CR followed immediately by LF
6.1EOT)
6.2RUBOUT)Consoles only
6.3WRU)
4.0FORMFEEDConsoles & 8-track tape
4.1VT     "    "     "    "
0.0Dummy : may occur in binary streams, or streams from magnetic tape/disc, or from consoles.

(b) OUTPUT

CodeEffect on
PrinterFlexowriterTeleprinter
0.0IgnoredIgnoredIgnored
0.1**No CR, 1 LF
0.2**"    2 LF
0.3**"    3 LF
0.4**"    4 LF
0.5**"    5 LF
0.6**"    6 LF
0.7**"    7 LF
 
1.0**"    8 LF
1.1**"    9 LF
1.2**"   10 LF
1.3**"   11 LF
1.4**"   12 LF
1.5**"   13 LF
1.6**"   14 LF
1.7**"   15 LF
 
2.0IgnoredIgnoredCR, no LF
2.1Print with 1 LF1 NLCR + 1 LF
2.2"   "   2 LF2 NLCR + 2 LF
2.3"   "   3 LF3 NLCR + 3 LF
2.4"   "   4 LF4 NLCR + 4 LF
2.5"   "   5 LF5 NLCR + 5 LF
2.6"   "   6 LF6 NLCR + 6 LF
2.7"   "   7 LF7 NLCR + 7 LF
 
3.0Print with 8 LF8 NLCR + 8 LF
3.1"     "   9 LF9 NLCR + 9 LF
3.2"     "  10 LF10 NLCR + 10 LF
3.3"     "  11 LF11 NLCR + 11 LF
3.4"     "  12 LF12 NLCR + 12 LF
3.5"     "  13 LF13 NLCR + 13 LF
3.6"     "  14 LF14 NLCR + 14 LF
3.7"     "  15 LF15 NLCR + 15 LF
 
4.0Advance to next pageIgnoredIgnored
4.1********
4.2********
4.3********
4.4********
4.5********
4.6********
4.7********
 
5.0********
5.1********
5.2********
5.3********
5.4********
5.5********
5.6********
5.7********
 
For Teletypes and ASCII : 6.0ALT MODE
6.1EOT
6.2RUB OUT
6.3WRU
 
For all other devices except plotter
 
6.0 to 7.7IgnoredIgnoredIgnored
Notes
*Equivalent to same code with 2 added
**Equivalent to 4.0 at present, but should not be used
***Equivalent to the same code with 4 subtracted.
(For Teletypes and ASCII, 4.1 gives VT)

Carriage control characters have a special significance for the plotter - see separate description of plotter software.


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: 16. Commands and Job Organisation, AGF, 12 September 1966
Next Planning Document: 18. Further Thoughts on P.D. 17, MVW and DWB, 28 September 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 (soc-cucps-committee@lists.cam.ac.uk)
This HTML version last updated: $Date: 1999/06/14 10:59:50 $