home *** CD-ROM | disk | FTP | other *** search
-
-
- 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.
-
- 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 TERM environment variable for emulation files,
- if TERM is set. The program CCODES types a hex listing of display
- character codes for use when assigning graphics characters in EMUED.
-
- 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 HOST is a simple one-password host. It is hard-coded for
- 8n1 bits. It expects the modem to be in AT&C1&D2 mode, that is,
- Carrier Detect conveys information and Data Terminal Ready controls
- hookswitch. The shell has no extra protection, because calling the
- FTP protocols creates a potential trap-door situation anyway. The
- host program presently only operates at the specified speed, because
- I don't off-hand know a neat way to autobaud. Lots of modems these
- days speed-buffer anyway. 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.
-
- 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 TERM
- 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 255.
-
- 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.)
-
- 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}
-
- : <decimal number 0-255>
- {label for conditional or unconditional goto}
-
- g <label #>
- {goto label #}
-
- r <label #> <retries>
- {resets retry count and goes to label if hit more than retries}
-
- p <seconds>
- {processes pending look-fors; falls through upon timeout}
- {clears pending look-for list upon completion}
-
- > <label #> <string>
- {look for string upon p command; if hit goto label}
- {incoming linefeeds ignored}
-
- ? <label #>
- {goto label if Clear To Send or Tx Hold Reg Empty is false}
-
- < <string>
- {send string to port}
-
- ! <string>
- {send string to console}
-
- s <label #> <command line string>
- {run system command line and wait for termination}
- {goto label # if error in running command.com}
- {will not report errors within command string}
-
- q <exit code>
- {quit with exit code}
- {codes other than zero under 128 are reserved to internals}
-
- When scripting modem commands, which is how you're intended to
- configure and dial the modem, try a ~ before and after the at, for
- instance:
-
- < ~at~&f&c1&d2|
-
- The program SCRCHK types a listing of the argument script file giving
- statement numbers, which are not the same as line numbers. It leaves
- out blank lines for some reason. It also detects some errors.
-
- All of the I/O programs except TERM pay attention to CTS. None of
- them do XON/XOFF. The computer is assumed to be fast enough to keep
- up. However, since DOS video is very slow, TERM will suspend display
- if a buffer overrun threatens.
-