Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

10.0; emt (emulate_terminal), revision 1.0, 87/05/05
emt (emulate_terminal) - emulate a dumb terminal.
usage: emt  [emt_command_file]



DESCRIPTION
     emt allows your node to emulate an ASCII terminal connected to another
     computer.  This asynchronous connection exists through a stream opened on
     one of the node's SIO lines.  emt also permits ASCII file transfer
     between your node and the remote host.

     pathname (optional)
                    Specify file containing emt commands.

                    Default if omitted:  read commands from standard input

     emt begins execution in local mode, and displays the following prompt:

     emt>

     To enter remote mode, press F1. (The emt command dl no longer exists.)
     In remote mode, your terminal operates as if it were physically connected
     to the remote computer ("host"). You can log on and enter remote host
     commands.

     To return to local mode, press F1 again.

INPUT/OUTPUT STREAMS
     emt uses the four standard streams: standard input, standard output,
     error input, and error output, as follows:

     ⊕  emt commands are read from an emt command file or from standard input.
        The command filename may be specified on the command line or using the
        emt run command.   Up to four levels of command files may be nested.
        When EOF is reached in a command file, commands are read from the
        previous file or from standard input.  If EOF is reached on standard
        input, emt exits.

     ⊕  Keystrokes to be sent to the  host  computer  are  read  from standard
        input only.

     ⊕  The emt command responses and all messages from the host are written
        to standard output.

     ⊕  Error messages from Aegis system calls are written to error output.
        Optional monitoring (monit) may also be written to error output (or to
        a named file).

     You may use redirection of standard input, command-line specification of
     a command file or the emt run command to automate emt usage and use emt
     in shell scripts.  emt behaves slightly differently with regard to host
     transmissions, depending on which of these techniques you use and you may
     select the method that best suits your purpose.

     When input is redirected to standard input ('emt <emtfile1'), lines in
     the command file that are sandwiched between F1 commands (enter/exit
     remote mode) are transmitted to the host.  Other lines outside F1
     commands are interpreted and executed as emt commands.

     Contents of emtfile1:

     Command        Description

     interm lf      Sets input terminator.
     outterm lf     Sets output terminator.
     list           Lists emt state settings.
     F1             Invokes remote mode (communication
                    to host).
     hello host     This and succeeding lines get sent
                    to host.
     goodbye host   Last line sent to host.
     ~1i            emtesc char, specifies 'F1', return
                    to local mode.
     list           Back in local mode, lists emt state
                    settings.
     q              Exit from emt.

     When a command file is invoked either via the command line (emt emtfile2)
     or by using the run command (run emtfile2), the behavior is different in
     that lines following F1 commands are not transmitted to the host. This is
     because host transmissions are read from standard input and standard
     input has not been redirected to the file:

     Contents of emtfile2:

     Command      Description

     interm lf    Sets input terminator.
     outterm lf   Sets output terminator.
     list         Lists emt state settings.
     F1           Invokes remote mode (communication
                  to host). All host input is now
                  taken from the keyboard (or from
                  standard input if it has been
                  otherwise redirected).  Finally
                  user types ~1 or presses F1 to
                  return to local mode.
     list         Local mode, emt commands read from
                  emtfile2 again.
     q            Exit from emt.

     You may also use the xmit command to transmit a file (of commands or
     data) to the host.  Use  the emt rcv command to receive host
     transmissions to a Domain file.

TRANSFERRING FILES
     You can transfer files using emt's receive (rcv) or transmit (xmit)
     commands.  xmit sends a Domain file to the remote host.  rcv opens a
     Domain file to receive information from the remote host.  For example, if
     you type (in local mode)

     emt> xmit fileA


     emt displays the following message:

          Ready to transmit file fileA

     Next, press F1.  emt enters remote mode, and transmits fileA to the
     remote host.

     If you type:

     emt> rcv fileB

     emt displays this message:

     Ready to receive file fileB.

     Next, enter remote mode by pressing F1.  Use a remote host command to
     display the information that you want fileB to receive.  emt
     automatically writes this and all subsequent host transmissions into
     fileB.  To stop the rcv, press F2.


TRANSMISSION CONVENTIONS
     Use the emt command interm to specify the line terminator used by the
     host.  If you do not know what the host uses as a line terminator,
     experiment by changing interm.  Use the emt command outterm to specify
     the line terminator to be transmitted to the host.

     emt allows you to open only one Domain file at a time.  If emt receives a
     xmit or rcv  command while another Domain file is active, it closes the
     open Domain file, and executes the new command.

     During remote mode, emt waits on both the keyboard and SIO line for
     characters to process, and monitors the data for characters of special
     interest to emt.

     You can specify which keyboard characters emt should interpret by placing
     the keyboard in raw or cooked mode.  In raw mode, emt passes all keyboard
     input (except the function keys, keys L1 through L12, and keys R1 through
     R4), directly to the host.  Cooked mode lets you use many of the Display
     Manager's features for editing the input pad. emt places your keyboard in
     cooked mode by default.

