www.pudn.com > pccp047.zip > MANUAL
Pete Cann's Communication Package
Portions Copyright (C) 1992 Peter Edward Cann
(Please see the file README for legal junk)
This is a set of programs and data files for communication between a
PC and something external, possibly over a modem. It is drastically
different from most other communications programs, in that it is
highly modular and generally requires the user to write batch files
and/or scripts to make use of it. This is what you might call a
"hacker style" paradigm (not to be confused with "cracker", generally
an infantile individual who feels so insignificant that they screw
other people in a desperate attempt to feel powerful). Hackers are
people who are very comfortable with computers, and like to have a
lot of control and to know what's going on. The source code for all
of these programs is included in the distribution, so if you know C
you have all the information I do now.
All of the programs give USAGE: information if invoked without
arguments. All of the programs that use a port can use COM 1 through
8, but COM 5 and 6 are only for AT and later machines and have not
been tested.
The centerpiece of the package is TERM. This is a terminal emulator.
It takes an emulation file, which you create or modify with EMUED.
EMUED lets you specify strings to send for any programmable key, and
lets you enter strings of characters and substitution tokens to
invoke functions. These would be the "escape sequences", although
they need not begin with Escape. The token codes are in EMU.H. The
emulation facility also provides a graphics character substitution
table for graphics character commands. TERM and EMUED look in the
directory named by the PCCPPATH environment variable for emulation
files, if PCCPPATH is set. The program CCODES types a hex listing of
display character codes for use when assigning graphics characters in
EMUED.
TERM generates a CRLF in response to a Linefeed character, so it is
often desirable to program an emulation to do a DOWN in response to a
Linefeed. For LF insertion, the function CRLF can be performed in
response to a CR. If the emulation file basename is prefixed with a
plus sign (+), local echo is activated.
The program TERMPLAY will step a file through an emulation.
The program MASTERM invokes term with the three or four arguments,
but if you exit TERM you get a menu for file transfers or beginning a
dribble file. The file transfer programs are three variations on
XMODEM in each direction, and have fairly clear names.
The program SESSION is a simple host program, for use AFTER password
validation by the script facility. It is hard-coded for 8n1 bits. It
expects the modem to be in AT&C1 mode, that is, Carrier Detect
conveys information. The last (optional) two arguments to SESSION are
directories for download and upload. If they are given, they are
prepended to the entered pathname in file transfer operations. If a
directory is given, dot-dot (..) is prohibited in pathnames and the
Shell option is not available.
The environment of any subschell contains REMOTE=YES, so you can do
IF NOT "%REMOTE%"=="YES" THING
in a batch file, where THING is something that would be bad to do
from a comport, such as run a display editor. SESSION terminates if
Carrier Detect goes false, unless it is running the shell.
The program MESSIN accepts a message from the port and appends it to
the specified file. This is for email to the sysop. The program
MESSOUT asks for a filename in the specified directory and displays
it with pagination. Security is achieved through sparse naming.
The program COMSCRPT runs scripts. It is very powerful, with multiple
branching look-fors, timeouts and retry limits.
The script file must have the extension ".SCR". If the PCCPPATH
environment variable is set, the program looks for the script there.
The program loads the script into RAM and then executes it. Lines are
limited to 80 characters. The number of lines is limited to 512.
The characters '|' and '~' are special. '|' means CR in < lines and >
lines (LF is stripped for > processing); and newline in ! lines. '~'
means 0.4 second delay in < lines and bell in ! lines. (In > lines it
means itself.) Also, in < and > lines, `xx (backquote followed by two
hex digits) expands to the specified character code. Letters in the
hex number may be either case. There is no validity checking. Also in
< lines, ^ means break. To send a magic character, use its hex code
with a backquote.
The first line of the script file is the first three arguments as for
TERM, space-delimited. In subsequent lines, the first character of
each line is the command; the rest of the line (after the delimiting
space) is argument(s). A final string argument may include spaces,
and begins after the delimiting space. Blank lines are ignored.
The command characters are as follows:
;
{introduces comment; line ignored; space not required}
:
{label for conditional or unconditional goto}
g