Skip to main content

Level 0 Protocol

Particular Proposal for Level 0 Protocol​

It is proposed that level 0 be kept very simple. This is so that implementation can be quickly accomplished and experimentation with the protocol begun. Another reason is that the least powerful host and even programmable terminals should be able to implement it. In accordance with this, the "rule" was made that a command be included only if its output is a function solely of the current command and the "beam position" current at the start of the command. In other words, the interpreter for level 0 need have no internal storage for "modes" or pushdown stacks. With this restriction it is hoped that a very simple implementation will be possible for level 0. In particular, perhaps one could eventually build a hardware translator from level 0 code to one's own particular terminal's code.

Note that in the opcode assignment for level 0, bits 4, 2, and 1 have special meaning for the move, line, and dot commands. In particular, the 1 bit encodes absolute versus relative data mode, the 4 bit encodes whether any visible output occurs, and the 2 bit determines whether the visible output is a line or a dot.

Level 0: Command Summary​

The following is a list of commands (and their syntax) in level zero. Detailed descriptions of these commands follow in the next section. Commands dealing with protocol may be added by the Connection Committee. (They currently request opcodes in the range 128 to 255.)

(As described in Basic Data Forms, above, <x coordinate>, <y coordinate>, <x delta> and <y delta> are two-byte coordinate values, <string> is a count followed by <count> many bytes and <value> is an eight bit number.)

Decimal  Octal   Binary    Format
0 0 00000000 Null
1 1 00000001 Erase screen and reset beam
2 2 00000010 Move Absolute <x coordinate> <y coordinate>
3 3 00000011 Move Relative <x delta> <y delta>
4 4 00000100 Draw Absolute <x coordinate> <y coordinate>
5 5 00000101 Draw Relative <x delta> <y delta>
6 6 00000110 Dot Absolute <x coordinate> <y coordinate>
7 7 00000111 Dot relative <x delta> <y delta>
8 10 00001000 Text <string>
9 11 00001001 TextR <string>
10 12 00001010 End of Picture
11 13 00001011 Escape <value> <string>

Level 0: Command Descriptions​

0 Null Statement ("NULL"). This statement has no arguments--and no effect, either.

1 Erase screen and reset beam to origin ("ERASE"). This command indicates that a new picture is about to be drawn. It should always be (eventually) paired with a following End of Picture command.

2 Move beam invisibly to absolute position ("MOVEA") <x coordinate> <y coordinate>. Nothing is drawn; the beam is positioned to the specified absolute x,y position.

3 Move beam invisibly by relative amount ("MOVER") <x coordinate> <y coordinate>. Nothing is drawn; the beam is shifted by the specified amount in x and y.

4 Draw line to absolute position ("DRAWA") <x coordinate> <y coordinate>. A line is drawn from the current beam position to the specified absolute x,y position.

5 Draw line to relative position ("DRAWR") <x delta> <y delta>. A line is drawn from the current beam position to the position delta x and delta y away.

6 Display a Dot at absolute position ("DOTA") <x coordinate> <y coordinate>. The beam is moved invisibly to absolute position x,y and a dot is displayed there.

7 Display a Dot at relative position ("DOTR") <x delta> <y delta>. The beam is moved invisibly by the specified amount in x and y and a dot is displayed there.

8 Display text ("TEXT") <string>. At the current beam position, display some characters at the normal size for the device being operated. <string> consists of a <count> followed by count many characters. If there is no "normal size", choose the size so that seventy-two characters are displayed per line. The characters in the string are coded in network ASCII all codes between 0 and 127 (decimal) inclusive are permitted. (At level zero, what happens to control characters is left unspecified.) Where the beam is, following execution of this command, is left unspecified, except that another Display Text command immediately following will append its text to the previous string. (The use of the TEXT command is discouraged; use TextR instead.) The position of the first character relative to the initial beam position is left unspecified.

9 Display text and restore beam ("TEXTR") <string>. At the current beam position, display a string of characters at the normal size for the device being operated; then reposition the beam to where it was before the command. <string> consists of a <count> followed by count many characters. If there is no "normal size", choose the size so that seventy-two characters are displayed per line. The characters in the string are coded in network ASCII; all codes between 0 and 127 (decimal) inclusive are permitted. (At level zero, what happens to control characters is left unspecified.) The position of the first character relative to the initial beam position is left unspecified.

10 End of Picture ("ENDPIC"). This command denotes the end of a new picture. It must be paired with a preceding ERASE command.

11 Escape to device specifics ("ESCDEV") <value> <string>. If "value" is the code assigned (by the Protocol Committee) to the device being operated, then transmit the eight-bit bytes in <string> (which starts with a <count> indicating the number of bytes) to the device without examining them. Otherwise ignore this command. If the device does not accept 8-bit information, reformat the data in some device specific way; an example would be throwing away the high order bit for a seven bit device, or gathering 5 8-bit bytes into one 36-bit word, again discarding the high order bits, perhaps. The action of the bytes in the string should leave alone (or at least restore) any hardware beam position registers in the device which the interpreter might conceivably depend on.

This command really should not be used it was included at level 0 so that specific applications can do mode setting and other device specific manipulations. For example, ARDS terminals may optionally have several independently addressable output scopes. The selection mechanism changes state only when a particular sequence of ASCII characters reaches the terminal. Thus ESCDEV would be used to select which scope(s) is/are to be affected by following commands. (The current state is invisible to the graphics package at the Using Host.)

Further, suppose that another make of terminal has a similar option, which responds to a different code sequence. This possibility is the motivation for conditionally ignoring the ESCDEV command based on the "<value>" specified. Given that a particular application will only be used to output to either an ARDS or this second make (with the multiple scope option), then the application could always send two ESCDEV commands, one applicable only to ARDS terminals, and the other applicable only to the second make.