COMMANDS
     The following commands are available while running emt:

     For details about the commands available once emt has been invoked, type
     help emt commands

     Command   Description

     F1        Switch between local and remote modes.

     F2        Interrupt a file transfer and close the file.

     F3        Turn tee on or off. tee on causes emt to display file
               transmission records on the screen.  You can use this feature
               to monitor file transfers, and decide if and when you should
               stop or interrupt a transfer.  The default is tee on.

     F8        Send a break to the host.

     CTRL/F7   Display function key definitions.


     These function keys may be simulated by typing the emt ESC character
     followed by the function key number (that is, ~1 for F1).


     Command   Description

     ae        Abort on error.

     asconly | notasconly
               Sift out most non-printing ASCII codes. Eliminates triangles,
               allows BS, CR, ESC, FF, LF, TAB.  The default is notasc.

     break [n] Set the break duration value to n milliseconds. The default is
               200. If set to 0, the F8 (break) key does nothing.

     close     Deactivate an rcv file. See the rcv command for related
               information.

     code [ xx | none ]
               Set the host-command-code to the hexadecimal number xx. The
               default is none.

     cooked    Place the keyboard in cooked mode.  This enables many DM
               features for editing the input pad, and provides an escape
               sequence for sending control characters to the remote host.  To
               send the host a CTRL character, precede the character with a
               tilde (~). The sequence ~_ transmits a delete character.  To
               send the host a single tilde character, type ~~.  The emt
               default is cooked mode.  Cooked mode always echos keystrokes,
               so it does not require a full duplex connection to the host.
               (See the raw command for related information.)

               Note: The cooked and raw commands refer only to the transcript
               pad and keyboard input.  The SIO line itself is always in raw
               mode.

     emtesc [chr|none]
               Set the emt escape character to chr.  Use none to disable the
               escape character.  Default is ~ for "cooked" mode, none for
               "raw" mode.

     The following three commands are useful when standard input is redirected
     to a file of emt commands:

     f1        Enter remote mode  (Simulate function key F1).

     f2        Terminate file transfer (Simulate function key f2).

     f3        Toggle tee mode    (Simulate function key F3).

     hangup    Cause modem to break connection with the remote host.

     help [tctl]
               Display information about emt commands or about tctl commands.

     line {1|2|3|pathname}
               Select the SIO line. Pathname must specify an SIO device
               descriptor (for example, /dev/sio2).  The default SIO line is 1
               (/dev/sio1).

     l         Display the current SIO line, all emt switch settings and the
               receive filename, if any.

     monit [pathname]
               Write every character received  over the  SIO  line to
               pathname.   If  a filename is  not  specified, the previous
               specification or error output is used.

     nomonit   Stop monitoring.

     quit      End the emt session.

     raw [-echo|-noecho] [-lf|-nolf]
               Place the keyboard in "raw" mode.  This sends keyboard input
               directly to the remote host, interpreting only function keys.
               The -echo option echos keystrokes on standard output; you
               should use it when the host is in half-duplex mode.  The
               default is -noecho.  The -lf option converts carriage return
               (CR) to line feed (LF) for lines echoed.  The default is -nolf.
               (See the cooked command for related information.)  Note: The
               -echo and -lf options are purely local functions that enable
               you to read what you type.  They do not in any way change
               host/node transmissions.

     rcv [-r] [-keys|-nokeys] [pathname]
               Prepare the Domain file specified to receive remote host
               transmissions.  If pathname already exists, emt appends the
               transmission to it, unless you specify -r.  The receive begins
               when you enter remote mode F1.  If you omit the pathname, emt
               uses the previous name, if any. The -keys option writes
               keystrokes to the file along with received data.  The default
               is -nokeys.

               emt allows you to interrupt an rcv command at any time by
               pressing F2.  emt remains in whatever mode it was in, but keeps
               the rcv file active.  When you are ready to continue receiving
               host transmissions, you may type rcv again (in local mode)
               without a filename, and emt uses the same rcv file.

               If you omit filename and no rcv file is active, emt issues an
               error message.  If you specify a new rcv file while another rcv
               file is active, rcv closes the active file, and prepares the
               new file to receive the transmission.

               Use the close command to deactivate an rcv file.

     tctl {tctl commands}
               If you are running under Aegis, pass this command line to the
               shell command tctl to configure the SIO line. If this SIO line
               is not the default line, then you must use the -line command.
               The speed and sync commands have been superseded by this direct
               invocation of tctl. If only UNIX is installed, use stty to
               perform this action.  If both UNIX and Aegis are installed, you
               can use either tctl or stty.

     stty      See tctl.

     interm {cr|lf|crlf|vax|'hex'}
               Select the input line terminator.  The default is crlf.

     outterm {cr|lf|crlf|'hex'}
               Select the output line terminator.  The default is cr.  emt
               transmits the selected hexadecimal value as the terminator for
               each line.

     xmit pathname
               Prepare to transmit the Domain file specified to the remote
               host.  If you omit pathname, or if you specify a file that does
               not exist,  emt issues an error message.  When you issue this
               command, emt remains in local mode.  emt transmits the file
               when you press F1.   When emt completes the transfer, it closes
               the file and returns to the previous mode.  emt does not send
               an end-of-file (EOF) signal to the remote host.  If the host
               requires an EOF, enter remote mode and transmit it manually.

               emt can also receive commands from the host.  If the host
               transmits the sequence

               host-command-code (emt command string) line-terminator

               emt interprets the string as an emt command. Use the emt
               command code to define [host-command-code].

               Line Terminators
                              emt Response

               crlf           Converts sequence to a line feed, ignoring any
                              null characters that may separate the pair.

               cr             Converts sequence to a line feed and ignores
                              LFs.

               lf             Interprets it as a line feed, and ignores CRs.

               vax            Interprets both CR and CR-LF as terminators and
                              converts them to line feed.

               'hex'          Converts the given hexadecimal value to LF.


SEE ALSO
     More information is available.  Type

     help tctl      For details about configuring an SIO line

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026