Return-Path: <ME@SU-AI.ARPA>
Received: from SU-AI.ARPA by Xerox.ARPA ; 18 MAR 85 17:13:58 PST
Date: 18 Mar 85 17:13 PST
From: Martin Frost <ME@SU-AI.ARPA>
Subject: SAIL terminal emulation
To: Spreitzer.pa
Len forwarded to me your inquiry about emulating a SAIL terminal.
First, the DM 2500 is a reasonable terminal to emulate, although you
actually might want to use SAIL's DMWAITS service (for DM3025s modified
specially for use with SAIL's WAITS operating system), which you could
easily emulate. The list of Datamedia display features that we use is
given in the UUO Manual, available online at SAIL via READ UUO. I've
included the relevant section later in this message.
Secondly, to get all 9 bits of input from the user's keyboard through to
WAITS, there are a couple of possibilities, namely: (1) EDIT-key mode
(so-called because some keyboards have a key labelled EDIT that controls
the 8th bit, that is, the parity bit) and (2) no-EDIT-key mode.
EDIT-key mode is the simpler scheme but it requires the link to WAITS to
pass all 8 bits of data per byte. Telnet should be capable of doing
that (but you'll have to experiment to see if it really is). In this
scheme, the 8th bit (formerly the parity bit) becomes the WAITS CONTROL
bit, and to turn on the META bit in a character (the 9th bit), you
simply prefix that character with an octal 200 character (known as the
"add-META" character). Thus, to get CONTROL-META-A, you would send two
bytes, namely, a 200 and then a 301 (both octal). If you use the
DMWAITS display type on SAIL, then certain special character
combinations give you the various special terminal facilities, such as:
hold typeout, unhold typeout, clear line editor, etc. A few special
characters, namely, or-sign, beta, and equivalence sign, are used for
some of the special functions, and to get the text meanings of these
characters you have to prefix them with the quoting character, NULL,
which also doubles as the WAITS ESCAPE character (not to be confused
with the ASCII escape character). I can give you details on these
things as necessary.
The alternative input form for getting 9 bits in is to use only 7-bit
bytes (no-EDIT-key mode), thus ensuring that you can get through the
computers in the way (maybe). However, in this scheme, a lot of special
mapping needs to be done (either by your program, or by the user, but
since you have a couple of "bucky-bit" keys (shift type keys) for the
8th and 9th bits, it's certainly desireable to make them as compatible
to SAIL's CONTROL and META keys as possible). In this mode, most of the
ASCII control characters are used specially, including four characters
that mean add "zero, one, the other, or both" of CONTROL and META to the
next character. So you would do a bunch of translating, although it's
not terribly messy.
Excerpt from the UUO Manual, section 13.4: Datamedia Display Output
OCTAL CHAR ^CHAR EFFECT ON A DATAMEDIA
000 NULL ^@ no-op.
001 ^A no-op.
002 ^B home. Moves cursor to upper-left corner.
003 ^C no-op.
004 ^D no-op.
005 ^E no-op.
006 ^F no-op.
007 ^G bell. Beeps the DM's audio tone.
010 ^H back cursor. Moves left one column unless at left margin.
011 TAB ^I tab. Moves to next tab stop. Normally need not be quoted.
012 LF ^J linefeed. Moves down a line, or to top line from bottom.
013 VT ^K tab clear. Clears any tab stop at current column.
014 FF ^L set cursor position from next two bytes. See ** below.
015 CR ^M carriage return. Moves to left margin and down a line.
016 ^N blink on. Subsequent characters will be blinking. See * below.
017 ^O protected field on. Subsequent characters will be bold. See *.
020 ^P insert/delete on. Enters insert/delete mode. See ***.
021 ^Q transmit page to computer. This character never sent to DM.
022 ^R transmit page to printer. This character never sent to DM.
023 ^S transmit line to computer. This character never sent to DM.
024 ^T no-op.
025 ^U no-op.
026 ^V no-op.
027 ^W erase from cursor to end of line.
030 — ^X cancel. Turns off blink, protected field, ID, & roll modes.
031 ^Y set tab. Sets a tab stop at current column.
032 ~ ^Z up cursor. Move up a line unless on top line.
033 ^[ no-op.
034 ^\ forward cursor. Moves right a column, to next line from end.
035 ^] roll on. Turns on roll mode. See **** below.
036 ^^ master clear. Clears screen, tabs, and all modes but roll.
037 ^← erase screen. Clears unprotected text, all modes but roll.
* Stanford DM terminals have a hardward modification that interchanges the
effect of the blink-on and protected-field-on characters and that disables
the protectedness of characters sent with protected-field mode on. Thus,
with this mod, BLINK-ON will cause subsequent characters to appear as
bold, and PROTECTED-FIELD-ON will cause subsequent characters to appear as
blinking and not be protected. Furthermore, blinking protected-field
characters that are moved by ID operations will stop blinking.
** The FF character is used to move the cursor to an arbitrary X-Y
position on the screen. The position is determined by the next two bytes
after the FF. The first of these two bytes sets the X-position and the
second the Y-position. The actual X- or Y-position set by a byte is
determined from the octal value of the byte XORed with 140 and counting
lines from 0 to =23 and columns from 0 to =79. X- and Y-position
characters that are out of range of the screen will select a position of
0. If the X- or Y-position character is one of the characters: home (^B),
FF (^L), transmit page (^Q or ^R), cancel (^X), master clear (^^), or
erase screen (^←), then the cursor positioning command is aborted and the
aborting command is executed instead.
*** In Insert/Delete (ID) mode, the following four control characters have
these special effects rather than those listed above. Other control
characters have undefined effects in ID mode.
OCTAL CHAR ^CHAR EFFECT IN ID MODE (CURSOR STAYS PUT)
010 ^H delete character. Characters to the right shift left one space.
012 LF ^J add row. A blank line is inserted, lines below move down.
032 ~ ^Z delete row. Lines below move up one line.
034 ^\ add character. Space is inserted, chars to the right move right.
**** In roll mode, a CR or LF sent while on the last line of the display
will cause the insertion of a blank line at the bottom of the screen to
force the whole screen text to scroll up one line. The cursor is left at
the bottom instead of moving to the top line as it would if roll mode were
off. Note that roll mode can only be cleared by the cancel character, ^X.