home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
archives
/
trs80model4.zip
/
m4mitdoc.txt
< prev
next >
Wrap
Text File
|
1986-10-22
|
98KB
|
2,179 lines
_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