





                       _T_R_S_-_8_0 _M_o_d_e_l _4_(_p_) _K_E_R_M_I_T_:   _V_e_r_s_i_o_n _5_._2

                          _F_o_r _U_s_e _U_n_d_e_r _T_R_S_D_O_S _6_._1 _o_r _L_a_t_e_r



             _P_r_o_g_r_a_m _b_y:        Gregg Wonderly Oklahoma State University,
                                (gregg@okstate) rewritten from the origi-
                                nal Model-4 KERMIT which was derived from
                                the TRS-80 KERMIT done by Stan Barber,
                                Rice University who modified the CP/M-80
                                version by Bill Catchings and others.

             _L_a_n_g_u_a_g_e:          Z80 Assembler, compatible with M80 and
                                EDAS from Misosys

             _V_e_r_s_i_o_n:           5.2

             _D_a_t_e:              Wed Oct 22 10:17:07 CDT 1986

             _D_o_c_u_m_e_n_t_a_t_i_o_n _b_y:  Gregg Wonderly



             _1.  _S_u_m_m_a_r_y _o_f _T_R_S_D_O_S _6._1


                  _T_R_S_D_O_S (The Radio Shack Disk Operating System) has a
             large library of built in commands dealing with files,
             directory maintenance, device I/O, etc.  Programs are also
             used for some functions on some _T_R_S_D_O_S-based DOS's.  Model
             4(p) KERMIT gives you access to all of the library commands
             of _T_R_S_D_O_S versions 6.x via the LOCAL command.  Issue the
             _L_I_B_R_A_R_Y command at _T_R_S_D_O_S _R_e_a_d_y to obtain a list.

                  _T_R_S_D_O_S file specifications can be represented as a
             sequence of characters of the form

                  FILESPEC/EXT.PASSWORD:D


             _F_I_L_E_S_P_E_C   is the filename up to eight characters.

             _E_X_T        is the file type, up to three characters.

             _P_A_S_S_W_O_R_D   is the password for that file, up to eight char-
                        acters.

             _D          is a numerical drive specification (0-7).

                  File names, file types and passwords may contain
             letters and numbers, but the first character in each must be
             a letter.  No special characters or spaces are allowed.  All
             fields are optional except the filespec.  Any field added









                                        - 2 -


             must be preceded by its special delimiter '/' for file type,
             '.' for passwords and ':' for drive specifications.  Upper
             and lower case characters are equivalent.

             _2.  _T_R_S_D_O_S _C_o_m_m_a_n_d_s _o_f _I_n_t_e_r_e_s_t


             _2._1.  _C_A_T _P_A_R_T_S_P_E_C:_D (_O_T_H_E_R _O_P_T_I_O_N_S)

                  This command is specific to _T_R_S_D_O_S version 6.2 and
                  later.  It displays only the names of visible files on
                  the drive specified, or all drives if no _p_a_r_t_s_p_e_c is
                  given.  (_o_t_h_e_r _o_p_t_i_o_n_s) allows different formats and
                  invisible as well as system files to be selected.  See
                  the _T_R_S_D_O_S manual for specifics

             _2._2.  _D_I_R _P_A_R_T_S_P_E_C:_D (_O_T_H_E_R _O_P_T_I_O_N_S)

                  DIR is common to all version of TRSDOS.  Versions after
                  6.1 replaced the DIR command with CAT, and changed the
                  DIR command so that always produces a long listing.

             _2._3.  _F_R_E_E :_D

                  Gives statistics on disk usage.  If D is present, it
                  indicates a drive number, and only the statistics for
                  the specified disk will be shown.

             _2._4.  _R_E_M_O_V_E/_P_U_R_G_E _F_I_L_E_S_P_E_C (_P_A_R_A_M_E_T_E_R_S)

                  Remove the file(s) given by FILESPEC from the directory
                  and frees the space allocated to the file for reassign-
                  ment.  Purge allows PARTSPECs that specify groups of
                  files.  With no PARAMETERS, PURGE prompts before delet-
                  ing any file.  REMOVE requires a full filespec as the
                  name of the file to remove.  REMOVE allows more than
                  one filespec to be given on the command line.

             _2._5.  _L_I_S_T _F_I_L_E_S_P_E_C (_P_A_R_A_M_E_T_E_R_S)

                  Lists the file on the display.  Parameters are
                  described in the _T_R_S_D_O_S manual in detail.  (_H_E_X) is
                  sometimes useful to display the hexidecimal values of
                  the characters in a file.

             _2._6.  _R_E_N_A_M_E _o_l_d_f_i_l_e _n_e_w_f_i_l_e

                  Changes the name of oldfile to newfile, provided that
                  newfile is a unique file name on that disk.

             _3.  _C_o_p_y_i_n_g _D_i_s_k_s _a_n_d _F_i_l_e_s:












                                        - 3 -


                  _3._1.  _C_O_P_Y _f_i_l_e_1 _f_i_l_e_2

                       Copies file1 and name the copy file2. If file2
                       exists, it will be replaced.

                  _3._2.  _B_A_C_K_U_P :_D :_E

                       Makes a copy of the disk in drive D on the the
                       disk in drive E.

                  _3._3.  _F_O_R_M_A_T :_D

                       Formats the disk in drive D.  The disk will be
                       ready for any normal read or write operation fol-
                       lowing successful completion of this operation.
                       This operation must be performed before use of a
                       blank disk. Reformatting a previously formatted
                       disk will cause all previously stored information
                       to be lost.

             _4.  _T_r_a_n_s_f_e_r_s _w_i_t_h_o_u_t _t_h_e _K_E_R_M_I_T _P_r_o_t_o_c_o_l

                  Model 4(p) KERMIT adds 2 logical devices to the already
             resident devices.  These devices are used to access the com-
             munications port.  These devices, *FI (File Input) and *FO
             (File Output), can be used as the source, and destination of
             a copy command, respectively.  They make use of the status
             of the SET FLOW-CONTROL parameter, to send and receive data
             using the communications port.  For instance, say you are
             communicating with a computer that does not have KERMIT.
             Say you also wish to transfer a file to this computer to do
             some further processing.  The normal method involves start-
             ing a program on the remote computer to collect the data
             into a file on that system.  On a VAX/VMS system, you might
             use the CREATE command to capture the file.  The following
             _K_E_R_M_I_T commands will accomplish the transmition of a file in
             this case.

                  OUTPUT CREATE MYPROG.DAT<CR>
                  LOCAL COPY PROG/DAT *FO

             The KERMIT command, OUTPUT, will send the string "CREATE
             MYPROG.DAT<CR>" to the host.  Let's say for now that this is
             sufficient to cause all future characters sent to the host
             to be placed into the file MYPROG.DAT on that system.  The
             KERMIT command LOCAL is then used to invoke the _T_R_S_D_O_S
             library command COPY.  COPY will copy the contents of the
             file "PROG/DAT" to the *FO device.  The driver for this dev-
             ice is part of the KERMIT program, and will take care of
             transmitting the data out of the communications port to the
             HOST.  If the HOST sends XOFF because DATA is arriving TOO
             fast, then the XON/XOFF option to the _K_E_R_M_I_T command, SET
             FLOW-CONTROL, will allow the transfer to pause while the
             HOST catches up.  You may wish to collect the contents of a









                                        - 4 -


             file that is on another computer.  If particular computer
             does not have _K_E_R_M_I_T, you can use a series of commands simi-
             lar to those listed below to retrieve the file.  It should
             be noted that the _S_E_S_S_I_O_N-_L_O_G can also be used to trap the
             contents of a file.  For that very reason, this is only one
             of several possible ways to get a file from another computer
             that does not have _K_E_R_M_I_T.

                  OUTPUT TYPE MYPROG.DAT<CR>
                  INPUT TYPE MYPROG.DAT<CR><LF>
                  LOCAL COPY *FI MYPROG/DAT:1

                  It may help to clarify the use of the _O_U_T_P_U_T command,
             and the corresponding _I_N_P_U_T command.  If you use the _K_E_R_M_I_T
             command _C_O_N_N_E_C_T to enter terminal mode, and then proceed to
             tell the host to type out a file, it may start sending data
             before you can escape back, and type the _C_O_P_Y command.  This
             means that some of the data would be lost.  With _F_L_O_W-
             _C_O_N_T_R_O_L set to _X_O_N/_X_O_F_F, and the remote host recognizing
             this fact, the previous commands would not allow any data to
             be lost.  The use of _I_N_P_U_T is only to remove the characters
             ECHOed by the host from the input buffer (The TEXT of the
             command "TYPE MYPROG.DAT").  If you are communicating with a
             half-duplex system in which _M_o_d_e_l (_4)_p _K_E_R_M_I_T is echoing the
             characters typed on the keyboard, then the _I_N_P_U_T command
             need not be used.




             _5.  _C_o_n_t_r_o_l _o_f _F_i_l_e _T_r_a_n_s_f_e_r_s _U_s_i_n_g _t_h_e _K_E_R_M_I_T _P_r_o_t_o_c_o_l


                  During the transfer of a file using either _S_E_N_D, or _G_E_T
             and possibly during the use of the _R_E_M_O_T_E command, protocol
             operations may need to be aborted, or altered.  Several key
             strokes allow the user to control the protocol operations.
             These are listed below, and are listed on the screen after
             issuing either the _S_E_N_D or _G_E_T commands.  The operation of
             the _R_E_M_O_T_E command is purposefully silent.  The key strokes
             are available to the user during _R_E_M_O_T_E commands, for added
             flexibility.  This allows the user to cancel commands like
             _R_E_M_O_T_E _T_Y_P_E that may otherwise cause large amounts of data
             to be displayed for an extended amount of time.  The valid
             key strokes are:


             _C_o_n_t_r_o_l-_F      During data transfers using the _K_E_R_M_I_T proto-
                            col, _C_o_n_t_r_o_l-_F will terminate the current
                            transaction.  If there are more files to
                            transfer, the next transaction will be
                            started.  _M_o_d_e_l _4(_p) _K_E_R_M_I_T will send a sig-
                            nal to the remote _K_E_R_M_I_T telling it to stop
                            sending packets for the current transaction.









                                        - 5 -


                            If the remote _K_E_R_M_I_T understands this signal
                            (not all implementations of _K_E_R_M_I_T do), it
                            will comply, otherwise the transaction will
                            continue.

             _C_o_n_t_r_o_l-_B      Like  _C_o_n_t_r_o_l-_F, except that if a group of
                            files is being processed this will stop the
                            entire group.  If only a single file is being
                            _S_E_N_T or _R_E_C_E_I_V_E_D, _C_o_n_t_r_o_l-_B behaves exactly
                            like _C_o_n_t_r_o_l-_F.

             _C_o_n_t_r_o_l-_C      Aborts the protocol immediately.  This should
                            be a last resort to stopping a transmission
                            as it will leave the remote _K_E_R_M_I_T in an unk-
                            nown state.

             _C_o_n_t_r_o_l-_E      Aborts the protocol after sending an ERROR
                            packet to the remote _K_E_R_M_I_T.

             _C_o_n_t_r_o_l-_D      Toggles _D_E_B_U_G mode _O_N and _O_F_F.  This is help-
                            ful when trying to figure out why a particu-
                            lar host is unable to talk to _M_o_d_e_l _4(_p) _K_E_R_-
                            _M_I_T.

             <_E_N_T_E_R>        If you type <_E_N_T_E_R>, _M_o_d_e_l _4(_p) _K_E_R_M_I_T will
                            resend the current packet.

             _C_o_n_t_r_o_l-_H      Displays the list of _K_E_Y_S that you may press
                            during a transfer.  I.E.  the keys described
                            above.  This is the same message that is
                            printed when a SEND, GET, or RECEIVE command
                            is issued.




             _6.  _M_o_d_e_l _4(_p) _K_E_R_M_I_T _C_o_m_m_a_n_d_s


                  _M_o_d_e_l _4(_p) _K_E_R_M_I_T uses a subset of the the _D_E_C_S_Y_S_T_E_M-_2_0
             keyword style command language.  Each keyword may be abbre-
             viated to its minimum unique length.  "?" may be typed to
             request a list of the available options for the current
             field at any point in a command.  If insufficient characters
             have been typed to identify the current field uniquely,
             _M_o_d_e_l _4(_p) _K_E_R_M_I_T will display all available choices, and
             then reprompt to allow you to continue from that point.  If
             there are sufficient characters, then only a single choice
             will be displayed.  The following list of commands are
             available when using _M_o_d_e_l _4(_p) _K_E_R_M_I_T.













                                        - 6 -


             _6._1.  _B_Y_E

                  When talking to a remote _K_E_R_M_I_T Server, this command
                  should shut down a remote server and terminate the
                  login that you had there.  _M_o_d_e_l _4(_p) _K_E_R_M_I_T will then
                  exit to _T_R_S_D_O_S _R_e_a_d_y.

                       NOTE: Due to some deviations from the specifica-
                       tion, some systems do not perform exactly in this
                       manner.  You should check the documentation of the
                       _K_E_R_M_I_T on the remote system in order to obtain the
                       operation performed by this command.

             _6._2.  _C_L_E_A_R


                  _6._2._1.  _I_N_P_U_T-_P_O_R_T

                       _M_o_d_e_l _4(_p) _K_E_R_M_I_T uses the "Interrupt on received
                       character available" feature of the COM/DVR com-
                       munications line driver.  This driver is part of
                       the standard software on your system diskette.
                       All characters received via the interrupt vector,
                       are placed in a 256 byte circular buffer.  This
                       command clears all characters currently buffered.
                       This is used most commonly with the INPUT, OUTPUT,
                       PULSE, and PAUSE commands, none of which expli-
                       citly clear the input buffer.  YOU MUST DO THIS
                       YOURSELF.  The execution of this command will _n_o_t
                       send an _X_O_N character to the communications port.
                       This is also left up to you to do.

                  _6._2._2.  _S_C_R_E_E_N

                       As you would expect, this command clears the
                       screen.

             _6._3.  _C_L_O_S_E


                  _6._3._1.  _D_E_B_U_G-_L_O_G

                       Closes the file previously opened with the LOG
                       DEBUG-LOG command.  If there is not a debug log-
                       file active, then a message is printed telling you
                       so.

                  _6._3._2.  _S_E_S_S_I_O_N-_L_O_G

                       Closes the file previously opened with the LOG
                       SESSION-LOG command.  If no file is open, you will
                       be advised so.











                                        - 7 -


                  _6._3._3.  _T_R_A_N_S_A_C_T_I_O_N-_L_O_G

                       Closes the file previously opened with the LOG
                       TRANSACTION-LOG command.  As with the other log-
                       files, if a file is not currently open, then a
                       message to that affect is printed.

                  _6._4.  _C_O_N_N_E_C_T (_c_a_n _b_e _a_b_b_r_e_v_i_a_t_e_d _t_o '_C')

                       Establish a "virtual terminal" connection to any
                       host that may be connected to the serial port,
                       i.e. pass all typed characters to the serial port
                       and display all input from the serial port on the
                       screen.  A two character sequence of characters is
                       required to return the user to the _K_E_R_M_I_T program.
                       An escape character must be typed followed by a
                       'c' (Case is _n_o_t significant).  The default
                       <ESCAPE> character is entered by pressing the
                       <SHIFT> key, and then and <CLEAR> key, while hold-
                       ing the <SHIFT> key down.  Pressing '?' after the
                       <ESCAPE> character will display a list of valid
                       keystrokes that do helpful things during connect
                       mode.  The first time that you issue the _C_O_N_N_E_C_T
                       command, a message will be displayed telling you
                       what the <ESCAPE> character is.  The <ESCAPE>
                       character should generally be an uncommonly-used
                       control character.  The following characters are
                       valid following the <_E_S_C_A_P_E> character, and gen-
                       erate specific actions.  The actions are described
                       beside the character.

                            _C    Return to _M_o_d_e_l _4(_p) _K_E_R_M_I_T command
                                 level.  The contents of the screen and
                                 the cursor location will be saved prior
                                 to displaying the _K_E_R_M_I_T screen.  When
                                 you reconnect to the _H_O_S_T using the _K_E_R_-
                                 _M_I_T command, _C_O_N_N_E_C_T, the old screen
                                 will be restored.

                            _?    List available single-character com-
                                 mands, I.E. These commands.

                            _B    Send a TRUE modem break.

                            _R    Resume logging if file open, and
                                 <ESCAPE>Q was used previously to turn
                                 logging off.  See the _L_O_G command for
                                 more information.

                            _Q    Quit logging to file but leave it open.

                            _0 (_z_e_r_o)Send a null (0) character out the
                                 communications port.










                                        - 8 -


                            <_E_S_C_A_P_E>Send the <_E_S_C_A_P_E> character itself to
                                 the remote host.

                  _6._5.  _D_I_R _p_a_r_t_s_p_e_c

                       Produces a listing of the directory for
                       "partspec".  If partspec is not given, than the
                       directory will be displayed for the _D_E_F_A_U_L_T-_D_I_S_K
                       drive as established by _S_E_T _D_E_F_A_U_L_T-_D_I_S_K.

                  _6._6.  _E_X_I_T

                       Exit _M_o_d_e_l _4(_p) _K_E_R_M_I_T, and return to _T_R_S_D_O_S.
                       Before the _K_E_R_M_I_T program is terminated, all open
                       files will be closed.  This includes the LOGFILES
                       used for SESSION, TRANSACTION, and DEBUG logging.
                       The *FO, and *FI devices will also be removed.

                  _6._7.  _E_C_H_O

                       This command echoes text given as an argument to
                       the screen.  It can used in take files to put mes-
                       sages on the screen when TAKE-DISPLAY is OFF,
                       although other uses are possible.

                  _6._8.  _F_I_N_I_S_H

                       Shuts down a remote server without logging it out.
                       Leaves you at _M_o_d_e_l _4(_p) _K_E_R_M_I_T command level.  A
                       subsequent _C_O_N_N_E_C_T command will reconnect you to
                       the remote host.  The _r_e_m_o_t_e _K_E_R_M_I_T should return
                       to the mode it was in prior to entering _S_E_R_V_E_R
                       mode.

                  _6._9.  _G_E_T _f_i_l_e_s_p_e_c

                       Get allows you to retrieve files from a remote
                       host.  Get works with either a _S_E_R_V_E_R or a _K_E_R_M_I_T
                       that has initiated a _S_E_N_D command.  Filespec is a
                       filename compatible with _t_h_a_t system.  When _M_o_d_e_l
                       _4(_p) _K_E_R_M_I_T is talking to a _K_E_R_M_I_T Server, you may
                       include a filespec in a form legal to the _H_O_S_T
                       _K_E_R_M_I_T.

                  _6._1_0.  _I_N_P_U_T <_c_o_n_t_r_o_l _s_t_r_i_n_g>

                       INPUT provides one of 4 commands that provide an
                       automatic logon facility.  INPUT allows you to
                       watch for the occurrence of certain text strings
                       that are made up characters arriving in the com-
                       munications port.  This is useful in _T_A_K_E files
                       that can automatically log you onto a certain sys-
                       tem.










                                        - 9 -


                            When _I_N_P_U_T in initiated, it begins matching
                       characters in the input to those given in the con-
                       trol string.  When an exact match is found as
                       established by the _S_E_T _I_N_P_U_T options then _I_N_P_U_T
                       will return to the _K_E_R_M_I_T command level.  If _T_A_K_E
                       is active than the next line of the _T_A_K_E file will
                       be read.  The Control string may be comprised of
                       any printable _A_S_C_I_I characters.  _S_P_A_C_E must not
                       occur as either the beginning or end of the
                       string.

                            _A_S_C_I_I character codes 0-32 are denoted as
                       <_N_U_L> - <_S_P_A>, and <_D_E_L> represents character 127.
                       The string <_D_L_Y*> signifies an immediate delay.
                       The * should be replaced by a character.  The sig-
                       nificance of the character is this.  Decimal 48 is
                       subtracted from the _A_S_C_I_I value of the character
                       to obtain the number of seconds to delay.  Thus,
                       you can obtain delays 1-9 seconds, with no trick-
                       ery.  Delays longer than that will have to be cal-
                       culated since the formula (ASCII code - 48
                       decimal) is used to calculate the binary value to
                       use as a counter.  The "*" should be replaced with
                       the single proper ASCII character.

                            If you use <_D_L_Y*> in a _P_U_L_S_E command, it
                       should be noted that it will only be done once.
                       An alternative format for control characters is to
                       explicitly type a carat ("^") preceding a charac-
                       ter.  The result of subtracting 64 from the _A_S_C_I_I
                       code for the character following will then be
                       used.  Since <, >, and ^ now have special mean-
                       ings, you will need some way to specify them
                       explicitly.  To do this you should precede them
                       with a backslash, "\", character.  In this case,
                       backslash itself now must be represented as "\\".
                       Finally, any and all characters can be represented
                       using a string of the form \nnn where nnn is 1 or
                       more octal digits.  nnn is evaluated, and the
                       resulting value will be the ASCII value of the
                       character.  Some examples might be:

                            INPUT login:<SPA>

                                 Find the string "login:" followed by a
                                 space.

                            INPUT <SPA>^M^Jenter \\userid\\:<CR><LF>

                                 Find the string with a space followed by
                                 a carriage return followed by a line
                                 feed followed by the text "enter
                                 \userid\:" followed by carriage return
                                 and another linefeed.









                                        - 10 -


                            INPUT USERNAME\77\40

                                 Find the string "USERNAME? ".  Note that
                                 \77 is the _O_N_L_Y way that a question mark
                                 can be specified since a question mark
                                 is recognized by the command stream as a
                                 request for help.

                       While input is waiting for a match, you may type
                       characters on the keyboard to be transmitted.
                       _B_R_E_A_K will abort the _I_N_P_U_T command and if _T_A_K_E is
                       active, close the take file.  _E_S_C_A_P_E will abort
                       the INPUT command, but will just skip to the next
                       line in a _T_A_K_E file, if _T_A_K_E is active.  These
                       same 2 actions apply to the _P_U_L_S_E command while no
                       input has been received.

                  _6._1_1.  _K_I_L_L _w_i_l_d_s_p_e_c

                       This command performs the task of deleting one or
                       more files from disk.  _W_i_l_d_s_p_e_c is a wild card
                       filespec that will be evaluated.  All files that
                       match the wildspec will be removed.  A _w_i_l_d_s_p_e_c
                       may contain any characters valid is a TRSDOS
                       filespec, plus zero or more occurances of the
                       characters '*', and '$'.  These two characters
                       have special meanings.

                            When comparing the _w_i_l_d_s_p_e_c with the name of
                       a file, a '*' matches zero or more of the charac-
                       ters in the filename.  E.g.  If a file FOO/ASM is
                       compared with '*/ASM', then it would match,
                       because '*' can be thought of as 'FOO', and then
                       '/ASM' is matched literally.  M4*/ASM matches
                       M4MIT/ASM, M4XFER/ASM, M4SEND/ASM, and any other
                       filename that begins with M4, and ends with /ASM.
                       The '$' character matches any single character.
                       This means that FILE$/DOC matches the filename
                       FILE1/DOC, but not FILE1A/DOC.

                            A drivespec may be appended to the _w_i_l_d_s_p_e_c
                       to force the search for matches to be restricted
                       to a single drive.  An example might be M4*/ASM:1,
                       which limits the matches to those file on drive 1.

                            Normally, only visible, nonsystem files are
                       considered in the search.  However, the inclusion
                       of a parameter list containing either, or both of
                       the keywords, INVIS or SYSTEM, will include
                       invisible and/or system files.  An example would
                       be:
                            KILL (I,S) config/sys (I) backup/cmd
                       This example would cause _M_o_d_e_l _4(_p) _K_E_R_M_I_T to
                       attempt to remove the two files listed.  Note that









                                        - 11 -


                       as this example shows, you must specify the param-
                       eters with each _w_i_l_d_s_p_e_c that you wish to apply
                       them to, as they are nullified each time that a
                       new _w_i_l_d_s_p_e_c is evaluated.  Other examples are
                       given in the description of the _S_E_N_D command.

                  _6._1_2.  _L_O_C_A_L <_T_R_S_D_O_S _l_i_b_r_a_r_y _c_o_m_m_a_n_d>  (_C_a_n _b_e
                  _a_b_b_r_e_i_v_i_a_t_e_d _t_o _L)

                       This command allows you to issue commands from
                       within _M_o_d_e_l _4(_p) _K_E_R_M_I_T.  You must remember where
                       Model 4(p) KERMIT resides in memory, to assure
                       that you do not overwrite it.  KERMIT loads at
                       6000H, and continues up through LOW$.  From within
                       KERMIT, you can issue the command:

                            LOCAL MEMORY

                       to see where KERMIT ends.  The value of LOW$ tells
                       you this information.  KERMIT was placed at 6000H
                       to allow most of the TRSDOS library programs and
                       commands to work in conjunction with KERMIT.  Some
                       commands extend above 3000H, and must have memory
                       available up to approximately 5300H.  The COPY
                       command creates a problem because it apparently
                       tries to examine HIGH$ to see if there is space to
                       load a large portion of the source file into
                       memory before writing it to the destination.  This
                       creates problems because KERMIT moves LOW$ up so
                       that HIGH$ has a value that will allow additional
                       high memory module to be loaded.  It is suggested
                       that you not use COPY while KERMIT is running, as
                       the machine may crash when COPY completes.  This
                       is because it will have copied data into the KER-
                       MIT memory space.

                  _6._1_3.  _L_O_G

                       _6._1_3._1.  _D_E_B_U_G-_L_O_G

                            The debug log can be used to debug transfer
                            problems that sometimes arrise when talking
                            to a newly written KERMIT.  The information
                            written to the DEBUG-LOG is nearly identical
                            to that which is displayed on the screen when
                            the command, SET DEBUG ON, is issued, or the
                            CTRL-D key is pressed during a transfer.
                            This file can be closed explicitly with the
                            _C_L_O_S_E _D_E_B_U_G-_L_O_G command.  The EXIT command
                            also causes an implicit closing of this file.













                                        - 12 -


                       _6._1_3._2.  _S_E_S_S_I_O_N-_L_O_G

                            When CONNECTed to a foreign host as a termi-
                            nal, this command establishes a log of the
                            terminal session in the file specified.  This
                            function depends, to some extent, on the
                            remote host's ability to do _X_O_N/_X_O_F_F flow
                            control.  Without _F_L_O_W-_C_O_N_T_R_O_L, data may be
                            lost when _K_E_R_M_I_T writes to the file.  The log
                            file is closed by explicitly typing the _K_E_R_-
                            _M_I_T command _C_L_O_S_E _S_E_S_S_I_O_N-_L_O_G or implicitly
                            when _K_E_R_M_I_T is exited via the _E_X_I_T command.
                            It will also be closed if an I/O error occurs
                            in file processing for the file involved.
                            _L_O_G_G_I_N_G may be toggled on and off during _C_O_N_-
                            _N_E_C_T using the sequence of keys described in
                            the _C_O_N_N_E_C_T description.

                       _6._1_3._3.  _T_R_A_N_S_A_C_T_I_O_N-_L_O_G

                            The transaction log is used to keep a record
                            of the files transfered during a KERMIT ses-
                            sion.  The information includes whether or
                            not the transaction was SENDING, or RECEIV-
                            ING, the name of the file transfered, and the
                            number of bytes involved in the transfer.

                  _6._1_4.  _L_O_G_O_U_T

                       Logout tells a _r_e_m_o_t_e _k_e_r_m_i_t _s_e_r_v_e_r to terminate
                       itself, as well as your login session.  When this
                       is completed, you are left at _M_o_d_e_l _4(_p) _K_E_R_M_I_T
                       command level.

                  _6._1_5.  _O_U_T_P_U_T <_c_o_n_t_r_o_l _s_t_r_i_n_g>

                       This is the other side of the _I_N_P_U_T command.  Con-
                       trol string follows the same conventions as in
                       _I_N_P_U_T, and the resulting character(s) will be out-
                       put to the communications port immediately.  It
                       should be noted that _N_O characters other than what
                       you specify are transmitted.  In other words if
                       you want to simulate typing some string, followed
                       by pressing <_E_N_T_E_R>, then you will have to use a
                       command similar to:

                            OUTPUT mypassword<CR>


                       The <_C_R> will explicitly send the _A_S_C_I_I character
                       13 to the communications port.












                                        - 13 -


                  _6._1_6.  _P_A_U_S_E <_n_u_m_b_e_r _o_f _s_e_c_o_n_d_s>

                       This command is usually used in conjunction with
                       _I_N_P_U_T, _O_U_T_P_U_T, and _P_U_L_S_E as a means of syncroniz-
                       ing _M_o_d_e_l _4(_p) _K_E_R_M_I_T to a remote host.  A delay
                       of the specified number of seconds will be gen-
                       erated based on the accuracy of the 60HZ inter-
                       rupt.  No means has been made for aborting the
                       delay.  The maximum delay is 65536 seconds by
                       specifying 0 as the number.

                  _6._1_7.  _P_U_L_S_E <_c_o_n_t_r_o_l _s_t_r_i_n_g>

                       This command is an extension/combination of _I_N_P_U_T
                       and _O_U_T_P_U_T.  It allows you to transmit one or more
                       characters repeatedly until a character appears in
                       the input port.  The use of this command is valu-
                       able when logging onto systems that don't always
                       respond immediately after the reception of some
                       control character(s).  For instance, you might
                       (Now that all of the functions of this nature have
                       been described) use the following commands as part
                       of a logon sequence to log onto a computer system.

                            SET INPUT CASE-IGNORE ON
                            SET INPUT DISPLAY ON
                            SET OUTPUT HOST-ECHO ON
                            SET OUTPUT DISPLAY ON
                            CLEAR INPUT-PORT
                            PULSE ^T<CR>
                            INPUT <CR><LF>XYZ:
                            PAUSE 2
                            CLEAR INPUT-PORT
                            PULSE <CR>
                            INPUT Username:<SPA>
                            OUTPUT joeblow<CR>
                            INPUT <CR><LF>Terminal type:
                            OUTPUT h19<CR>
                            SET KEY 8 <DEL>
                            SET KEY 128 <ETX>

                       After you study this awhile, it should make sense.
                       If these commands are placed into a _T_A_K_E file,
                       then you could use a _C_O_N_N_E_C_T command after the
                       last command, to connect immediately to the host.
                       If this is done, then _o_n_l_y after you escape back
                       to _M_o_d_e_l _4(_p) _K_E_R_M_I_T, will the _T_A_K_E file finally
                       be closed.

                  _6._1_8.  _R_E_C_E_I_V_E <_f_i_l_e_s_p_e_c>
                       This command is synonomous with the GET command.
                       It may be abbreviated to the single character 'R',
                       as in:










                                        - 14 -


                            R *.asm


                  _6._1_9.  _R_E_M_O_T_E <_c_o_m_m_a_n_d>

                       _R_e_m_o_t_e commands are not supported in totality by
                       all _s_e_r_v_e_r_s.  If a _s_e_r_v_e_r supports remote com-
                       mands, then _r_e_m_o_t_e _h_e_l_p should display all of the
                       commands available to the _r_e_m_o_t_e user of the
                       server.  Below are descriptions of the _r_e_m_o_t_e com-
                       mands that _M_o_d_e_l _4(_p) _K_E_R_M_I_T knows how to send to
                       a _r_e_m_o_t_e _s_e_r_v_e_r.  The arguments to most commands
                       are dependent on the _r_e_m_o_t_e system.  You should be
                       familiar with any system before using the _r_e_m_o_t_e
                       _s_e_r_v_e_r commands available from that server.  Usu-
                       ally only a small number of these commands are
                       supported since some require abilities that some
                       operating systems just don't have.


                       _6._1_9._1.  _C_L_O_S_E-_L_O_G

                            Close a remote _L_O_G previously opened via the
                            command _R_E_M_O_T_E _S_T_A_R_T-_L_O_G.

                       _6._1_9._2.  _C_O_P_Y

                            Copy one file to another.

                       _6._1_9._3.  _C_W_D <_d_i_r_e_c_t_o_r_y _p_a_t_h>

                            If a particular server's operating system
                            supports the concept of separate directories,
                            then this command will allow you to change to
                            a different directory.

                       _6._1_9._4.  _D_E_L_E_T_E

                            Deletes file(s) from the _r_e_m_o_t_e system.  Any
                            arguments will probably be file names in the
                            format of the _r_e_m_o_t_e system.

                       _6._1_9._5.  _D_I_R

                            Display a list of files on the _r_e_m_o_t_e system.

                       _6._1_9._6.  _D_I_S_K

                            Display information about disk utilization on
                            the _r_e_m_o_t_e system.













                                        - 15 -


                       _6._1_9._7.  _H_E_L_P

                            Get information about _r_e_m_o_t_e capabilities on
                            the _r_e_m_o_t_e system.

                       _6._1_9._8.  _H_O_S_T

                            Execute a command on the _r_e_m_o_t_e system.

                       _6._1_9._9.  _K_E_R_M_I_T

                            Execute a _K_E_R_M_I_T command on the _r_e_m_o_t_e sys-
                            tem.  This command should accept a normal
                            _K_E_R_M_I_T command as an argument.  The command,
                            if valid, will then be executed by the remote
                            _K_E_R_M_I_T server.

                       _6._1_9._1_0.  _L_O_G_I_N

                            Create a login entity on the _r_e_m_o_t_e system.
                            This may be incorporated into a dedicated
                            server.

                       _6._1_9._1_1.  _M_E_S_S_A_G_E

                            Send a message to a user on the _r_e_m_o_t_e sys-
                            tem.

                       _6._1_9._1_2.  _P_R_O_G_R_A_M

                            Feed command input to a command executing on
                            the remote system, or control the execution
                            of a program.

                       _6._1_9._1_3.  _Q_U_E_R_Y-_V_A_R_I_A_B_L_E

                            Get the value of a variable maintained on the
                            _r_e_m_o_t_e system.

                       _6._1_9._1_4.  _R_E_N_A_M_E

                            Change the name of a file on the _r_e_m_o_t_e sys-
                            tem.

                       _6._1_9._1_5.  _S_E_N_D-_L_O_G

                            Tells the server to close any open log, and
                            then transfer it to the user.

                       _6._1_9._1_6.  _S_E_R_V_E_R-_S_T_A_T_U_S

                            Retrieve certain information about the status
                            of a REMOTE server.  The information returned
                            is dependent on the REMOTE system.









                                        - 16 -


                       _6._1_9._1_7.  _S_E_T-_V_A_R_I_A_B_L_E

                            Set the value of a variable on the _r_e_m_o_t_e
                            system.

                       _6._1_9._1_8.  _S_T_A_R_T-_L_O_G

                            Start a transaction log on the _r_e_m_o_t_e system.

                       _6._1_9._1_9.  _S_T_O_P-_L_O_G

                            Stops logging to the log file started by the
                            _R_E_M_O_T_E _S_T_A_R_T-_L_O_G command.  The file is not
                            closed.  Logging may be started again by
                            using the the command, _R_E_M_O_T_E _S_T_A_R_T-_L_O_G.

                       _6._1_9._2_0.  _T_Y_P_E

                            Display the contents of the file/files given
                            as arguments.  The _r_e_m_o_t_e server should use
                            the _K_E_R_M_I_T protocol to send the contents of
                            the specified file/files to _M_o_d_e_l _4(_p) _K_E_R_-
                            _M_I_T.  The file contents will be displayed on
                            the screen using the *SO device.

                       _6._1_9._2_1.  _W_H_O

                            Display a list of users on the _r_e_m_o_t_e system.

                  _6._2_0.  _S_E_N_D <_w_i_l_d_s_p_e_c>        (_M_a_y _b_e _a_b_b_r_e_v_i_a_t_e_d _t_o
                  '_S');

                       File specifications may contain wild card charac-
                       ters.  The recognized wild card characters are '*'
                       and '$'.  '*' means zero or more of any character.
                       '$' means exactly one of any character.  There are
                       a lot of specifics associated with wild carding,
                       and search order through the drives.

                            When files by the same name exist on dif-
                       ferent drives, a wild card match of one will also
                       match all other occurances.  e.g. if drive 0 con-
                       tains the file report/dat, and report.dat also
                       exist on drive 1, then the command other varia-
                       tions can be used to send only one of the 2 files.
                       'SEND */dat:1' will only match files on drive 1.
                       Another alternative would be

                            Case is NOT significant, so both REPORT/DAT
                       and report/dat are identical.  so "*/*" is the
                       same as "*" for all file names with an extension.
                       "*/*", however, does not match names of the form
                       "data", "fred", "file", "temp", or others without
                       extensions.  Other examples are given in the









                                        - 17 -


                       description of the _K_I_L_L command.

                  _6._2_1.  _S_E_T <_p_a_r_a_m_e_t_e_r [_v_a_l_u_e(_s)...]>

                       Set the specified parameter to the specified
                       value.  Possible settings:


                       _6._2_1._1.  _B_E_L_L _O_N (_o_r _O_F_F)

                            When _D_U_M_B terminal emulation is in effect, a
                            simple noise generator is used to produce a
                            tone like a bell each time the _B_E_L_L character
                            is received.  If you don't like it, than use
                            _S_E_T _B_E_L_L _O_F_F to disable it.

                       _6._2_1._2.  _B_L_O_C_K-_C_H_E_C_K-_T_Y_P_E

                            The options are:

                            _6._2_1._2._1.  _1 (_c_h_a_r_a_c_t_e_r _c_h_e_c_k_s_u_m)

                                 Normal, default, standard 6-bit check-
                                 sum.

                            _6._2_1._2._2.  _2 (_c_h_a_r_a_c_t_e_r _c_h_e_c_k_s_u_m)

                                 A 12-bit checksum encoded as two charac-
                                 ters.

                            _6._2_1._2._3.  _3 (_c_h_a_r_a_c_t_e_r _c_r_c-_c_c_i_t_t)

                                 A 16-bit CCITT-format Cyclic Redundancy
                                 Check,  encoded as 3 characters.

                            The 2 and 3 character options should only be
                            used under conditions of extreme line noise.
                            Many implementations of _K_E_R_M_I_T only support
                            the single character checksum.

                       _6._2_1._3.  _D_E_B_U_G_G_I_N_G _O_F_F (_o_r _O_N)

                            When transmitting or receiving packets, con-
                            trols whether the packets are displayed on
                            the local screen.

                       _6._2_1._4.  _D_E_F_A_U_L_T-_D_I_S_K <_d_r_i_v_e _n_u_m_b_e_r>

                            The default-drive value is used for received
                            files.  The file names created by _M_o_d_e_l _4(_p)
                            _K_E_R_M_I_T will have a ':' and the default drive
                            number affixed to the end so that they will
                            be forced to be saved on the selected drive.










                                        - 18 -


                       _6._2_1._5.  _E_I_G_H_T-_B_I_T-_Q_U_O_T_I_N_G _O_N (_o_r _O_F_F)

                            This command enables or disables 8th bit
                            quoting.  This is useful when a full 8 bit
                            path is available for binary file transfers.

                       _6._2_1._6.  _E_M_U_L_A_T_I_O_N _N_O_N_E (_o_r _D_U_M_B)

                            When connected as a terminal to a foreign
                            host, _S_E_T _E_M_U_L_A_T_I_O_N controls whether the
                            Model 4 emulates no terminal, allowing the
                            use of a terminal filter, or whether a _D_U_M_B
                            terminal emulation is used.  No emulation is
                            the default.

                       _6._2_1._7.  _E_S_C_A_P_E

                            Change the escape character for virtual ter-
                            minal connections.  _M_o_d_e_l _4(_p) _K_E_R_M_I_T will
                            prompt you for the new escape character,
                            which you type in locally.

                       _6._2_1._8.  _F_I_L_E

                            _6._2_1._8._1.  _D_I_S_P_O_S_I_T_I_O_N _K_E_E_P (_o_r _D_I_S_C_A_R_D)

                                 When the transfer of a file is inter-
                                 rupted, this tells Model 4(p) KERMIT
                                 what to do if it receives only a partial
                                 file.  If FILE-DISPOSITION is DISCARD,
                                 then any partial file is removed.  Oth-
                                 erwise, the file is left as it is when a
                                 transfer is interrupted.

                            _6._2_1._8._2.  _T_Y_P_E (_A_S_C_I_I _o_r _B_I_N_A_R_Y)

                                 Tells _M_o_d_e_l _4(_p) _K_E_R_M_I_T how to deal with
                                 the file being sent/received. It is
                                 _I_M_P_O_R_T_A_N_T to tell KERMIT if the file is
                                 in _A_S_C_I_I when sending to a _N_O_N _M_o_d_e_l
                                 _4(_p) _K_E_R_M_I_T.  The action taken with this
                                 value is as follows.  If _A_S_C_I_I mode is
                                 set, then CR-LF pairs of characters are
                                 translated to CR on input, and CR is
                                 translated to CR-LF on output.  When
                                 binary mode is in effect, this transla-
                                 tion does not occur.

                       _6._2_1._9.  _F_L_O_W-_C_O_N_T_R_O_L _X_O_N/_X_O_F_F (_o_r _N_O_N_E)

                            When this feature is set to _X_O_N/_X_O_F_F (the
                            default), _M_o_d_e_l _4(_p) _K_E_R_M_I_T will try its best
                            to obey and use _X_O_N characters and _X_O_F_F char-
                            acters for all transmitions through the









                                        - 19 -


                            communications port.  _N_O_N_E will disable all
                            attempts at this sort of flow- control.

                       _6._2_1._1_0.  _I_N_P_U_T

                            _6._2_1._1_0._1.  _C_A_S_E-_I_G_N_O_R_E _O_F_F (_o_r _O_N)

                                 Controls whether of not case matching is
                                 done on characters during the input com-
                                 mand. In most instances, you will want
                                 this _O_N.

                            _6._2_1._1_0._2.  _D_I_S_P_L_A_Y _O_F_F (_o_r _O_N)

                                 Controls the display of characters that
                                 are input during the execution of the
                                 _I_N_P_U_T command.

                       _6._2_1._1_1.  _K_E_Y <_k_e_y _v_a_l_u_e> <_s_t_r_i_n_g>

                            This command allows you to send an arbitrary
                            (the length of the _K_E_R_M_I_T command line is the
                            limit) string with a single key stroke.  The
                            definition of string is identical for that of
                            the _I_N_P_U_T, _O_U_T_P_U_T, and _P_A_U_S_E commands. KEY
                            VALUE is the ASCII value of the key stroke as
                            given in the TRSDOS manual.  If KEY VALUE is
                            not given, then you will be asked to press
                            the key corresponding to the key that you
                            wish to define.  All keys are valid in _s_t_r_i_n_g
                            except BREAK.  Pressing BREAK signals the end
                            of the definition string.  While in _C_O_N_N_E_C_T
                            mode, typing the defined key will cause the
                            characters typed as the definition to be
                            typed instead.  Defining a key to have a _N_U_L_L
                            length deletes any previous definition.

                       _6._2_1._1_2.  _L_O_C_A_L-_E_C_H_O _O_F_F (_o_r _O_N)

                            When you _C_O_N_N_E_C_T to a remote host, you must
                            set _L_O_C_A_L-_E_C_H_O _O_N if the host is half duplex,
                            _O_F_F if full duplex.

                       _6._2_1._1_3.  _O_U_T_P_U_T

                            _6._2_1._1_3._1.  _H_O_S_T-_E_C_H_O _O_N (_o_r _O_F_F)

                                 When using _O_U_T_P_U_T, and communicating
                                 with a remote host, the host commonly
                                 echoes the characters as you type.
                                 Since _O_U_T_P_U_T effectively types charac-
                                 ters for you, these characters may be
                                 echoed back.  If _H_O_S_T-_E_C_H_O is _O_N, _O_U_T_P_U_T
                                 will wait for the echoed character to









                                        - 20 -


                                 reappear in the input buffer before it
                                 sends the next. In the example for send-
                                 ing and receiving raw data, that is
                                 above, setting _H_O_S_T-_E_C_H_O _O_N, will enable
                                 us to remove the _I_N_P_U_T _T_Y_P_E
                                 _M_Y_P_R_O_G._D_A_T<_C_R><_L_F> command. Control
                                 characters are _N_O_T normally echoed, so
                                 this feature when set _O_N, will not wait
                                 for them.  If you must catch the echo of
                                 a control character, then follow the
                                 _O_U_T_P_U_T command with the appropriate
                                 _I_N_P_U_T command.

                            _6._2_1._1_3._2.  _D_I_S_P_L_A_Y _O_F_F (_o_r _O_N)

                                 This parameter when on controls the
                                 display of characters that are received
                                 when _H_O_S_T-_E_C_H_O is _O_N.  Otherwise, They
                                 are displayed based on the status of the
                                 _L_O_C_A_L-_E_C_H_O setting.

                       _6._2_1._1_4.  _P_R_I_N_T_E_R _O_F_F (_o_r _O_N)

                            Turns copying of _C_O_N_N_E_C_T session to printer
                            on  and off.  With _F_L_O_W-_C_O_N_T_R_O_L turned on,
                            and a sending host that will acknowledge the
                            _X_O_F_F, you should have no problems using the
                            printer continuously.

                       _6._2_1._1_5.  _R_E_C_E_I_V_E

                            _6._2_1._1_5._1.  _E_N_D-_O_F-_L_I_N_E <_A_S_C_I_I _c_o_d_e>

                                 Set the end of line character in packets
                                 to some other character than <_C_R> which
                                 is the default.

                            _6._2_1._1_5._2.  _P_A_D-_C_H_A_R <_A_S_C_I_I _c_o_d_e>

                                 If the host you are communicating with
                                 needs one or more padding characters
                                 before it receives actual data during
                                 packet transfers, this character will be
                                 sent _P_A_D_D_I_N_G times.

                            _6._2_1._1_5._3.  _P_A_D_D_I_N_G <_d_e_c_i_m_a_l _n_u_m_b_e_r>

                                 The repeat count for the number of times
                                 the padding character is transmitted.

                            _6._2_1._1_5._4.  _Q_U_O_T_E-_C_H_A_R_A_C_T_E_R <_A_S_C_I_I _c_o_d_e>

                                 The character used to quote control
                                 characters.  The default is pound "#"









                                        - 21 -


                            _6._2_1._1_5._5.  _S_T_A_R_T-_O_F-_P_A_C_K_E_T <_A_S_C_I_I _c_o_d_e>

                                 The character used to syncronize the
                                 packets that _K_E_R_M_I_T transmits.  By
                                 default <_S_O_H>.

                            _6._2_1._1_5._6.  _T_I_M_E-_O_U_T <_d_e_c_i_m_a_l _n_u_m_b_e_r>

                                 _M_o_d_e_l _4(_p) _K_E_R_M_I_T uses this value as the
                                 number of seconds to wait for a response
                                 to a packet.  If no response is received
                                 within the number of seconds given, then
                                 the packet for which the response has
                                 not been received is retransmitted.

                            _6._2_1._1_5._7.  _T_U_R_N-_C_H_A_R

                                 The character used to syncronize KERMIT
                                 when used over a half duplex line.
                                 _M_o_d_e_l _4(_p) _K_E_R_M_I_T will wait for this
                                 character at the end of a packet, and
                                 will send the SEND TURN-CHAR at the end
                                 of a packet.

                       _6._2_1._1_6.  _S_E_N_D

                            _6._2_1._1_6._1.  _E_N_D-_O_F-_L_I_N_E <_A_S_C_I_I _c_o_d_e>

                                 Set the end of line character in packets
                                 to some other character than <_C_R> which
                                 is the default.

                            _6._2_1._1_6._2.  _P_A_D-_C_H_A_R <_A_S_C_I_I _c_o_d_e>

                                 If the host you are communicating with
                                 needs one or more padding characters
                                 before it receives actual data during
                                 packet transfers, this character will be
                                 sent _P_A_D_D_I_N_G times.

                            _6._2_1._1_6._3.  _P_A_D_D_I_N_G <_d_e_c_i_m_a_l _n_u_m_b_e_r>

                                 The repeat count for the number of times
                                 the padding character is transmitted.

                            _6._2_1._1_6._4.  _Q_U_O_T_E-_C_H_A_R_A_C_T_E_R <_A_S_C_I_I _c_o_d_e>

                                 The character used to quote control
                                 characters.  The default is pound "#"

                            _6._2_1._1_6._5.  _S_T_A_R_T-_O_F-_P_A_C_K_E_T <_A_S_C_I_I _c_o_d_e>

                                 The character used to syncronize the
                                 packets that _K_E_R_M_I_T transmits.  By









                                        - 22 -


                                 default <_S_O_H>.

                            _6._2_1._1_6._6.  _T_I_M_E-_O_U_T <_d_e_c_i_m_a_l _n_u_m_b_e_r>

                                 This value is given to the _o_t_h_e_r host as
                                 its' timeout value.  You should assure
                                 that this is different from the RECEIVE
                                 TIME-OUT value so that both timeouts do
                                 not occur simultaneously.

                            _6._2_1._1_6._7.  _T_U_R_N-_C_H_A_R <_A_S_C_I_I _c_o_d_e>

                                 The character used to syncronize KERMIT
                                 when used over a half duplex line.
                                 _M_o_d_e_l _4(_p) _K_E_R_M_I_T will send this charac-
                                 ter at the end of a packet.  The RECEIVE
                                 TURN-CHAR will be waited for before data
                                 is transmitted.

                       _6._2_1._1_7.  _T_A_K_E-_D_I_S_P_L_A_Y _O_F_F (_o_r _O_N)

                            Controls the display of _T_A_K_E files as they
                            are executed.  By default this feature is
                            off.

                       _6._2_1._1_8.  _W_A_R_N_I_N_G _O_N (_o_r _O_F_F)

                            Warns user if filename conflicts when receiv-
                            ing files from remote host, and attempt to
                            generate a unique name by modifying the given
                            one.  _O_N by default.

                  _6._2_2.  _S_E_T_C_O_M <_T_R_S_D_O_S _S_E_T_C_O_M _c_o_m_m_a_n_d _p_a_r_a_m_e_t_e_r>

                       Sets/shows the status of the communications
                       driver, _C_O_M/_D_V_R.  If no arguments are given, than
                       the current status will be shown.  Any arguments
                       must be enclosed in parenthesis as the result of
                       this command, is a generated _T_R_S_D_O_S command as in:

                            SETCOM (B=9600,P=N,W=8)

                       The default values are established according to
                       you.  If you set up the driver for a certain con-
                       figuration, and then use _S_Y_S_G_E_N to save it, then
                       that will be the default.  _N_O sysgen should give
                       you:

                            300 BAUD
                            EVEN PARITY
                            DTR=YES
                            7 DATA BITS
                            1 STOP BIT










                                        - 23 -


                  _6._2_3.  _S_H_O_W

                       Allows one or ALL of the options of the _S_E_T com-
                       mand to be displayed.  Using the "?" feature will
                       aid you if you can't figure out where to find
                       something.  All of the things that can be SET can
                       be displayed.  The items not listed below can be
                       displayed by using a command like:

                            SHOW BLOCK

                       or

                            SHOW DEFAULT

                       SHOW ALL will display all of the set values except
                       keys.  You must use SHOW KEY to see these values.

                  _6._2_3._1.  _S_E_N_D

                       Displays all options described under the _S_E_T _S_E_N_D
                       command.

                  _6._2_3._2.  _R_E_C_E_I_V_E

                       Displays all options described under the _S_E_T
                       _R_E_C_E_I_V_E command.

                  _6._2_3._3.  _K_E_Y <_A_S_C_I_I _k_e_y _v_a_l_u_e>

                       If <ASCII key value> is specified, then the defin-
                       ition for the specified key number is display.
                       Otherwise, a prompt is issued for the user to type
                       the keystroke that should be taken as the key to
                       display.  \nnn is used to display all values
                       greater than 127.  ^x where x is a character 64
                       greater than 0 through 31, and 127 is used to
                       display control characters.  Any other printable
                       ASCII character is displayed normally.

             _6._2_4.  _S_T_A_T_U_S

                  Shows certain information about the status of _M_o_d_e_l
                  _4(_p) _K_E_R_M_I_T.  Items currently displayed include the
                  amount of space left in the _K_E_Y definition table, the
                  number of bytes written to files during transfers, the
                  number of bytes read from files during transfers, as
                  well as statistics on the latest transfer.

             _6._2_5.  _T_A_K_E <_f_i_l_e_s_p_e_c>

                  TAKE allows commands to be stored in a file, and then
                  executed by the _K_E_R_M_I_T command interpreter.  Only _o_n_e
                  level of _T_A_K_E files is supported.  This means that a









                                        - 24 -


                  _T_A_K_E command can not appear inside of a _T_A_K_E file.  No
                  checking is done to enforce this, so good luck if you
                  want to try it.  When _K_E_R_M_I_T is first entered, a check
                  is made for a file called _K_E_R_M_I_T/_I_N_I on all of the
                  active disk drives as per normal _T_R_S_D_O_S searching
                  order.  If it is found, than it is used as a _T_A_K_E file
                  where you can store initialization commands.  Pressing
                  the _B_R_E_A_K key, or the _E_N_T_E_R key during the startup of
                  KERMIT (before the TAKE file is opened) will cause _K_E_R_-
                  _M_I_T to skip processing of the _T_A_K_E file.




             _7.  _S_e_t_t_i_n_g _u_p _t_o _u_s_e _M_o_d_e_l _4(_p) _K_E_R_M_I_T

                  To use _M_o_d_e_l _4(_p) _K_E_R_M_I_T, you need to have your Model 4
             set up properly.  The program expects that the *CL device
             will be driven by the COM/DVR Communications Driver that
             comes with TRSDOS.  It also expects that the *SO device is
             ROUTED to the *DO device, and that the *SI device is ROUTED
             to the *KI device.  The former 2 are the defaults, and in
             general, you should not worry about them, unless you have
             changed them.  Setting up the *CL device involves typing the
             command:

                  SET *CL COM/DVR

             at the _T_R_S_D_O_S _R_e_a_d_y prompt.  If you do not do this, you will
             get a message of the form

                  Can't find *CL DCB

             from _M_o_d_e_l _4(_p) _K_E_R_M_I_T when it is starting up.  The program
             will return control to TRSDOS after issuing this message, as
             it is a fatal error.

                  Model 4(p) KERMIT is not a small program.  It occupies
             memory starting at 6000H, and extends up past 0D300H.  If
             you have parts of TRSDOS resident (Using the SYSTEM
             (SYSRES=....) command), or perhaps other filters or memory
             resident modules, then you should make sure that they do not
             extend below the maximum address used by the program.  The
             last memory address used by _M_o_d_e_l _4(_p) _K_E_R_M_I_T can be
             obtained by using the command

                  LOCAL MEMORY

             from within the _M_o_d_e_l _4(_p) _K_E_R_M_I_T program.














                                        - 25 -


             _8.  _I_n_s_t_a_l_l_a_t_i_o_n

                  To install _M_o_d_e_l _4(_p) _K_E_R_M_I_T, you must obtain the two
             files _M_4_B_O_O._B_A_S and _M_4_M_I_T._H_E_X.  Because of the size of the
             executable, the hex file could not be placed into a basic
             program as data statements.  Instead, the basic program
             opens and reads the file _M_4_M_I_T._H_E_X.  This file is an _A_S_C_I_I
             image of the executable.  All that needs to be done, is to
             run the _B_A_S_I_C program which will convert the file back to
             its original binary format.  The resulting executable should
             probably be called _K_E_R_M_I_T/_C_M_D.  Follow the prompts of the
             BASIC program and there should not be any problems.

             _9.  _B_u_i_l_d_i_n_g _M_o_d_e_l _4(_p) _K_E_R_M_I_T from the Source.

                  The Source for _M_o_d_e_l _4(_p) _K_E_R_M_I_T is in approximately 15
             modules.  The names of the modules are:

                  M4ADD/ASM      Code for miscellaneous routines.

                  M4CMD/ASM      Command parser code.

                  M4EQU/ASM      Mosts constants are defined here

                  M4FILE/ASM     Additional logfile code such as the LOG
                                 command, and the CLOSE command.

                  M4GET/ASM      Receive file routines + other miscel-
                                 lany.

                  M4KEY/ASM      Code for handling the SET KEY functions

                  M4LOG/ASM      INPUT, OUTPUT, PAUSE, PULSE commands.

                  M4MAC/ASM      Macros used in the program

                  M4MIT/ASM      Main entry and some command routines.

                  M4PKT/ASM      New packet routines for encoding and
                                 decoding packets.

                  M4RMT/ASM      The base of what will be the remote com-
                                 mand.

                  M4SEND/ASM     Send file routines.

                  M4SET/ASM      Set options routines.

                  M4SHOW/ASM     Show settings routines.

                  M4STR/ASM      The majority of storage, prompts, and
                                 messages.











                                        - 26 -


                  M4TERM/ASM     Terminal Emulation, and I/O routines.

                  M4WILD/ASM     Wild card file name processing.

                  M4XFER/ASM     File processing, and some packet stuff.

                  _M_o_d_e_l _4(_p) _K_E_R_M_I_T was developed using the _E_D_A_S assem-
             bler from Misosys.  Other macro assemblers should be able to
             assemble the program with minor conversions.  _M_4_M_I_T/_A_S_M is
             the main source module. It will call the other source files
             into the assembly (using the *GET directive) as needed.  If
             any system calls need to be changed, they are all defined in
             _M_4_A_D_D/_A_S_M for the most part.  All of the SVC's are coded in
             _M_4_A_D_D/_A_S_M as subroutines that are accessed by CALL Xaaaaa,
             where aaaaa is the name of the _T_R_S_D_O_S supervisor call (SVC)
             without the "@" sign.

                  If this version is moved to another OS, there are
             several things that you should consider.  The things that
             come to mind are:


                  1.   Consider the format of the TRSDOS directory struc-
                       ture.  The wild card routines depend on this
                       structure for validating directory entries, and
                       for retrieving the file name.

                  2.   There are 2 places where real time counting is
                       required.  The delay specified in a PAUSE state-
                       ment can be handled with a counter, as all other
                       processing is halted (except the interrupt tasks)
                       during the pause.  Currently, the Real Time Clock
                       task is used to measure the appropriate delay.
                       The other use of a Real Time counter occurs in the
                       Receive packet timeout.  This must be handled
                       using asyncronous processes in order to be accu-
                       rate.

                  3.   There exist code at the beginnning and end of the
                       segment that accesses the screen which outputs the
                       bytes 14, and 15 to the *DO device.  These are
                       used to force the cursor to be invisible before
                       the screen is accessed, and to then make it reap-
                       pear after the screen access is completed.

                  4.   The interrupt driven receiver must also be delt
                       with.  The code in the routine SETINT, establishes
                       the interrupt vector that the *CL driver will call
                       when a "character received interrupt" is gen-
                       erated.

                  5.   In many instances, the characters having values
                       16, and 17 are used to enable, and disable reverse
                       video respectively.  If the driver for *DO does









                                        - 27 -


                       not recognize this convention, as the current one
                       does, then these characters must be handled in
                       some manner.  I.E. either removed from the source,
                       or filtered from the terminal output stream.  The
                       PRTSTR() routine is a good place to mask these
                       characters at, as it is the sole source of output
                       for strings containing these type of characters.


                  It should be noted that _K_E_R_M_I_T/_C_M_D loads into RAM at
             6000H.  This avoids high memory filters and drivers, and
             also allows use of _T_R_S_D_O_S library commands that use low
             memory beyond 3000H, as FORMAT, and BACKUP do.  Exclusive
             use is made of the *DO device for screen output from the
             KERMIT program, for informational messages and the like.
             During connect mode, *SI and *SO are used as the input and
             output devices to allow filters to be attached that will not
             effect the operation of _M_o_d_e_l _4(_p) _K_E_R_M_I_T during command
             operations.  If you install a different driver or filter it
             must be compatible in these areas.

             _1_0.  _P_e_r_f_o_r_m_a_n_c_e _S_p_e_c_i_f_i_c_s _o_f _M_o_d_e_l _4(_p) _K_E_R_M_I_T

                  The _M_o_d_e_l _4(_p) _K_E_R_M_I_T has been tested and proven to
             work properly at 9600 BAUD with flow control on, transfer-
             ring files between 2 Model 4's.  What makes the _M_o_d_e_l _4(_p)
             _K_E_R_M_I_T perform so well is the idea of flow control, and the
             interrupt driven receiver.  With out these features, I
             expect that 2400 baud would be the reliable limit.  Flow
             control can be disabled at speeds less than or equal to
             ~2400 baud, but greater speeds require that flow control be
             functional in order to protect the integrity of data in the
             input buffer.




             _1_1.  _T_h_e _H_e_a_t_h _1_9 _F_i_l_t_e_r

                  The files _M_4_H_1_9_1._A_S_M, _M_4_H_1_9_2._A_S_M, _M_4_H_1_9._M_A_C, and
             _M_4_H_1_9._E_Q_U make up the sources for a Heath 19 terminal emula-
             tion filter for the TRS-80 Models 4 and 4p.  The assembler
             used was EDAS by Misosys.  To build the filter from sources,
             you need the above 4 files on a disk.  _M_4_H_1_9_1._A_S_M is the
             main source module, and it *GETs all the other necessary
             files.

                  The structure of the program is pretty simple.  Single
             character (non escape) sequences, are passed to the filtered
             device via the @_C_H_N_I_O svc.  This filter depends on the
             _T_R_S_D_O_S *_D_O driver being at the end of the chain.  Several
             control characters are merely translated, and then the new
             values are passed to *DO.










                                        - 28 -


                  A multi-character escape sequence is handled by
             remembering the previous characters that the filter was
             passed.  The previous characters are remembered by the pres-
             ence of a non-zero value in the contents of _S_T_A_T_E.  The
             value in _S_T_A_T_E represents the address of the code to handle
             the next character, given the previous string of characters.

                  The filter is relocatable, but _M_U_S_T reside below screen
             memory because it accesses it directly when performing
             several of the advanced terminal functions.  For this rea-
             son, it will never load _a_b_o_v_e _F_3_f_f_H.

             _1_2.  _T_h_e _S_E_T_H_1_9 _P_r_o_g_r_a_m

                  The _S_E_T_H_1_9 program allows you to configure a few
             options that are available to you when using the _H_1_9 _f_i_l_t_e_r.
             The _S_E_T_H_1_9 program is created from the sources _M_4_H_1_9_S._A_S_M,
             _M_4_H_1_9._E_Q_U, and _M_4_H_1_9._M_A_C.  _M_4_H_1_9_S._A_S_M is the main source
             module, and will *GET the other 2 files. The program sup-
             ports a few parameters that are listed below.


                  REMOVE         Remove and reclaim if possible.

                  DURATION       Length of BELL tone.

                  FREQUENCY      Frequency value (bigger value is lower
                                 tone) for BELL.

                  BELL           Turn audible BELL ON or OFF.

                  BLOCK          Block cursor character.

                  CURSOR         Normal cursor character.

                  STRIP8         Control display of 8 bit data.

                  HELP           Displays information similiar to this.

                  SHOW           Displays the current settings of the
                                 parameters, this is the default.

             These options are specified when you invoke _S_E_T_H_1_9, as per
             the usual TRSDOS 6.x parameter list.  An example is shown
             below:

                  SETH19 (BLOCK=191,CURSOR=23,BELL=ON,SHOW)

                  This command sets the normal CURSOR, and the edit mode
             CURSOR values, as well as turning the audible bell on.  The
             show parameter causes 2 lines similiar to those below to be
             printed on the screen.

                  Normal Cursor: 23, Block Cursor: 191









                                        - 29 -


                  Bell: ON, Frequency: 20, Duration: 120
                  Strip8: ON


                  The REMOVE option takes several things for granted, as
             it tries to thoroughly remove the device.  It assumes that
             the H19 filter is attached to the *HP device, and that this
             device is a filter hooked to *SO.  Further more, it assumes
             that *SO is routed to *DO.

                  This particular set up can be used easily if the fol-
             lowing commands are used to set up the filter:

                  SET *HP H19/FLT FILTER *SO *HP

             This is assuming that *SO is routed to *DO.  The SETH19 com-
             mand will perform these very operations if you invoke it,
             and the memory module, $_H_E_A_T_H, is not in place.

                  The other parameters to the SETH19 command can be used
             to control certain preferable options to the filter.  Set-
             ting _B_E_L_L off causes the filter to flash the screen when it
             receives an ASCII(7) character.  If BELL is set _O_N, then an
             audible bell is issued when an ASCII(7) is received.

                  When BELL is ON, then the _D_U_R_A_T_I_O_N, and _F_R_E_Q_U_E_N_C_Y
             parameters take effect.  These 2 parameters select the
             length and pitch, respectively, of the BELL tone.  The FRE-
             QUENCY value is used as a delay between oscillations of the
             sound port, so the bigger the number, the lower the tone
             will be.

                  The _d_e_f_a_u_l_t _D_U_R_A_T_I_O_N is set to 20, and the FREQUENCY is
             set to 125.  You can adjust them as you please.  The DURA-
             TION is inversely proportional to the FREQUENCY, since the
             delay caused by the FREQUENCY value is part of the overall
             DURATION of the sound.  This means that as you increase FRE-
             QUENCY, you must _d_e_c_r_e_a_s_e DURATION to maintain the same
             length of BELL, and vice-versa.

                  The _B_L_O_C_K and _C_U_R_S_O_R parameters are used to control the
             characters that are used as the cursor by the H19 filter.
             The H19 terminal has the ability to use a visual mode cur-
             sor, or a line mode cursor.  Since the normal visual mode
             cursor is usually a block cursor, the parameter BLOCK is
             used to set the ASCII value of the visual mode cursor.  The
             CURSOR parameter sets the normal line mode cursor.

                  The switch between cursors must be done by the HOST
             computer that is attached to the Model 4's communications
             port.  There is no magic to when the BLOCK cursor is
             selected, see the description of the recognized control
             sequences below.










                                        - 30 -


                  The STRIP8 parameter controls whether or not data is
             printed on the screen with the eighth bit set.  Normally,
             the filter now trims the eighth bit off so that parity can
             be ignored.  The command

                  SETH19 (STRIP8=NO)

             will cause the eighth bit to not be stripped.  That is to
             say, data will be used as it is received by the filter.
             Note that when this is done, some control characters with
             parity bits attached may not be recognized.


             _1_3.  _F_u_t_u_r_e _m_o_d_i_f_i_c_a_t_i_o_n_s

                  It should be fairly straight forward to build extra
             states into the filter so that it will recognize the ANSI
             3.64 sequences for the operations the filter knows how to
             perform.  Full support of all the ANSI 3.64 sequences would
             be a non-trivial investment in time.  The best bet here
             would, be a completely new device driver, since the overhead
             of going to *DO is already costly, and trying to implement
             scroll regions with *DO would be a HACK at best.  If some-
             body wants to do the conversion, I would like to have a copy
             of the result.

             _1_4.  _H_E_A_T_H-_1_9 _f_i_l_t_e_r _c_a_p_a_b_i_l_i_t_i_e_s

                  The HEATH-19 terminal supports several advanced video
             capabilities that make it an ideal source for a terminal
             emulation package.  Below is a list of the functions sup-
             ported by the Model 4(p) H-19 emulator, and the escape
             sequences that perform the operations.

             _1_5.  _H_e_a_t_h/_Z_e_n_i_t_h-_1_9 _C_o_n_t_r_o_l _C_o_d_e_s

                  The  Heath/Zenith-19 terminal is equivalent to the DEC
             VT52 with extensions for line and character insertion and
             deletion.  Items marked with an  asterisk  are not currently
             supported by Model 4(p) H19 emulation.


             Cursor Functions

               Sequence    Mnemonic    Definition
                ESC H      HCUH        Cursor Home
                ESC C      HCUF        Cursor Forward
                ESC D      HCUB        Cursor Backward
                ESC B      HCUD        Cursor Down
                ESC A      HCUU        Cursor Up
                ESC I      HRI         Reverse Index
               *ESC n      HCPR        Cursor Position Report
                ESC j      HSCP        Save Cursor Position
                ESC k      HRCP        Set Cursor to Previously Saved Position









                                        - 31 -


                ESC Y      HDCA        Direct Cursor Addressing, 1-based:
                                       31+line# 31+col# (same as VT52)



             Erasing and Editing

               Sequence    Mnemonic    Definition
                ESC E      HCD         Clear Display (Shift Erase)
                ESC b      HBD         Erase Beginning of Display
                ESC J      HEOP        Erase to End of Page (Erase Key)
                ESC l      HEL         Erase Entire Line
                ESC o      HEBL        Erase Beginning of Line
                ESC K      HEOL        Erase to End of Line
                ESC L      HIL         Insert Line
                ESC M      HDL         Delete Line
                ESC N      HDCH        Delete Character
                ESC @      HEIM        Enter Insert Character Mode
                ESC O      HERM        Exit Insert Character Mode



             Configuration

               Sequence    Mnemonic    Definition
               *ESC z      HRAM        Reset to Power-Up Configuration
               *ESC r Bn   HMBR        Modify Baud Rate: Bn=
                                         A=110, B=150, C=300, D=600, E=1200,
                                         F=1800, G=2000, H=2400, I=3600, J=4800,
                                         K=7200, L=9600, M=19200


                ESC x Ps   HSM         Set Mode(s): Ps=
               *                         1 = Enable 25th line
               *                         2 = No key click
               *                         3 = Hold screen mode
                                         4 = Block cursor
                                         5 = Cursor off
               *                         6 = Keypad shifted
               *                         7 = Alternate keypad mode
                                         8 = Auto line feed on CR
                                         9 = Auto CR on line feed


                ESC y Ps   HRM         Reset mode(s): Ps=
               *                         1 = Disable 25th line
               *                         2 = Enable key click
               *                         3 = Exit hold screen mode
                                         4 = Underscore cursor
                                         5 = Cursor on
               *                         6 = Keypad unshifted
               *                         7 = Exit alternate keypad mode
                                         8 = No auto line feed
                                         9 = No auto CR









                                        - 32 -


               *ESC <      HEAM        Enter ANSI Mode

             Modes of Operation

               Sequence    Mnemonic    Definition
               *ESC [      HEHS        Enter Hold Screen Mode
               *ESC \      HXHS        Exit Hold Screen Mode
                ESC p      HERV        Enter Reverse Video Mode
                ESC q      HXRV        Exit Reverse Video Mode
               *ESC F      HEGM        Enter Graphics Mode
               *ESC G      HXGM        Exit Graphics Mode
               *ESC t      HEKS        Enter Keypad Shifted Mode
               *ESC u      HXKS        Exit Keypad Shifted Mode
               *ESC =      HAKM        Enter Alternate Keypad Mode
               *ESC >      HXAM        Exit Alternate Keypad Mode



               Additional Operations

               Sequence    Mnemonic    Definition
               *ESC }      HDK         Keyboard Disable
               *ESC {      HEK         Keyboard Enable
               *ESC v      HEWA        Wrap Around at End of Line
               *ESC w      HXWA        Discard at End of Line
               *ESC Z      HID         Identify as VT52 (ESC / K)
               *ESC ]      HX25        Transmit 25th Line
               *ESC #      HXMP        Transmit Page



               Enhanced Character Support

                ESC [ p1 ; ... pn m    Set Graphics Rendition
                where p1, ..., pn are chosen from the following:
                *0            Reset to normal character display.
                *1            Display characters in high intensity.
                *4            Display characters underlined.
                *5            Display characters blinking.
                *7            Display characters in reverse video.



                  The  Heath-19  transmits  the following sequences,  but
             it  will  not  respond  to them if they are received.  Model
             4(p) Kermit will transmit them only if they  are  programmed
             with SET KEY.

                ESC S      HF1         Function Key #1
                ESC T      HF2         Function Key #2
                ESC U      HF3         Function Key #3
                ESC V      HF4         Function Key #4
                ESC W      HF5         Function Key #5
                ESC P      HF7         Function Key #7









                                        - 33 -


                ESC Q      HF8         Function Key #8
                ESC R      HF9         Function Key #9

                  My thanks to Michael Carter and Roland Stolfa for their
             help in testing and debugging this implementation.


             Gregg Wonderly
             Department of Computing and Information Sciences
             Oklahoma State University


             UUCP: {cbosgd, ea, ihnp4, isucs1, mcvax, uokvax}!okstate!gregg
             ARPA:  gregg@A.CS.OKSTATE.EDU














































                                    