Output -- Display Protocol (%TD Codes)
Display output is somewhat simpler. Codes less than 200 octal are printing characters and are displayed on the terminal (see the section describing the "Stanford/ITS character set"). Codes greater than or equal to 200 (octal) are known as "%TD codes", so called since their names begin with %TD. The %TD codes that are relevant to SUPDUP operation are listed here. Any other code received should be ignored, although a bug report might be sent to the server's maintainers. Note that the normal ASCII formatting characters (011 - 015) do NOT have their formatting sense under SUPDUP and should not occur at all unless the Stanford/ITS extended ASCII character set is in use (ie, %TOSAI is set in the TTYOPT word).
For cursor positioning operations, the top left corner is (0,0), ie, vertical position 0, 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.
%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.
%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.