RFC 553
Draft design for a text/graphics protocol
Draft design for a text/graphics protocol β¨
RFC 553, titled Draft design for a text/graphics protocol, is brought to you by C. Irby and K. Victor from SRI-ARC (NIC 17810). It's dated 14 July 1973. The original doesn't list a category or status, and it doesn't obsolete or update anything. π
Okay bestie, this one is a draft that's basically a remix of existing ideas, not a brand-new concept. π It builds on work by the NGG, Elaine Thomas, Peter Deutsch, Charles Irby, Ken Victor, Bill Duvall, Bob Sproull, and others at ARC, PARC, and BBN. π«Ά
They were lowkey worried that the protocol in RFC 493 had basically no text-handling. π They also felt this protocol would shape how people write graphics apps for years, so stuff like "beam twiddling" shouldn't be part of it. π
Things like that deal with the problem at too low a level for something meant to serve a wide range of graphics devices. π
They also weren't feeling RFC 493's "levels" idea as a real Network Standard Protocol. It's fine for early experiments, but it's not the move for the final thing. β¨ Instead, they want two levels, segmented and structured. π That way app writers can keep it super simple with segments made of lines, dots, or character strings, or go full powerhouse with a structure of display subroutines. π§
The plan is an experimental version on the ARC, BBN, and PARC systems, tested with several apps (NLS included) and on at least an IMLAC, ARDS, and an E&S LDS. π
Environment
So the setup is a "virtual display" sitting at the far end of a wire (an ARPANET connection) from a "host" running some display app. π¦
They're calling the person sitting at the display the "user", and the app program the "server". π
A big thing they want to stress: inside one app, a single terminal should work as both an "interactive graphics" terminal AND an "interactive control" terminal. π So the graphics protocol needs to handle teletype-like operations too. π
Now, the reason people wanted two sets of connections for graphics programs over the Net (as far as they understand it) is about handling berserk programs and recovering gracefully from them, plus maybe getting more bandwidth through the net. π
They totally get that, but they also think you should be able to run graphics programs on just one set of telnet connections. β¨ And even while a graphics program is running, you still have to expect "unescorted" characters (ones not wrapped in a command or response message) to show up on your terminal. π
So the proposal is to implement the graphics protocol inside telnet, using 8-bit BEGIN-GRAPHICS-COMMAND and END-GRAPHICS-COMMAND characters, or the 8-bit transparent mode of the new telnet. π«Ά That means you can run graphics programs on one, two, or more sets of telnet connections. πΈ
They also strongly suggest that any site supporting display terminals for network graphics should set up local control over the display, like IGNORE-GRAPHICS-COMMANDS and RESET-TO-TTY-MODE commands from the user to the using host. π Skipping this could literally lead to burned out tubes! π
Basic concepts
The model is an app program messing with a (remote) display file. π¦ That file might be "segmented" or "structured", and if it's either, you can change it without touching the display itself. β¨
For structured display files, an "update display" command makes the display file get mapped onto the display however suits that display. π
Part of the protocol is about commands sent to the (remote) display file editor. π That editor creates and changes the display file on the user's host. π§
The model
Structured Display Files
A structured display file is made of named subpictures, and each one can hold any number of named units. π There are two kinds of units, primitive units and call units. π₯ A unit's effect doesn't depend on its name or on when it got created inside its subpicture. β¨
Primitive units hold drawing instructions and their coordinates, which can make visible stuff show up on the screen. π Drawing instructions and coordinates can only live in primitive units. π
Call units give the display structure a subroutine ability. π A call unit invokes the display of another subpicture, so one subpicture can contain instances of other subpictures. π«Ά Besides subroutine-style control transfer, call units can set display parameters and keep parameter transparency. π¦ For example, a call unit can call a subpicture with a translation and a relative intensity setting. π When it returns from that subpicture, those parameters go back to their original values. β¨
A subpicture is an ordered list of units, and they can be any mix of primitive and call units. πΈ Each subpicture starts with a header and ends with the subpicture end unit. π§ The subpicture end unit is a single unique unit in a display structure, and it's linked to the end of each subpicture. π
To picture how control moves through a structure, think of display elements like this: subpictures are subroutines, and units are linked blocks of in-line code. π Once every unit in a subpicture has run, the subpicture end unit sends control back to wherever the subpicture was called from. π₯ A primitive unit holds display code and transfers to the next unit. π A call unit holds a subroutine call to a subpicture, and it transfers to the next unit in line. β
Segmented Display Files
A segmented display file is made of named segments, and each one can hold any number of primitive units. π The only things you can do to a segmented display file are add new segments, delete old ones, or replace old ones. The display gets updated automatically. π«Ά A unit's effect still doesn't depend on its name or creation order within the subpicture. π
Hosts
A given terminal might be partly controlled by several different hosts at once, so everything said about names, coordinates, display files, and so on should be read as relative to each individual host. π
That means each host thinks it has its own display file, naming, and coordinate space, plus a set of state parameters that only it controls. π¦ The only sign that resources are shared is that the terminal might look like different sizes at different times. π§
(Honestly, they feel like it should be processes within hosts, not hosts themselves, that get these properties. π But they don't think it's feasible to build a process identification scheme that every host will accept. π)
Subpictures
A subpicture has a name and zero or more units. πΈ
Subpicture names are arbitrary, globally unique, fixed-length identifiers, and the host picks them. β¨ Each unit (displayable component) has a name, and that name is local to its subpicture. π
A unit can be a "primitive unit", like a string or a vector, or a "call unit", which means displaying a (possibly transformed) copy of another subpicture. π
The display data gets organized into a re-entrant tree (acyclic graph) by the call units. π₯
A unit can be "visible" or "invisible". π
A particular instance of a subpicture (the result of a call unit) shows up on the screen precisely if it and every subpicture on the logical path from the root of the tree to it are "visible". π
Primitive units
Strings
A string is a horizontal line of characters with its own mode and an X,Y origin relative to the subpicture's origin. π
Note: intensity is always relative. β¨
Font and mode info (like blinking) logically comes along with each character. π¦ That's handled with embedded mode and font specification characters, plus a "restore original string mode and font" character. π«Ά
Note: Mode modifiers are non-displayable characters, so they don't take up character positions on the screen. π
Figuring out how much screen space a string takes up depends on the font(s) being used. π That's a separate question, and they'll deal with it later. π§
TTY units
A tty unit is a rectangle made of a bunch of lines. πΈ Inside this unit, the display acts like an alpha-numeric display, for example:
- Characters that would write past the right-hand margin of the rectangle cause an automatic line folding to happen. π
- The ascii control characters CarriageReturn, LineFeed, FormFeed, and BackSpaceCharacter, (HorizontalTab and VerticalTab?), get interpreted appropriately. π
- Other control characters get displayed in a terminal-specific way, like ^F, <^F>, etc. π
- Displaying characters in the range 200-377 is left unspecified for now (truncated to 7 bits?, alternate fonts?, alternate modes?). π€
They hope they can agree on a standard for some characters in this range, so things like Greek letters, common math symbols, super-scripting, and sub-scripting are possible. π₯
- Line folding that would write characters below the rectangle (whether it happens automatically or from a LineFeed character, etc.) makes the text inside the unit scroll upwards one line (a storage tube might do it differently). β¨
Characters show up in a teletype unit in one of two ways:
- Unescorted characters (characters sent to the terminal that aren't part of any command) get appended to the appropriate tty-units (see below --- USE-TTY-UNITS, TTY). π
- By using the APPEND-STRING-TO-UNITS command for structured display files. π«Ά
The first character sent to a tty-unit shows up as the first character (at the left margin) of the top line. π They say this is necessary for a few reasons, and the most convincing one is how storage tubes and most real alpha-numeric displays behave. π¦
Successive characters appear one after another on the top line until there's an explicit break (like a linefeed) or an implicit one (line overflow). π§ When a line break happens, the next character appears on the second line from the top of the unit. πΈ
This keeps going until the bottom line of the tty-unit is reached. π At that point, a line break makes the lines inside the unit scroll up one line. π
Note: storage scopes may use a different technique for scrolling. π§
Dots
okay so a dot unit starts at an initial X0,Y0 π and then has a whole series of points X,Y that describe a bunch of dots π«§
each dot unit logically carries mode info too, like blinking, relative intensity, etc. β¨
Lines
a line unit starts at an origin X0,Y0 and then a series of points X,Y that describe straight lines connected tail-to-head ποΈ (so it's a polygon, bestie πΊ)
each line unit logically carries mode info like blinking, dotted vs. solid, or invisible π»
other kinds of lines, such as conic sections, may belong in the primitive set π
Special points
this primitive unit is a series of points that will get displayed joined by lines in the best available manner π
the intent is to use Flegal's algorithms to produce a smooth curve π«Ά smooth curves are literally my love language
Device-specific
this primitive unit is any number of device-specific commands π§ the device type can be found through an interrogation command π
Call units
okay so in addition to the name of the referenced subpicture, a call unit can include these transformations π
- Master/instance rectangle: specifies a rectangle in the caller's space where a specified rectangle of the callee's space gets imaged. this gives you independent scaling in each coordinate, plus translation and clipping πͺ
- Rotation: it may be desirable to combine this with scaling using the familiar idea of homogeneous transformation π
- Intensity and color control: in principle, a call could specify intensity increments (positive or negative) for each color π¨
it's assumed that best effort will be used in scaling and rotation of text π« we recommend replacing it with a line when all else fails π
Initial state
after the initial telnet connection is established, the first graphics command the applications program issues should be a request for either a structured display file or a segmented display file π
the response to this request should tell whether or not the requested display file was allocated, plus other params about the virtual display, like screen size, character sizes, whether or not color is available, etc. π₯οΈ
before the display file is allocated, the terminal should look like, and simulate to the best of its ability, a Network Virtual Terminal (NVT) π¦
any graphic commands issued before the display file is allocated will be ignored π
after requesting commands and receiving a structured display file, this structure will exist:
- there will exist a subpicture called the ICP SUBPICTURE, whose rectangular extent matches the extent of the virtual display allocated to this host πΌοΈ
- there will exist a tty-unit called the ICP TTY-UNIT in the ICP SUBPICTURE, where its rectangular extent matches the extent of the virtual display allocated to this host πΊ
- this tty-unit will consist of n lines, where n is terminal dependent and available through a query command π’
- this tty-unit will be instituted for the display of unescorted characters π¬
- there will be an implicit call on the ICP SUBPICTURE in effect π«₯
- this call is not accessible to the applications program π
- the applications program causes the display of information by:
- creating primitive units in the ICP SUBPICTURE
- creating call units, to created subpictures, in the ICP SUBPICTURE
- using the TTY command to make the ICP TTY-UNIT visible/invisible (or change its location or size) π
- there will exist a tty-unit called the ICP TTY-UNIT in the ICP SUBPICTURE, where its rectangular extent matches the extent of the virtual display allocated to this host πΊ
after requesting and receiving a segmented display file, this structure will exist:
- there will exist a segment called the ICP SEGMENT π§©
- there will exist a tty-unit called the ICP TTY-UNIT in the ICP SEGMENT, whose rectangular extent matches the extent of the virtual display allocated to this host πΊ
- this tty-unit will consist of n lines, where n is terminal dependent and available through a query command π’
- this tty-unit will be instituted for the display of unescorted characters π¬
- the applications program causes the display of information by:
- creating primitive units in the ICP SEGMENT
- creating new segments
- using the TTY command to make the ICP TTY-UNIT visible/invisible (or to relocate it or change its size) π
- there will exist a tty-unit called the ICP TTY-UNIT in the ICP SEGMENT, whose rectangular extent matches the extent of the virtual display allocated to this host πΊ
Display editing primitives
General editing primitives
REQUEST-DISPLAY-FILE (file-type)
REQUEST-DISPLAY-FILE (file-type)
file-type is either structured or segmented π―
this command requires a response π¨
Segmented display file editing
SEGMENT (Segment)
SEGMENT (Segment)
if the segment Segment already exists, then it gets cleared π§Ή if it did not exist, then it gets created β¨
pictures are displayed within segments by using the primitive unit command listed below ποΈ
DELETE-SEGMENT(Segment)
DELETE-SEGMENT(Segment)
if the segment exists, then it gets deleted ποΈ bye bye π
Primitive Units
all unit operations cause immediate display on the screen β‘
STRING-UNIT(Segment,Mode,X-Origin,Y-Origin,Text)
STRING-UNIT(Segment,Mode,X-Origin,Y-Origin,Text)
writes the specified string unit βοΈ
Mode refers to relative intensity, blinking, reverse video, color, etc. π
Errors: Segment does not exist.
LINE-UNIT(Segment,Type,Mode,X0,Y0,X1,Y1, ..., Xn,Yn)
LINE-UNIT(Segment,Type,Mode,X0,Y0,X1,Y1, ..., Xn,Yn)
draws the specified line segments π
Type refers to solid, dashed, dotted, etc. γ°οΈ
Errors: Segment does not exist; illegal mode.
DOT-UNIT(Segment,Mode,X0,Y0,X1,Y1, ..., Xn,Yn)
DOT-UNIT(Segment,Mode,X0,Y0,X1,Y1, ..., Xn,Yn)
draws the specified dots π«§
Errors: Segment does not exist; illegal mode.
SPECIAL-POINTS-UNIT(Segment,Mode,X1,Y1, ..., Xn,Yn)
SPECIAL-POINTS-UNIT(Segment,Mode,X1,Y1, ..., Xn,Yn)
draws the special-points curve π
the terminal should attempt to connect the specified points in the nicest way possible (e.g. Flegal's spline curve algorithm, straight line segments) π
Errors: Segment does not exist; illegal mode.
TTY-UNIT(Segment,Mode,Rectangle,Lines)
TTY-UNIT(Segment,Mode,Rectangle,Lines)
creates a unit that will behave as a tty-simulation area, with "lines" lines distributed within the specified rectangle π
unescorted characters will be echoed in this unit, in addition to any other units they are being sent to π
Errors: Segment does not exist.
DEVICE-SPECIFIC-UNIT(Segment,device commands)
DEVICE-SPECIFIC-UNIT(Segment,device commands)
creates a unit of device-specific commands π§
TTY(parameters)
TTY(parameters)
parameters are: position rectangle, visible/invisible, number of lines, mode of characters ποΈ
this refers to the ICP TTY simulation πΊ
RESET()
RESET()
deletes all segments except the ICP SEGMENT, and all units of the ICP SEGMENT except the ICP TTY-UNIT π§Ό
resets all nodes to their initial state (i.e., the state that existed immediately after a REQUEST-DISPLAY-FILE command) ππ
Structured display file editing π
okay bestie, this is where the display file gets to do its thing π
SUBPICTURE(Subpicture, rectangle)
This makes a brand new subpicture called "Subpicture" π§. "rectangle" gives the coordinates of a diagonal of the subpicture's virtual screen, which is its coordinate system β¨
If a subpicture called "Subpicture" already exists, it gets cleared and the new coordinate rectangle takes precedence π
DELETE-SUBPICTURE(Subpicture)
This deletes the subpicture named "Subpicture". Call units that refer to Subpicture get deleted too, so no dangling references π
CLEAR-SUBPICTURE(Subpicture)
This deletes all the units inside Subpicture, but the subpicture itself sticks around π«§
Primitive Units
okay so all the commands for creating units don't care whether the unit already exists. they act as "replace" as well as "create" π
STRING-UNIT(Subpicture,Unit,Target-Key,Mode,X-Origin,Y-origin,Text)
This replaces the unit with a string unit π
Mode tells you how the characters look (blinking, underlined, etc.) β¨
Target-Key gets used together with the TARGET-SENSITIVE command and target input. it can also be sent with the SET-TARGET-KEY command π―
Errors: Subpicture does not exist; X-Origin or Y-Origin is outside the subpicture's virtual coordinate system π
we explicitly do not require an error if the string runs past the right-hand edge of the subpicture. however, the results are not defined in that case π«
LINE-UNIT(Subpicture,Unit,Target-Key,Type,Mode,X0,Y0,X1,Y1,
...,Xn,Yn)
This replaces the unit with a line unit π
Errors: Subpicture does not exist, illegal mode, and some X or Y is outside the subpicture π«
DOT-UNIT(Subpicture,Unit,Target-Key,Type,Mode,X0,Y0,X1,Y1,...,Xn,Yn)
This replaces the unit with a dot unit β
Errors: Subpicture does not exist; illegal mode; some X or Y is outside the subpicture π
SPECIAL-POINTS-UNIT(Subpicture,Unit,Target-Key,Type,Mode,X1,Y1,...,Xn,Yn)
This replaces the unit with a special-points unit π
Errors: Subpicture does not exist; illegal mode; some X or Y is outside the subpicture π
CALL-UNIT(Subpicture,Unit,Target-Key,Called-Subpicture,Parameters)
This replaces the unit with a call unit π
Its parameters are:
- Master-Instance rectangles
- rotation
- mode
Errors: Subpicture does not exist; Called-Subpicture does not exist; parameter errors π
TTY-UNIT(Subpicture, unit, mode, rectangle, lines)
This creates a unit that acts like a tty-simulation area, with "lines" lines spread out inside the given rectangle π₯οΈ
Errors: Subpicture does not exist π
DEVICE-SPECIFIC-UNIT(Subpicture, Unit, Target-Key, device, commands)
This creates a unit made of device-specific commands π§. The commands should leave alone any global modes, like the standout mode (see below), or at least put them back the way they were π«Ά
APPEND-STRING-TO-UNIT(Subpicture, Unit, Text)
This appends the text to the specified commands. it only makes sense when the unit is a string or tty unit π
Errors: Subpicture does not exist; unit does not exist; not a string or tty unit π
DELETE-UNIT(Subpicture, Unit)
This deletes a unit ποΈ
VISIBLE-UNIT(Subpicture, Unit, Flag)
This makes the Unit visible or invisible, depending on Flag π. If a target sensitive unit gets made invisible, it stops being target sensitive. but if there's no later target sensitive command changing things, it becomes target sensitive again once it's made visible π¦
Errors: Subpicture does not exist; unit does not exist π
SET-TARGET-KEY(Subpicture, Unit, Target-Key)
This sets the target key for the specified unit to the specified value π
SET-STANDOUT-MODE(mode)
This sets the mode used to make text and/or units stand out, like blinking, underlining, etc. β¨
If the terminal doesn't support the specified mode, the terminal should make a best effort or use some other method to make things stand out π
STANDOUT-UNIT(Subpicture, unit, yesno)
This makes the specified unit stand out (using the mode from SET-STANDOUT-MODE) or stops it from standing out, depending on "yesno" π¦. If the unit is a call-unit, then the instance of the subpicture that comes out of the call (all the way down to the terminal nodes) is the thing that stands out π
STANDOUT-TEXT(Subpicture, unit, begin-char-count, end-char-count, yesno)
Unit has to refer to a string unit π
This makes the specified text stand out (using the mode from SET-STANDOUT-MODE) or not, depending on "yesno" ποΈ
UPDATE-STRUCTURED-DISPLAY()
This makes any changes to the display file since the last update (or since ICP) show up on the screen πΈ
TTY(parameters)
parameters are:
- position rectangle
- visible/invisible
- number of lines
- mode of characters
This refers to the ICP TTY simulation π₯οΈ
USE-TTY-UNITS(Subpicture1, unit1, ..., Subpicturen, unitn)
Unescorted characters only get appended to the specified tty units π¬
Errors: Subpicture, unit does not exist π¬
RESET(How)
Case How Of
= Permanent
Immediately resets the terminal to its initial ICP state
= Temporary
Immediately resets the terminal to its initial ICP state
without destroying the previous state.
= Restore state saved from last RESET(Temporary).
Direct Feedback
okay so, with network speeds the way they are, it's honestly so desirable to let the using host give the user direct feedback without waiting on the application program in the serving host π. telnet already does this with local echoing, and we want to bring that same energy to graphics π¨
the ideas are:
- "dragging", which attaches a subpicture's origin to the cursor's position π§²
- "tracking", which follows the movement of the mouse, stylus, or light pen with a distinctive mark on the screen π
- "inking", which plots the trail of the cursor on the screen βοΈ
- "rubber banding", which is a straight line attached to a fixed point on one end and the cursor location on the other πͺ’
these should be seen as allowable extensions of the protocol, not requirements π. there should, however, be commands in the protocol for finding out whether they exist and for controlling them ποΈ
Data input primitives
Input Control
TARGET-SENSATIVE(key1, ..., keyn)
This arms the units that have the specified keys for target selection π―
SET-INPUT-MODE(Device, parameters)
This selects the mode a logical device uses to produce input, and under what conditions πΉοΈ
the logical devices are specified below, along with their possible input formats and conditions π
Errors: no such device β
Keyboard input
the keyboard has only one input mode. it sends a character whenever a key is struck β¨οΈ honestly the simplest, most iconic energy π
Binary devices
unless otherwise specified, binary devices act as an extension of the keyboard. they produce 8-bit characters that the serving host can't tell apart from keyboard characters π«’
the algorithm for turning binary devices into characters isn't specified, but something like the NLS accumulation algorithm for mouse-keyset chords is intended π§©
binary devices may also input binary data (according to their up/down states), which gets transmitted on state changes π. examples of this kind of device are function keys, overlay cards, mouse and keyset (used on their own or together), pen-up/pen-down, light pen buttons, and so on π±οΈ
Coordinate input
coordinates may be sent according to any subset of these criteria π:
- with every character in some designated set (e.g. control characters, or all characters)
- with every binary device state change input
- after some time interval has elapsed
- after a position change P > (y1-y0) ^2+(x1-x0)^2, etc.
coordinates may be sent in "X-Y" format, "target" format, or both π«Ά
X-Y format is just the location of the cursor relative to the screen region assigned to the host π
target format is the "call stack" (the logical path from the root unit, which is the ICP SUBPICTURE, to the closest unit) plus the target-key of that unit, plus the count of the closest character within the string, or the closest line segment or dot or special point if that's appropriate π§
target input is unavailable for segmented display files. π«
if target sensitive units overlap, it isn't specified which of the selected units gets returned as the hit unit. π€·
Time input
hosts may want to treat two events happening close enough together as simultaneous, or to keep detailed interaction statistics β±οΈ. so it must be possible to request time information to be sent along with some reasonable subset of the other input types β°
Interrogations
it must be possible for the serving host to discover its environment (e.g. screen size, available devices) and to read back state information (display file) π
this is super desirable for debugging, and also for redirecting a displayed image to another device, like a plotter π¨οΈ
Environment πΈ
terminal parameters include screen size and resolution, available input devices, terminal type (for device-specific control), and the number of lines in the ICP TTY-UNIT π₯οΈ
character parameters include available character sizes, special (non-ASCII) characters, font characteristics, and sub- and super-scripting facilities π€
State π«§
the display file, or components of the display file π
Cursor Position
it should be possible for the application program to read the cursor position at any time π―
Display File Support
it should be possible to find out whether this user process supports only segmented display files, only structured ones, or both π§©
Command support
it should be possible to get a matrix from the user process showing which commands are implemented πΊοΈ. this is a must-have if you want to find out which direct feedback features are supported, and it might be nice for things like a text-only or graphics-only subset of the protocol π
Encoding Principles β¨
Okay bestie, here's how commands get packed up π. Every command has this shape:
BGC OPCODE DATA EGC
- BGC (Begin Graphics Command) puts the telnet connection into a "read graphics command" mode π«Ά
OPCODE DATAis the actual graphics command plus its data π¦- EGC (End Graphics Command) puts the telnet connection back to its normal state π
Note: This may all have to be bracketed by telnet Begin-8-bit-transparent-mode and End-8-bit-transparent-mode commands. π
Numbers in general get 7 bits of significance in each byte π’. If the high-order bit of a byte is on, the significant bits from the next byte get concatenated onto the low-order end of the bits collected so far, and so on. It's giving chain reaction βοΈβ¨
Subpicture names are 14-bit numbers, assigned by the serving host πΈ. Unit names are 14-bit numbers too, also assigned by the serving host π§.
Strings are 8-bit characters, with an escape convention to represent changes of font and mode π.
Since the channel is 8 bits wide, there's room for way more than 128 displayable characters π. However, the interpretation of codes 200B and above is not standardized! π
Coordinates should be as described in RFC 493 πΊοΈ.
Rectangles are specified by the coordinates of the endpoints of one of the diagonals π.
Encoding π¦
The actual encoding of this protocol is forthcoming π₯Ί. We expect some changes to come about because of the upcoming Network Graphics Group Meeting, so we postponed the actual encoding until after that meeting. Main character patience energy π.
[This RFC was put into machine readable form for entry]
[into the online RFC archives by Via Genie, 12/1999]
π¦ where this page comes from
- ietf: rfc553 1973-07
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms