RFC 734
SUPDUP Protocol
RFC 734: SUPDUP Protocol ๐
bestie, this is the SUPDUP Display Protocol spec, and the title block is ๐ฅ. It's NWG/RFC# 734, written by Mark Crispin at SU-AI for the Network Working Group, with the NIC number 41953, dated 7 October 1977. The header line reads NWG/RFC# 734 MRC 07-OCT-77 08:46 41953. This copy doesn't list a category or status, and it doesn't say what it obsoletes or updates. Lowkey iconic, honestly ๐
INTRODUCTION โจ
okay so SUPDUP is described as "a highly efficient display telnet protocol" ๐ฆ It started as a private protocol between the ITS systems at MIT so that a user at one of them could use another one as their display. At the time of writing, SUPDUP user programs existed for Data Disc and Datamedia displays at SU-AI, and for Datamedias at SRI-KL. The author wasn't aware of any SUPDUP servers outside the four MIT ITS sites ๐ธ
The big win over a single terminal's protocol is that SUPDUP defines a "virtual" or "software" display terminal that handles the relevant cursor motion operations. It isn't built on any one display terminal. It's built on the set of functions every display terminal has in common, so it's completely device-independent ๐ It also covers terminals that can't do certain things, like line or character insert/delete. It goes even further and handles terminals missing any set of features, all the way down to model 33 Teletypes ๐ญ
Compared to TELNET, SUPDUP takes advantage of the full capabilities of display terminals, but it can also run printing terminals ๐
SUPDUP runs independently of TELNET. It is not an option to TELNET ๐ โโ๏ธ It also assumes some things about the server, the user programs, and their capabilities. Specifically, it assumes the operating system on a server host provides all the display-oriented features of ITS. A server is allowed to skip certain display operations that SUPDUP supports. The protocol is far-reaching enough that terminals can be handled as well as that host can handle terminals in general. And if a host doesn't do anything special for display terminals, there's no point building a SUPDUP server, because TELNET will work just as well ๐
If you want the full scoop on SUPDUP's display facilities and ITS, you can FTP the online file .INFO.;ITS TTY from the ARPAnet host MIT-AI (host 206 octal, 134. decimal). For more info, the mailing address for SUPDUP is (BUG SUPDUP) at MIT-AI. If your mail system won't let you use parentheses, use Bug-SUPDUP@MIT-AI instead ๐ฌ
BACKGROUND ๐ง
SUPDUP started out as the internal protocol used between parts of ITS, and between ITS and "intelligent" terminals. Over the network, a user host acts like an intelligent terminal programmed for ITS. Main character energy ๐
Here's how terminal output works in ITS. The user program tells the system to do various operations, like printing characters, clearing the screen, or moving the cursor. Those operations get formed into 8-bit characters (using the %TD codes described below) and stored in a buffer. At interrupt level, whenever the terminal demands output, characters get pulled out of the buffer and translated into terminal-dependent codes. Padding and cursor motion optimization also happen at this point โจ
Sometimes the interrupt side doesn't run on the same machine as the user program. SUPDUP terminals run their "interrupt side" on the user host. When SUPDUP runs between two ITS systems, the SUPDUP user and server programs and the network just move characters from the buffer on the server machine to the buffer on the user machine. The interrupt side then runs on the user machine as if those characters had been generated locally ๐ซถ
Because SUPDUP and ITS are both super interactive, all transactions are strictly character at a time, and all echoing is remote. Also, all padding and cursor control optimization must be done by the user ๐
Since this is also the internals of ITS, MIT reserves the right to change it at any time if needed to add new features. In particular, the initial negotiation will probably change to send additional variables, and additional %TD codes may be added at any time. User programs should ignore the ones they don't know about ๐
Here are the conventions used in this document. Function keys (keys that represent a "function" rather than a "graphic character") are in upper case in square brackets, like [LINE FEED]. Prefix keys (keys that generate no character, but are held down while typing another character to modify it) are in upper case in angle brackets, like <CONTROL>. So <CONTROL><META>[LINE FEED] is the character you get when CONTROL and META are both held down while LINE FEED is typed. Case matters: <CONTROL>A is a different character from <CONTROL>a ๐ Finally, any number that doesn't explicitly say what base it's in (octal or decimal) should be read as octal, unless it's immediately followed by a period, in which case it's decimal ๐ข
INITIALIZATION ๐ธ
The SUPDUP server listens on socket 137 octal. ICP goes ahead the normal way to set up 8-bit connections. After the ICP is done, the user side sends several parameters to the server side as 36.-bit words. Each word goes over the 8-bit connection as six 6-bit bytes, most-significant first. Each byte sits in the low-order 6 bits of a character ๐ฆ
The first word is the negative of the number of variables that follow, stored in the high-order 18. bits (the low-order 18. bits are ignored). After that come the values of the TCTYP, TTYOPT, TCMXV, TCMXH, and TTYROL terminal descriptor variables. Those are the names they go by at ITS sites. These variables are 36.-bit binary numbers, and together they define the terminal characteristics for the virtual terminal at the REMOTE host ๐
The count is there for future compatibility ๐ง If more variables need to be sent later, the server should assume "reasonable" default values for any the user doesn't specify. PDP-10 fans will recognize the count format (ie, -count,,0) as an AOBJN pointer ๐ At the time of writing there are five variables, so this word should be -5,,0 โจ
The TCTYP variable defines the terminal type. It MUST be 7 (%TNSFW). Any other value is a violation of protocol ๐ซ
The TTYOPT variable specifies what capabilities or options the user's terminal has. A bit being true means the terminal has that option. This variable also includes user options that the user may want to change at their own discretion. They're included here because they might be specified along with the terminal capabilities during the initial negotiation. See the TTYOPT bits below ๐
The TCMXV variable specifies the screen height in number of lines ๐
The TCMXH variable specifies the line width in number of characters. This value is one less than the screen width, because ITS shows line overflow by outputting an exclamation point at the end of the display line before moving to the next line ๐ Note: the terminal must not do an automatic CRLF when a character is printed in the rightmost column. If that's unavoidable, the user SUPDUP must decrement the width it sends by one ๐ญ
Heads up: setting either theTCMXVorTCMXHdimension greater than128.will work, but it causes some problems, because coordinates are sometimes represented in only 7 bits. The main problems show up in the SUPDUP protocol when sending the cursor position after an output reset, and in ITS user programs that use the display position codes^PHand^PV.
The TTYROL variable specifies the "glitch count" when scrolling. This is the number of lines to scroll up when scrolling is needed. If it's zero, the terminal can't scroll at all. 1 is the usual value, but some terminals glitch up by more than one line when they scroll ๐
After the user sends the terminal options, the server should reply with an ASCII greeting message, ended with a %TDNOP code (%TD codes are described below). Everything the server sends after the %TDNOP is either a printing character or a virtual terminal display code ๐ฅ๏ธ
The user and the server now both talk using the intelligent terminal protocol (described below) from the user side, and %TD codes from the server side. The user also gets two extra commands on top of that. They're escaped by sending 300 octal. If the character after the escape is 301 octal, the server should try to log off the remote job. This is usually sent right before the user disconnects, so the logout should happen regardless of whether the connection is still intact ๐ช If the character after the escape is 302 octal, then all ASCII characters up to a null (000 octal) are read as the "console location," which the server can handle however it likes. There should be no carriage return or line feed in the console location text. Normally it gets saved so it can be shown by the "who" command when other users ask where this user is ๐
TTYOPT FUNCTION BITS ๐
The relevant TTYOPT bits for SUPDUP usage are listed below. The values are given in octal, with the left and right 18-bit halves separated by ,, like in the usual PDP-10 convention ๐งฎ
Bit name Value Meaning
%TOALT 200000,,0 characters 175 and 176 are converted to
altmode (033) on input.
%TOERS 40000,,0 this terminal is capable of selectively
erasing its screen. That is, it supports
the %TDEOL, the %TDDLF, and (optionally)
the %TDEOF operations. For terminals
which can only do single-character
erasing, see %TOOVR.
%TOMVB 10000,,0 this terminal is capable of backspacing
(ie, moving the cursor backwards).
%TOSAI 4000,,0 this terminal has the Stanford/ITS
extended ASCII graphics character set.
%TOOVR 1000,,0 this terminal is capable of overprinting;
if two characters are displayed in the
same position, they will both be visible,
rather than one replacing the other.
Lack of this capability but the capability
to backspace (see %TOMVB) implies that the
terminal can do single character erasing
by overstriking with a space. This allows
terminals without the %TOERS capability to
have display-style "rubout processing", as
this capability depends upon either %TOERS
or [%TOMVB and not %TOOVR].
%TOMVU 400,,0 this terminal is capable of moving the
cursor upwards.
%TOLWR 20,,0 this terminal's keyboard is capable of
generating lowercase characters; this bit
is mostly provided for programs which want
to know this information.
%TOFCI 10,,0 this terminal's keyboard is capable of
generating CONTROL and META characters as
described below.
%TOLID 2,,0 this terminal is capable of doing line
insert/delete operations, ie, it supports
%TDILP and %TDDLP.
%TOCID 1,,0 this terminal is capable of doing
character insert/delete operations, ie, it
supports %TDICP and %TDDCP.
TTYOPT FUNCTION BITS (continued) ๐
Okay so these next two are the big ones ๐ Bit names and values stay exactly as written, because the server is going to be reading them character for character.
Bit name Value Meaning
%TPCBS 0,,40 this terminal is using the "intelligent
terminal protocol".
THIS BIT MUST BE ON.
%TPORS 0,,10 the server should process output resets
instead of ignoring them.
IT IS HIGHLY RECOMMENDED THAT THIS BIT BE
ON; OTHERWISE THERE MAY BE LARGE DELAYS IN
ABORTING OUTPUT.
Now the user option bits ๐ธ These are the ones the user gets to pick for themselves, totally at their own discretion. The ones marked "normally on" are the ones that get switched on when a terminal is initialized, which basically means when you type [CALL] on a local terminal. So it's like the default settings, bestie โจ
Bit name Value Meaning
%TOCLC 100000,,0 convert lower-case input to upper case.
Many terminals have a "shift lock" key
which makes this option useless.
NORMALLY OFF.
%TOSA1 2000,,0 characters 001-037 should be displayed
using the Stanford/ITS extended ASCII
graphics character set instead of uparrow
followed by 100+character.
NORMALLY OFF.
%TOMOR 200,,0 the system should provide "**MORE**"
processing when the cursor reaches the
bottom line of the screen. **MORE**
processing is described in ITS TTY.
NORMALLY ON.
%TOROL 100,,0 the terminal should scroll when attempting
output below the bottom line of the screen
instead of wrapping around to the top.
NORMALLY OFF.
INPUT -- THE INTELLIGENT TERMINAL PROTOCOL ๐ฆ
Quick heads up, bestie: this is only the part of the intelligent terminal protocol that actually matters for SUPDUP ๐ง If you want the whole thing, go read ITS TTY, it's giving full encyclopedia.
CHARACTER SETS ๐
Okay so SUPDUP has two character sets it can use. First there's the 7-bit one, which is standard ASCII. Then there's the 12-bit one, which is extended ASCII. Extended ASCII has 5 high order "bucky" bits on input, and it has graphics for octal 000-037 and 177 (the "Stanford/ITS character set" section has all the deets). Here's the twist: both sets look identical on output ๐ That's because the host is never supposed to send the standard ASCII formatting characters (TAB, LF, VT, FF, CR) as formatting characters. The characters whose octal values match those formatting characters only ever get output if the user job has them enabled, and setting %TOSAI and %TOSA1 usually takes care of that ๐
Input is where things get dramatic ๐ On the 7-bit side, anything typed with a value of 037 octal or less is treated as an ASCII control character. On the 12-bit side, the character can have 5 "bucky" bits stuck on it. The two most important ones are CONTROL and META, and together they make a 9-bit character set. TOP is what tells printing graphics in the extended set apart from ASCII controls. The other two bucky bits are reserved, so you just ignore them ๐ Now, because both 7-bit and 12-bit terminals are super common out there, 0001, 0301, and 0341 all count as <CONTROL>A on input for most programs, while 4001 is the downwards arrow ๐
MAPPING BETWEEN CHARACTER SETS ๐ง
Lots of programs and hosts just can't handle 12-bit input, so in that case the 12-bit input gets folded down to 7-bit. Here's how it goes: TOP and META get discarded ๐๏ธ If CONTROL is on, then a lowercase alphabetic 7-bit part gets turned into uppercase. After that, if the 7-bit part is between 077 and 137, the 100 bit gets complemented. If the 7-bit part is 040, the 040 bit gets subtracted instead. (Yes, <CONTROL>? turns into [RUBOUT] and <CONTROL>[SPACE] turns into [NULL], it's lowkey wild ๐ญ) Either way the CONTROL bit gets thrown out, and whatever is left gets treated as a plain 7-bit ASCII character. Also, in this case the downwards arrow gets read by the program as standard ASCII <CONTROL>A, so yeah, it's the same as before ๐ฅ
Servers that expect 12-bit input but got told to use the 7-bit set should do the unfolding from 7-bit back up to 12-bit. How they do it is totally up to the server ๐ซถ On ITS, user programs that use the 12-bit set usually have a separate way of doing 7-bit. That often looks like prefix characters that say the next character should be "controllified" or "metized", etc. Iconic behaviour, honestly โจ
INPUT -- THE INTELLIGENT TERMINAL PROTOCOL (continued) ๐ธ
BUCKY BITS ๐
Normally, whatever you type on the keyboard just gets sent to the foreign host as is. Easy. But there are two exceptions, so pay attention ๐ The first one is when an octal 034 character needs to be sent. It has to be sent twice, because 034 is an escape character for protocol commands. The second exception is when %TOFCI is set and a character with non-zero bucky bits needs to go out. In that case the character, which is in its 12-bit form, looks like this:
Name Value Description
%TXTOP 4000 This character has the [TOP] key depressed.
%TXSFL 2000 Reserved, must be zero.
%TXSFT 1000 Reserved, must be zero.
%TXMTA 400 This character has the [META] key depressed.
%TXCTL 200 This character has the [CONTROL] key depressed.
%TXASC 177 The ASCII portion of the character
So this is how it actually gets sent: as three bytes ๐ The first byte is always 034 octal (which is exactly why 034 has to be quoted, see?). The second byte holds the bucky bits, meaning the %TXTOP through %TXCTL bits, shifted over 7 bits (so %TXTOP turns into 20), with the 100 bit switched on. The third byte is the %TXASC part of the character. For example, <CONTROL><META>[LINE FEED] gets sent as 034 103 012. Main character energy, honestly ๐
OUTPUT RESETS ๐ฆ
Here's where the intelligent terminal protocol gets involved again ๐ When a network interrupt (INR/INS) shows up, the user program has to keep track of it. It should increment a count of received network interrupts each time that happens. Then it should not do any output, and if it can, it should abort any output that's already in progress, as long as that count is greater than zero. (NOTE: the program MUST allow for the count to go less than zero ๐)
The server no longer knows where the cursor is, so it just pauses all output until the user tells it where the cursor is. This also gives the server a sense of how much got thrown out, just in case it needs to show some of that aborted output again later on ๐ง The user program does this when it gets a %TDORS from the server. At that point it should decrement that "number of received network interrupts" count I mentioned, then send 034 followed by 020, the vertical position, and the horizontal position of where the cursor is right now on the user's screen. Bestie, it's a whole handshake ๐ซถ
OUTPUT -- DISPLAY PROTOCOL (%TD CODES) ๐
Display output is a lot simpler, thank goodness โจ Codes less than 200 octal are printing characters, so they just get displayed on the terminal (check out the section describing the "Stanford/ITS character set" for more). Codes greater than or equal to 200 (octal) are called "%TD codes", because their names all start with %TD. The %TD codes that matter for SUPDUP are listed below. Any other code you get should be ignored, though a bug report might be sent to the server's maintainers ๐ Also, the normal ASCII formatting characters (011 through 015) do NOT have their formatting sense under SUPDUP, so they shouldn't show up at all unless the Stanford/ITS extended ASCII character set is in use (aka %TOSAI is set in the TTYOPT word) ๐
For cursor positioning, the top left corner is (0,0), meaning vertical position 0 and horizontal position 0 ๐
%TD code Value Meaning
%TDMOV 200 General cursor position code. Followed by
four bytes; the first two are the "old"
vertical and horizontal positions and may
be ignored. The next two are the new
vertical and horizontal positions. The
cursor should be moved to this position.
On printing consoles (non %TOMVU), the old
vertical position may differ from the true
vertical position; this can occur when
scrolling. In this case, the user program
should set its idea of the old vertical
position to what the %TDMOV says and then
proceed. Hence a %TDMOV with an old vpos
of 20. and a new vpos of 22. should always
move the "cursor" down two lines. This is
used to prevent the vertical position from
becoming infinite.
%TDMV1 201 An internal cursor motion code which
should not be seen; but if it is, it has
two argument bytes after it and should be
treated the same as %TDMV0.
%TDEOF 202 Erase to end of screen. This is an
optional function since many terminals do
not support this. If the terminal does
not support this function, it should be
treated the same as %TDEOL.
%TDEOF does an erase to end of line, then
erases all lines lower on the screen than
the cursor. The cursor does not move.
%TDEOL 203 Erase to end of line. This erases the
character position the cursor is at and
all positions to the right on the same
line. The cursor does not move.
OUTPUT -- DISPLAY PROTOCOL (%TD CODES) (continued) ๐ซถ
%TD code Value Meaning
Okay, the rest of the %TD crew is giving main character energy ๐
โจ
%TDDLF 204 Clear the character position the cursor is
on. The cursor does not move.
%TDCRL 207 If the cursor is not on the bottom line of
the screen, move cursor to the beginning
of the next line and clear that line. If
the cursor is at the bottom line, scroll
up.
%TDNOP 210 No-op; should be ignored.
%TDORS 214 Output reset. This code serves as a data
mark for aborting output much as IAC DM
does in the ordinary TELNET protocol.
%TDQOT 215 Quotes the following character. This is
used when sending 8-bit codes which are
not %TD codes, for instance when loading
programs into an intelligent terminal.
The following character should be passed
through intact to the terminal.
%TDFS 216 Non-destructive forward space. The cursor
moves right one position; this code will
not be sent at the end of a line.
%TDMV0 217 General cursor position code. Followed by
two bytes; the new vertical and horizontal
positions.
%TDCLR 220 Erase the screen. Home the cursor to the
top left hand corner of the screen.
%TDBEL 221 Generate an audio tone, bell, whatever.
%TDILP 223 Insert blank lines at the cursor; followed
by a byte containing a count of the number
of blank lines to insert. The cursor is
unmoved. The line the cursor is on and
all lines below it move down; lines moved
off the bottom of the screen are lost.
%TDDLP 224 Delete lines at the cursor; followed by a
count. The cursor is unmoved. The first
line deleted is the one the cursor is on.
Lines below those deleted move up. Newly-
created lines at the bottom of the screen
are blank.
Next up are the insert and delete character codes, plus the last couple of options, and then the big Stanford/ITS character set ๐ฆ
%TDICP 225 Insert blank character positions at the
cursor; followed by a count. The cursor
is unmoved. The character the cursor is
on and all characters to the right on the
current line move to the right; characters
moved off the end of the line are lost.
%TDDCP 226 Delete characters at the cursor; followed
by a count. The cursor is unmoved. The
first character deleted is the one the
cursor is on. Newly-created characters at
the end of the line are blank.
%TDBOW 227 Display black characters on white screen.
HIGHLY OPTIONAL.
%TDRST 230 Reset %TDBOW and such any future options.
STANFORD/ITS CHARACTER SET โจ
This section describes the extended ASCII character set ๐ It originated with the character set developed at SAIL, but it was modified for 1968 ASCII.
This character set only applies to terminals with the %TOSAI and %TOFCI bits set in their TTYOPT word. For non-%TOSAI terminals, the standard ASCII printing characters are the only available output characters. For non-%TOFCI terminals, the standard ASCII characters are the only available input characters.
PRINTING CHARACTERS ๐
The first table describes the printing characters. For output, the 7-bit code is sent, and terminal operations are performed by %TD codes. For input, the characters with values 000-037 and 177 must have the %TXTOP bit on to indicate the graphic is intended rather than a function or ASCII control.
Value Character
4000 centered dot
4001 downward arrow
4002 alpha
4003 beta
4004 logical AND
4005 logical NOT
4006 epsilon
4007 pi
4010 lambda
4011 gamma
4012 delta
4013 uparrow
4014 plus-minus
4015 circle-plus
4016 infinity
4017 partial delta
4020 proper subset (left horseshoe)
4021 proper superset (right horseshoe)
4022 intersection (up horseshoe)
4023 union (downward horseshoe)
4024 universal quantifer
4025 existential quantifier
4026 circle-X
4027 double arrow
4030 left arrow
4031 right arrow
4032 not-equal
4033 lozenge (diamond)
4034 less-than-or-equal
4035 greater-than-or-equal
4036 equivalence
4037 logical OR
0040 first standard ASCII character (space)
.. . . .
0176 last standard ASCII character (tilde)
4177 integral
FUNCTION KEYS AND SPECIAL CHARACTERS ๐ง
In addition, the following special characters exist for input only. These characters are function keys rather than printing characters. However, some of these characters have some format effect or graphic which they echo as. The host, not the SUPDUP program, handles any such mappings ๐
Value Character Usual echo Usual Function
0000 [NULL]
0010 [BACK SPACE] text formatting
0011 [TAB] text formatting
0012 [LINE FEED] text formatting
0013 [VT] text formatting
0014 [FORM] text formatting
0015 [RETURN] text formatting
0032 [CALL] uparrow-Z escape to system
0033 [ALTMODE] lozenge or $ special activation
0037 [BACK NEXT] uparrow-underscore monitor command prefix
0177 [RUBOUT] character delete
4101 [ESCAPE] local terminal command
4102 [BREAK] local subsystem escape
4103 [CLEAR]
4110 [HELP] requests a help message
BUCKY BITS ๐
For all input characters, the following "bucky bits" may be added to the character. Their interpretation depends entirely upon the host. <TOP> is not listed here, because it has been considered part of the character in the previous tables.
<CONTROL> is different from ASCII CTRL. However, many programs may request the operating system to map such characters to the ASCII forms (with the <TOP> bit off). In this case, <META> is ignored ๐
Value Key
2000 Reserved
1000 Reserved
0400 <META>
0200 <CONTROL>
ACKNOWLEDGEMENTS ๐ซถ
Richard M. Stallman (RMS@MIT-AI) and David A. Moon (Moon@MIT-MC) of the MIT-AI and MIT-MC systems staff wrote the source documentation and the wonderful ITS terminal support that made this protocol possible. It must be emphasized that this is a functional protocol which has been in operation for some years now ๐
In addition, Moon, Stallman, and Michael McMahon (MMcM@SRI-KL) provided many helpful comments and corrections to this document.
For further reference, the sources for the known currently existing SUPDUP user programs are available online as:
[MIT-AI] SYSENG;SUPDUP > for the ITS monitor,
[SU-AI] SUPDUP.MID[NET,MRC] for the SAIL monitor,
[SRI-KL] <MMcM>SD.FAI for the TOPS-20 monitor.
The source for the known currently existing SUPDUP server program is:
[MIT-AI] SYSENG;TELSER > for the ITS monitor.
These programs are written in the MIDAS and FAIL dialects of PDP-10 assembly language. That's the whole vibe, bestie ๐ธโจ
๐ฆ where this page comes from
- ietf: rfc734 1977-10
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms