home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / BEEHIVE / COMMS / MEX4BEE.ARC / MEX10.DOC < prev    next >
Text File  |  1990-09-20  |  62KB  |  1,503 lines

  1.  
  2.           MEX: a Modem Executive for CP/M-80
  3.  
  4.         Copyright (C) 1984 by Ronald G. Fowler
  5.               All Rights Reserved
  6.             
  7.  
  8.  
  9.  
  10.  
  11. 1) Overview: What is MEX?
  12.  
  13. MEX is an acronym (sort of) for Modem EXecutive; its purpose is to build upon
  14. the capabilities provided by various terminal emulation and file transfer pro-
  15. grams written for CP/M-80.  MEX provides, in one program, a phone-number lib-
  16. rarian and editor (supporting mnemonnic 12-character names for phone numbers
  17. and load/save for phone number files), a powerful autodialer (allowing lists
  18. of numbers to be called repeatedly until one answers with a modem tone; the
  19. entire list may be repeated any number of times), a file transfer facility
  20. supporting three common protocols (and "batch" file transfers), a "dumb-
  21. terminal" emulator that includes the ability to dynamically define multiple-
  22. line character strings under a single key (and save/load sets of keystrings
  23. to and from disk files), a STAT command that allows you to examine and change
  24. a wide range of operating parameters (especially useful with the CLONE command,
  25. which allows you to save a new copy of MEX to disk, including any currently
  26. defined phone numbers and keystrings), a batch-command file processor that al-
  27. lows the program to take its input from a disk file (allowing unattended use
  28. of MEX), and an on-line help facility (employing CP/M's random-access file
  29. accessing functions for quick access) that completely documents the program.
  30.  
  31. MEX combines the capability of many public domain utilities, and is a super-
  32. set of such programs as MODEM2, MODEM7 and MDM.  MEX provides more function-
  33. ality than many commerical programs, and is gaining ground on the top-of-the-
  34. line modem packages, such as Microstuf's Crosstalk (TM).  But enough horn
  35. blowing ... let's get on with the Real Neat Stuff.
  36.  
  37.  
  38. 2) Getting started: the physical modem overlay
  39.  
  40. First, let me note that MEX, as distributed, contains no modem I/O at all;
  41. it will run on your computer as is (in fact, you can do an initial evaluation
  42. of MEX in this fashion), but commands dealing with the modem will elicit
  43. an error message.  To be fully functional, MEX needs modem driver code (writ-
  44. ten in 8080 assembly language) installed within itself; this driver code is
  45. called the physical modem overlay.
  46.  
  47. If you're a user of Irv Hoff's MDM7 program, you have an easy progression path:
  48. MEX uses a compatible overlay format, and thus almost any MDM overlay may be
  49. loaded directly into MEX.  In fact, you can use the MLOAD program distributed
  50. with MEX to install the overlay relatively painlessly (the use of the dreaded
  51. DDT is not required).
  52.  
  53. If you don't have an MDM7 overlay, you'll have to write your own, or, if
  54. you're not proficient in assembly language programming, find someone to write
  55. one for you.  If you have to take this route, use the PMMI overlay distributed
  56. with MEX (named MXO-PMxx.ASM, where xx is the revision level) as a model.
  57. This file is a full-featured overlay, containing modem dialing drivers and
  58. a fully functional SET command (SET is a user-defined command, used for such
  59. things as baud-rate selection, answer/originate modem setup, etc).  You can
  60. implement as little or as much of the "fancy stuff" as you like.  If you
  61. re-distribute your overlay, please follow the naming conventions I've estab-
  62. lished for MEX overlay files:  "MXO-nnxx.ASM", where nn is a 2-letter code
  63. identifying the overlay, and xx is the revision level.
  64.  
  65. Once you have an overlay file, assemble it with ASM or MAC, then bind it into
  66. the system with MLOAD.  The following example assumes you're using the PMMI
  67. overlay; if not, just substitute the name of your overlay for MXO-PM10:
  68.  
  69.     ASM MXO-PM10                <<--- assemble the overlay
  70.     MLOAD MEX.COM=MEX10.COM,MXO-PM10    <<--- load a new MEX.COM
  71.  
  72. If you have a Smartmodem (Hayes, USR, etc), you'll want to take advantage
  73. of the Smartmodem logical overlay (MEX has no inbound Smartmodem code); this
  74. overlay locates at the top of the overlay area (about 500 bytes from 0B00H),
  75. and will work with any physical overlay that terminates before 0B00H (most
  76. do).  It provides autodialing capabilities and, optionally, modem disconnect
  77. facilities, using Smartmodem command strings.
  78.  
  79. Use the following example as a guide for installing the Smartmodem overlay
  80. and your physical overlay simultaneously (the Smartmodem overlay is named
  81. MXO-SMxx.ASM -- xx is the revision level -- and M7IN-3.ASM is the name of a
  82. typical MDM7 overlay; replace the former with the name of your own overlay):
  83.  
  84.     ASM M7IN-3                <<--- assemble phys. overlay
  85.     ASM MXO-SM10                <<--- asm. Smartmodem overlay
  86.     MLOAD MEX.COM=MEX10.COM,M7IN-3,MXO-SM10 <<--- build new MEX.COM
  87.  
  88. (The order is important in the MLOAD command line due to the structure
  89. of most MDM7 overlays).
  90.  
  91. Some notes about the preceeding discussion:
  92.  
  93. The version of MLOAD used MUST be 2.0 or greater; earlier versions didn't
  94. have the ability to load a HEX file over a non-HEX file.
  95.  
  96. A very few MDM7 overlays are not compatible; such overlays are typified by
  97. the requirement that they be revised with each succeeding revision of MDM7.
  98. These overlays typically implement dialing facilities for unusual modems 
  99. (actually non-PMMI and non-Smartmodem), and require specific addresses with-
  100. in MDM7 in order to function.  This was necessary because MDM7 does not pro-
  101. vide a redefinable interface for dialing code (in spite of the overlay table
  102. entry present for the dialing routine), and worked 'naturally' only with
  103. Smartmodems and PMMIs.  As a result, the majority of overlays written do
  104. not contain any dialing code, and thus will function correctly with MEX
  105. (note that MEX allows a fully re-definable dialing vector -- see MXO-PMxx.ASM
  106. for details -- and thus may be extended for use with virtually any modem).
  107.  
  108. 3) Some precepts: Filespecs, string arguments, and multiple command-lines
  109.  
  110. Before detailing MEX's command set, there are a few topics we must address
  111. that apply generally throughout MEX.
  112.  
  113. MEX supports the same drive/user specification for files as Rick Conn's
  114. ZCPR and ZCPR2: A file may be prefixed by either the drive name, the user
  115. number or both (this extends to batch file transmissions).
  116.  
  117. Examples:
  118.  
  119.         [MEX] A3>>SB B3:*.ASM A9:*.OBJ C6:UPDATE.DOC
  120.         [MEX] A0>>DIR A12:*.SUB
  121.         [MEX] B3>>TYPE 5:REPORT.DOC
  122.         [MEX] C3>>T B6:SESSION.LOG
  123.  
  124.  
  125. LOGGING DRIVES:  MEX supports relogging drive/user in two ways, both of
  126. which are pertinent to a discussion of DU specifications:
  127.  
  128.    - LOG command: Takes optional DU spec (trailing colon optional)
  129.                   resets disk system
  130.    - At command prompt: simply enter the DU spec (colon required)
  131.  
  132. Examples:
  133.  
  134.                 [MEX] A0>>LOG        (relogs current d/u: resets system)
  135.                 [MEX] A0>>LOG B:     (relogs current user, drive b, resets)
  136.                 [MEX] A0>>LOG B7:    (relogs drive b, user 7, resets)
  137.                 [MEX] A0>>B:         (logs current user, drv B, no reset)
  138.                 [MEX] A0>>A9:        (logs drive A, user 9, no reset).
  139.  
  140. Several MEX command take string arguments.  These strings must be sur-
  141. rounded by quotatation marks, and may contain imbedded control char-
  142. acters (with the singular exception of binary zero, which will generate
  143. an argument error).  The caret ("^") is used to prefix a control char-
  144. acter.
  145.  
  146. Thus, you can specify multi-line strings within one string specification.
  147. Examples (note that that the control-character ^M is the carriage-return
  148. code, and ^J is a linefeed):
  149.  
  150.         KEY A="BILL USER;J^MWHATSNEW^MB:^MWHATSNEW^M"
  151.         SENDOUT "SD B:*.ASM^MCRCK *.BIN^M"
  152.  
  153. Additionally, the slant character ('/') may be used to denote several common
  154. control-character sequences:
  155.  
  156. /R    specifies a newline (Carriage return code only; same as ^M)
  157. /N    specifies carriage-return+linefeed
  158. /T    specifies a tab
  159. //    specifies the '/' character
  160. /Onnn specifies any binary value (except 0): nnn is the decimal value (all
  161.       three digits must be present)
  162.  
  163. Note that the command-separator character may be included freely within
  164. a string; it separates your command strings outside of quotation marks
  165. only.
  166.  
  167. MEX  supports multiple commands on a line, both in READ files, and in dir-
  168. ectly typed commands.  A command line may optionally be entered on the CP/M
  169. invocation command line, and this line may also contain multiple commands.
  170. Note that a READ command will "stack" any current multiple commands; when
  171. input from the READ file is exhausted, the remaining commands will then be
  172. executed (a control-C at any time will abort a running READ file and/or a
  173. multiple command line).
  174.  
  175. The multiple command separator in the file as distributed is the semi-
  176. colon ";").  This character may be changed with the STAT command ("STAT ESC")
  177. or in the patch file.
  178.  
  179. Examples:
  180.  
  181.    from CP/M:
  182.  
  183.         A>MEX DIR;READ MYFILE.MEX;SENDOUT "LOGOUT";BYE
  184.  
  185.         This example will bring up MEX, which will first print the directory,
  186.         then begin executing MYFILE.USE, which may conain SENDOUT commands and
  187.         R commands to send and receive files. When input from MYFILE.MEX is
  188.         exhausted, MEX will send the string "LOGOUT" to the remote.  Finally,
  189.         MEX will execute the "BYE" command.
  190.  
  191.    from MEX:
  192.  
  193.                 A3>>COMMAND: RB;SENDOUT "BYE";BYE
  194.  
  195.         This one receives a batch transmission, sends the string "BYE" (grace-
  196.         fully logout from a remote CP/M system, for example), then disconnects
  197.         and exits to CP/M.
  198.  
  199.  
  200.  
  201. 4) Terminal mode
  202.  
  203. MEX terminal mode is entered with any of the single-character commands T, L,
  204. or E (the differences among the three will be explained shortly).
  205.  
  206. While in terminal mode, you are communicating with the remote end as a console;
  207. your keyboard characters are transmitted to the remote, and the remote char-
  208. acters are displayed on your screen.
  209.  
  210. There are several functions that are available to you from terminal mode,
  211. all of which are invoked by typing the escape-character (do "STAT ESC" at
  212. command level if you don't know your escape character) followed by one of
  213. several characters; this combination is called an "escape-sequence".
  214.  
  215. Terminal mode escape-sequences: 
  216.  
  217. <ESC>-E         exits back to command level
  218. <ESC>-?         prints a menu of escape sequences
  219. <ESC>-S         start copying incoming text into file buffer (see below)
  220. <ESC>-U         end (un-start) copying text into file buffer (see below)
  221. <ESC>-P         toggle copy-to-printer on/off (if enabled with STAT LIST)
  222. <ESC>-T         transmit a file to the remote (prompts for a filename)
  223.  
  224. Note that <ESC>-S and <ESC>-U require a filename argument with the T when
  225. you enter terminal mode (otherwise, there is no file active to write the
  226. incoming text into).
  227.  
  228. You can use <ESC>-P to copy incoming text to the printer.  The text is held
  229. in a buffer, and prints only as the printer is ready for a character. Thus,
  230. your printer may be slower than the modem, and you won't lose characters un-
  231. less the buffer fills up.
  232.  
  233. Terminal-mode files (also called CAPTURE or ASCII-SAVE files) are created
  234. by entering a filename with the T (or E or L) command; if the file already
  235. exists, you will be asked if the file should be erased. MEX will create the
  236. new file, and enter terminal mode.  You may also append to an existing file
  237. by specifying the "A" secondary option (explained in more detail later).
  238.  
  239. At this point, incoming text is not yet being saved; to start saving text,
  240. you must use the <ESC>-S terminal-mode command.  You can stop the save by
  241. using the <ESC>-U command.  You can perform as many start/stop sequences as
  242. you like (when text-save is active, you'll see a colon at the start of each
  243. line as a visual signal that the save is active).
  244.  
  245. You can exit terminal mode and move freely among drives and user areas with-
  246. out affecting an open term-file. The LOG command (used to change drive/user
  247. and reset the disk simultaneously) will not be functional.
  248.  
  249. If you enter terminal mode with the T,E or L command WITH a filename, when
  250. a file is already open, the open file will be closed, and the new one opened.
  251.  
  252. You can transfer files using either Christensen or CIS protocols while a
  253. TERM file is open -- your buffer may be written to disk to make room, but
  254. nothing will be lost, and the file will still be open.
  255.  
  256. To close the file when you're done saving text, exit terminal mode with
  257. <ESC>-E, and use the WRT command.  If you change your mind, and decide you
  258. don't want to keep the file after all, use the DEL command to erase the
  259. file entry and delete any text already saved in memory.
  260.  
  261. When your printer or ASCII-save buffer fills, MEX will send ann X-OFF char-
  262. acter to the remote.  MEX will then wait for the remote to stop, and will
  263. save up to an additional 150 characters into an auxiliary buffer (this buf-
  264. fer may be increased in size by modifying MEXPATxx.OVR).  When the remote
  265. stops (or the auxiliary buffer fills) MEX will write the ASCII-save buffer
  266. to disk (if ASCII-save is active) and print characters until the printer
  267. buffer is half-full (if List-copy is on).  Then MEX will re-start the remote
  268. by sending an X-OFF character.
  269.  
  270. Note that for this scheme to work, the remote computer must respond to this
  271. X-ON/X-OFF "protocol" (most computers do, but *not* all!).
  272.  
  273. You can transmit a local disk file to the remote with <ESC>-T; you will be
  274. prompted for a filename.  If you have the XON and and XLINE variables turned
  275. off (succeeding sections document these) MEX will ask if you want to use the
  276. character and line delays for the filesend; these delays allow slow remote
  277. computers to receive files.
  278.  
  279. The WCHAR and WLINE variables (see corresponding sections) determine the
  280. time-delay values for each character, and each lines respectively (of course,
  281. you must have answered "Y" to the "want delays?" prompt.
  282.  
  283. If either of the the XLINE or XON switches is ON, the delay prompt will be
  284. skipped, and delays will not be used.
  285.  
  286. XLINE is a technique used by some mainframes: after a line is transmitted,
  287. MEX will not transmit another until receiving an X-ON character from the
  288. remote.
  289.  
  290. XON is more frequently used: when XON is active, MEX will send characters
  291. at full speed, but monitor the remote for an X-OFF character.  When an X-OFF
  292. is received, MEX will pause until the remote sends an X-ON character.
  293.  
  294. The APPEND secondary option:
  295.  
  296. MEX has a special feature that allows you to maintain 'log' files of your
  297. sessions; this is the 'A' secondary option (specified with the T, E or L
  298. primary commands when entering terminal mode IF a filename is specified).
  299.  
  300. When you specify the 'A' secondary option, MEX will search the logged area
  301. (and/or the ALT area: see the ALT command description in section 7 for more
  302. information on searching) for the file specified.  If found, MEX will scan
  303. to the end of the file, and append new data on to the end, rather than
  304. querying for an erase.
  305.  
  306. If 'A' is not specified, MEX will limit its search to the currently logged
  307. DU, and, if the file is found, will ask you if it should erase the file.
  308.  
  309. In either case, if the file is NOT found, MEX will create a new file in
  310. the currently logged DU.
  311.  
  312.  
  313. 5) Single-character commands
  314.  
  315. The most commonly used MEX commands are implemented as single character com-
  316. mands, for ease of use.  These are:
  317.  
  318. S: Send a file or group of files using Christensen protocol
  319. R: Receive a file or group of files using Christensen protocol
  320. T: Enter terminal mode (may specify an optional ASCII-save file argument)
  321. E: Enter terminal mode with echo (also takes optional filename argument)
  322. L: Enter terminal mode with local-echo only (filename ok here too).
  323.  
  324. T, E, and L are all variations of terminal mode: T sends keyboard characters
  325. to the remote and prints characters received from the remote on the console.
  326. E mode echoes received characters back to the remote ("half duplex" mode), and
  327. L echoes keyboard characters on the console before they go out to the remote
  328. ("half duplex" in the other direction).
  329.  
  330.  
  331. 6) Secondary commands (options)
  332.  
  333. The SECONDARY options are used only after the single-character commands,
  334. and modify the way the single-character commands work.  Following is a
  335. list of the secondary command options:
  336.  
  337.                         COMMANDS
  338. OPT       NAME          USED WITH       ACTION
  339. ---     --------        ---------       ------
  340. A       Append          E,L,T           Append to a terminal-mode file
  341. B       Batch           R and S         BATCH mode, Christensenr file transfers
  342. D       Disconnect      R and S         Disconnects after a file transfer
  343. L       Local           T,E             Local-character echo
  344. Q       Quiet           R and S         Sets "quiet mode" for file transfers
  345. R       Recv-view       R and S         Shows received-characters only
  346. S       Send-view       R and S         Shows transmitted characters only
  347. T       Terminal-mode   R and S         Enter terminal mode after file xfer
  348. V       View            R and S         Views the file transfer in ASCII
  349. X       Exit            R and S         Disconnect and exit after transfer
  350.  
  351. Note that the options used with R and S are also effective with CIS transfers
  352. (except for the 'B' option), if set with the GLOBAL command (see the command
  353. description for "GLOBAL" in section 7). 
  354.  
  355. Examples of secondary options:
  356.  
  357.  
  358. Primary --+
  359. Command   |+++-->secondary commands
  360.           ||||
  361.           |\ /
  362. [MEX] A0>>ST   MYFILE.FOO       <<== send MYFILE.FOO, go into Term. mode after
  363. [MEX] B9>>RVT  CRACKER.JAK      <<== receive file with view, enter Term mode
  364. [MEX] A3>>RQX  MONKEY.SHN       <<== recv file quietly, disconnect/exit after
  365. [MEX] A0>>RBT                   <<== recv batch files, Terminal mode after
  366. [MEX] A0>>T    DISKFILE.SAV     <<== enter term. mode, allow save to disk file
  367.                                 (note that the actual copy to the file must be
  368.                                 activated with ESC-S while in terminal mode)
  369. [MEX] B3>>TA   DISKFILE.SAV     <<== Enter tr area. The command
  370.  
  371.  
  372. 7) Command descriptions
  373.  
  374. Following is a list of the command set recognized by MEX.  In general, the
  375. bracket characters denote optional items, and should not be entered literally.
  376. For example, the syntax descriptor
  377.  
  378.         DIR [<du-spec>]
  379.  
  380. means that the du-spec is optional; hence, the command syntax may be satisfied
  381. with any of the following actual command lines:
  382.  
  383.         DIR
  384.         DIR A3:
  385.         DIR 0:
  386.  
  387. Items surrouded in angle-brackets denote an item's type; the angle brackets
  388. should not be included in the actual command line, nor should the description
  389. inside the angle brackets be entered literally.  In the above example, the
  390. descriptor <du-spec> is replaced with an actual drive/user specification.
  391.  
  392. --------------------
  393.  
  394. We will now look at each command in detail, in roughly alphabetical order.
  395.  
  396.  
  397. - The ALT command
  398.  
  399. The ALT command specifies the ALTernate drive/user area to be searched
  400. by MEX for LOAD files (.PHN and .KEY), READ files, and terminal capture
  401. files (when APPEND is on).  Syntax is
  402.  
  403.         ALT <du-spec>
  404.  
  405. Examples:
  406.  
  407.         ALT A0:
  408.         ALT B3:
  409.  
  410.  
  411. - The BYE command
  412.  
  413. BYE is used to return to CP/M (does not disconnect) at the end of
  414. a MEX session.
  415.  
  416.  
  417. - The CALL command
  418.  
  419. The CALL command is used to dial numbers either from the library or from
  420. the keyboard. If you specify more than one number on the command line,
  421. CALL will try each until one answers with a carrier tone.  For example,
  422.  
  423.         CALL 16165559033 SENACA
  424.  
  425. will dial the first number; if busy (or no answer), CALL will try the second.
  426. The special number '#' will cause the entire command line to be repeated if
  427. none of the dialed numbers responds with a carrier:
  428.  
  429.         CAL WESTWOOD 1-616-555-2040 TCBBS #
  430.  
  431. will try all three numbers repeatedly until one answers.  You may op-
  432. tionally place a limit on the number of retries by including a number
  433. after the '#':
  434.  
  435.         CAL 555-1212 #48
  436.  
  437. A ^C will abort dialing at any time.
  438.  
  439. Phone-library numbers may specify an optional baud rate (see the description
  440. for the PHONE command for information on how to specify the rate). If a
  441. baud-rate is present, CALL will change the baud rate before dialing the number.
  442.  
  443. Note that, for this feature to work, your hardware must be capable of
  444. changing the rate AND your overlay must implement the NEWBD vector.  Most
  445. MEX overlays (overlays whose names start with "MXO-") allow this, if the
  446. hardware is capable of baud-rate change; most MDM overlays do NOT.
  447.  
  448. - The CLONE command
  449.  
  450. The CLONE command allows you to save a new copy of MEX, with the current
  451. options intact (including any defined keystrings and phone numbers). The
  452. syntax is:
  453.  
  454.                 CLONE <filename>
  455.  
  456. Examples:
  457.  
  458.         CLONE MEX.COM
  459.         CLONE NEWMEX.COM
  460.  
  461. Clone will prompt you for an erase-file operation if the specified file al-
  462. ready exists on the disk.
  463.  
  464. - The COLD command
  465.  
  466. The COLD command re-starts MEX and erases any defined keystrings along
  467. with the phone library.  This is the only way to erase the entire phone
  468. library with one command.  The COLD command also allows you to remove the
  469. CIS protocol module (for those who don't need it) ... do this:
  470.  
  471.                 STAT CIS OFF
  472.                 COLD
  473.                 CLONE <filename>
  474.  
  475. Note that this removes the CIS module altogether (you can't get it back
  476. with the STAT CIS command).  This frees up roughly 1K of memory.
  477.  
  478.  
  479. - The CPM command
  480.  
  481. CPM is a synonym for BYE, and returns control to the operating system
  482. without disconnecting.
  483.  
  484. - The DEL command
  485.  
  486. DEL is used to close and erase an open terminal file; use this command
  487. when you change your mind about saving a terminal file.
  488.  
  489. - The DIAL command
  490.  
  491.  
  492. The DIAL command performs the same task as the CALL command, except that
  493. after calling, DIAL returns to command mode (CALL goes to terminal mode).
  494.  
  495. The syntax for DIAL is exactly the same as the syntax for CALL (described
  496. prevously), including the multiple-number feature and the repeat option.
  497.  
  498. DIAL is intended to be used in READ files, where it is desirable for the
  499. READ file to retain control after calling a number (READ files have no
  500. effect in terminal mode; thus using CALL in a READ file would pause ex-
  501. ecution of the read file when the distant end is reached).
  502.  
  503.  
  504. - The DIR command
  505.  
  506.  
  507. DIR works similarly to the CP/M DIR command, and displays the disk directory
  508. on the screen. DIR takes advantage of the DU specification, thus "DIR B7:"
  509. will display all of the files in user 7 on drive B.  System files will be
  510. excluded if the STAT variable 'EXCLUDE' is set to ON.  If EXCLUDE is OFF,
  511. all files will be displayed.
  512.  
  513. More examples:
  514.  
  515.         DIR C3:*.?Q?
  516.         DIR LOGIN.MEX
  517.         DIR 3:
  518.  
  519. - The DSC command
  520.  
  521. DSC disconnects the modem from the phone line (may not be implemented
  522. in all overlays).
  523.  
  524.  
  525. - The ERA command
  526.  
  527. ERA erases files, similarly to CP/M's ERA.  The syntax is as follows:
  528.  
  529.                         ERA <filename> [V]
  530.  
  531. The filename may be ambiguous (e.g., *.ASM, BOOT?.BAK).  ERA always dis-
  532. plays a list of the files that are being erased.  If you specify the
  533. optional 'V' after the filename, ERA will ask for verification before
  534. actually erasing the files (after displaying the names).
  535.  
  536. - The GLOBAL command
  537.  
  538. The GLOBAL command allows you to set the secondary options (described pre-
  539. viously) for the single character commands.  Any options set this way will
  540. then be active for the single-character commands whether or not they are
  541. specified in the actual command line.  For example, if you prefer to go
  542. directly to terminal mode after a file transfer, do:
  543.  
  544.                 GLOBAL T
  545.  
  546. You can also set the VIEW mode for CIS transfers by doing
  547.  
  548.                 GLOBAL V
  549.  
  550. (note that this is the only way to "view" a CIS file transfer.
  551.  
  552. - The EXIT command
  553.  
  554. EXIT is a synonym for BYE, and returns control to the operating system
  555. without disconnecting.
  556.  
  557.  
  558. - The HELP command
  559.  
  560. HELP is used to access the on-line manual for MEX (contained in the file
  561. HELP.MEX).  Syntax for the HELP command is as follows:
  562.  
  563.     HELP            <<--- prints help for the HELP command
  564.     HELP ?            <<--- lists available topics
  565.     HELP <topicname>    <<--- prints help information for a topic
  566.  
  567. HELP.MEX must reside in the currently logged drive/user area (unless you
  568. use an ALT area, with the SEARCH variable).  Once the help file is opened,
  569. you may move freely among drive and user areas without affecting the op-
  570. eration of HELP; MEX remembers where the HELP file is located.
  571.  
  572. Once opened, the HELP file will remain open for the duration of the
  573. session, unless a LOG command is executed.
  574.  
  575.  
  576. - The ID command
  577.  
  578. The ID command allows you to configure the MEX ID string (which is
  579. printed in the prompt, and in error messages, if the STAT ERRID switch
  580. is set to ON).  This is useful if you're communicating with another
  581. computer running MEX; if each computer has a different ID string,
  582. you're never in doubt as to which one you're typing commands to, or
  583. which one printed an error message.
  584.  
  585. The syntax for the ID command is
  586.         
  587.                 ID <string>               (see "STRINGS")
  588.  
  589. The string may be a multi-line string; it's length in the standard
  590. distributed MEX may not exceed 28 characters.  This length may be different
  591. if your system overlay replaces the MEX defaults (in fact, the overlay
  592. may disable this command altogether; if the "INVALID COMMAND" message
  593. appears when you attempt to use the ID command, then this is probably
  594. the case.
  595.  
  596. -The KEY command
  597.  
  598. The KEY command is used to manipulate the keystrings that are available in
  599. terminal mode.  There are several forms of the command:
  600.  
  601.         KEY                             <<= prints out all of the keystrings
  602.         KEY <keyname>=[<string>]        <<= defines a new keystring
  603.  
  604. Keyname is any valid ASCII character, except for the set defined as the
  605. terminal mode escape-sequence commands (see TERMINAL MODE).
  606.  
  607. In the second form, above, if <string> is omitted, then the specified key-
  608. string is erased.
  609.  
  610. Examples:
  611.  
  612.         KEY %="ATDT 14145559932"        <<= sets up the '%' key
  613.         KEY Q=                          <<= erases the Q keystring
  614.  
  615. Note that KEY names that duplicate terminal-mode commands will be rejected
  616. by the KEY command, and an error message will be printed.
  617.  
  618.  
  619. - The LOAD and SAVE commands
  620.  
  621.  
  622. LOAD and SAVE are used to load and save phone number and keystring files.
  623. Both commands take a filename argument.  Examples:
  624.  
  625.         LOAD A5:CBBSPHON.PHN            <<== loads a phone # file
  626.         LOAD ARPA.KEY                   <<== loads a keystring file
  627.         SAVE C:NEWPHONE.NUM             <<== saves phone # file
  628.         SAVE 9:COMPUSRV.KEY             <<== saves keystring file
  629.  
  630. Note that the filetype determines what type of file is being saved (.PHN
  631. for phone number files, .KEY for keystring files).  Any other filetype
  632. will generate an argment error.
  633.  
  634. - The LOG command
  635.  
  636. The LOG command allows you to reset the drive (for switching disks) and,
  637. optionally, simultaneously change drive and/or user area. The command
  638. syntax is
  639.  
  640.                 LOG <DU-SPEC>
  641.  
  642. where DU-SPEC is either or both of the new drive to log into and the new
  643. user area.  An optional colon may follow the DU-SPEC.  Examples:
  644.  
  645.                 LOG B7:         <<= reset, log in drive B user 7
  646.                 LOG 7:          <<= reset, log user 7 current drive
  647.                 LOG B:          <<= reset, log drive B current user
  648.                 LOG             <<= reset, retain current user/drive
  649.  
  650. If either a terminal file or a READ file is open, the disk-reset will be
  651. denied and the LOG command will display an error message.
  652.  
  653. If you want to change drive and/or user without a disk reset, you can do so
  654. without the LOG command: just enter the DU spec at the MEX command prompt.
  655.  
  656.  
  657. - The PHONE command
  658.  
  659. The PHONE command may be used to query the phone number library, as well as
  660. for adding and deleting numbers.  To add a number, use this form:
  661.  
  662.                 PHONE <id>=<number> [baud-rate]
  663.  
  664. Where ID is a string (up to 8 characters) that you want to use to call out
  665. the number and <number> is the telephone number.  If <id> already exists,
  666. it will be replaced.  <Baud-rate> is an optional rate to be associated with
  667. the number, used by the CALL command.  To remove a number, do
  668.  
  669.                 PHONE <ID>=
  670.  
  671. To see the entire library, do
  672.  
  673.                 PHONE
  674.  
  675. To see a single entry, do
  676.  
  677.                 PHONE <ID>
  678.  
  679. Examples:
  680.  
  681.   PHONE FORTFONE=1-414-563-4013 1200    <<--- associates number w/FORTFONE
  682.   PHONE FORTFONE=1-414-563-4013         <<--- same but doesn't change baudrate
  683.   PHONE                    <<--- lists the phone number library
  684.   PHONE FORTFONE=            <<--- removes FORTFONE from library
  685.   PHONE FORTFONE            <<--- prints entry for FORTFONE
  686.  
  687. - The PREFIX and SUFFIX commands
  688.  
  689.  
  690. PREFIX and SUFFIX are used with the SENDOUT command (described later). PREFIX
  691. is used to manipulate a special PREFIX string, and SUFFIX is used to manipulate
  692. a SUFFIX string.
  693.  
  694. The PREFIX string is transmitted ahead of any SENDOUT string, when the
  695. SENDOUT command is used, and the SUFFIX string is transmitted after.  This
  696. simplifies the construction of complex, repetitive command lines to be sent
  697. to the remote.
  698.  
  699. Either command without arguments prints the current value of the string. To
  700. change the string, enter the string on the command line after the command.
  701.  
  702. Examples:
  703.  
  704.                 PREFIX ""               <<== sets null prefix string
  705.                 PREFIX "XMODEM S "      <<== sets a prefix
  706.                 SUFFIX "^M"             <<== set carriage-return as suffix
  707.  
  708. In the second and third examples above, the subsequent SENDOUT would work
  709. like this:
  710.  
  711.         SENDOUT FOO.BAR
  712.  
  713. which would actually send out   "XMODEM S FOO.BAR" <carriage-return>.
  714.  
  715.  
  716. - The READ command
  717.  
  718. The READ command causes MEX to take command lines from a disk file. This
  719. can be handy for such things as controlling a set of file transfers (es-
  720. pecially when you can't be present for the entire session) and executing
  721. complicated login sequences automatically. READ, used with the EXTEND
  722. function (see the description of the EXTEND variable in section 8) provides
  723. a means of extending MEX's command set.
  724.  
  725. The syntax for READ is:
  726.  
  727.         READ <filename> [<parm1>] [<parm2>] ...
  728.                             \          \
  729.                               \ ________\_____>> optional!
  730.  
  731.  
  732. The READ file may contain any valid command EXCEPT another READ command.
  733. These commands may freely move among drives and user areas; MEX will re-
  734. member where the READ file is located.
  735.  
  736. Typically, READ files are created with a text editor, and may contain
  737. STAT commands to set MEX for a particular type of connection, DIAL commands
  738. to actually make the connection, and SENDOUT commands to log in at the
  739. destination.  It's possible for an entire session to take place under
  740. a READ command.
  741.  
  742. A READ file will terminate when the file ends, or when a CONTROL-C is
  743. seen at the console (aborting any command with CONTROL-C will abort the
  744. READ file).
  745.  
  746. It's important to note that, while you can use a READ file to enter the
  747. terminal mode, the READ file is not used while the terminal mode is active.
  748. When you exit terminal mode, the READ file starts again.
  749.  
  750. Normally, READ commands echo on the screen when they execute. You
  751. can inhibit this, however, by manipulating the SILENT variable (do
  752. STAT SILENT ON to inhibit the command echo).
  753.  
  754. READ parameters are very similar to CPM's SUBMIT parameters; they are called
  755. ACTUAL parameters. If they are present in the command line, they will be
  756. plugged into the FORMAL parameters in the submit file.  This substitution fa-
  757. cility provides a powerful tool for generating multiple-purpose command files.
  758.  
  759. Formal parameters occur in the READ file, and take the form {n}, where n
  760. is the parameter number; these numbers correspond sequentially with the
  761. ACTUAL parameters entered on the command line.  The ACTUAL parameters in
  762. the command line are substituted for the FORMAL parameters in the READ file
  763. when the file is executed.  A special form of FORMAL parameter allows a
  764. default value to be used if an ACTUAL parameter is not specified on the
  765. command line; this form is {n:<text>} where n is the parameter number, and
  766. <text> is any arbitrary text to be used as the default.
  767.  
  768. If the default form of the formal parameter is not used, AND no actual
  769. parameter is specified in the command line, execution will continue, but
  770. the parameter will be blank.
  771.  
  772. Normally, the parameters in the READ command line are terminated by the
  773. space between parameters (or the end-of-line); spaces can be imbedded in
  774. the ACTUAL parameter by enclosing it in braces.
  775.  
  776. I know this all sounds quite complex, but it's really quite simple, as
  777. the following example will show.
  778.  
  779. Assume a file named FILEGET.MEX contains the following lines:
  780.  
  781. SENDOUT XMODEM S{2} {1:SENACA.DQR}
  782. R{2} {1:SENECA.DQR}
  783.  
  784. ( {2} and {1:SENACA.DQR} are FORMAL parameters). This file can be used in
  785. several ways:
  786.  
  787.         READ FILEGET            will simply transfer SENACA.DQR to your system
  788.         READ FILEGET MEX.UPD    will transfer MEX.UPD to your system
  789.         READ FILEGET *.NEW B    will transfer all NEW files in batch mode
  790.         READ FILEGET USQ.DOC VT will transfer FILEGET, View it, goto Term mode
  791.  
  792. The following line illustrates how to expand a parameter, using the above file,
  793. and is useful only if MEX is running on the remote end:
  794.  
  795.         READ FILEGET {*.BOO NEWSTUFF.DOC} BX
  796.  
  797. (Transfers all .BOO files and NEWSTUFF.DOC) in batch mode, then disconnects)
  798.  
  799. If you turn the command extender on (STAT EXTEND ON), the READ in the above
  800. lines can be omitted, making the READ file look like a built-in command. This
  801. affects single-character commands somewhat: the disk is searched before the
  802. the command is checked for a single; you can avoid this by prefixing single-
  803. character command lines with a '*'  (eg, *RQ FILE.FOO).
  804.  
  805.  
  806. - The REN command
  807.  
  808. The REN command  syntax is similar to the CP/M's REN, except that DU spec-
  809. ifications may be employed in either the new OR the old filename (but not
  810. in both).
  811.  
  812. In general the syntax is
  813.  
  814.                 REN <newfilename>=<oldfilename>
  815.  Examples:
  816.                 [MEX] A0>> REN NEWFILE=OLDFILE          (uses A0)
  817.                 [MEX] C9>> REN B6:REPORT.OLD=REPORT.DOC (uses B6)
  818.                 [MEX] B4>> REN 6:MYFILE=B:YOURFILE      (uses B6)
  819.                 [MEX] D4>> REN ERROR=C9:BLUNDER         (uses C9)
  820.  
  821. Note that the following REN commands will produce errors:
  822.  
  823.                 [MEX] A0>> REN B3:SOMETHING=C:ELSE      (ambig drives)
  824.                 [MEX] A0>> REN 6:ME=7:YOU               (ambig user #'s)
  825.  
  826. Note that ERA will prompt for erasure if the new name already exists.  Further,
  827. before doing this, it checks for the existance of the old filename, and, if
  828. not found, aborts before checking for the the presence of the new name.
  829.  
  830.  
  831. - The SENDOUT command
  832.  
  833. SENDOUT allows you to send an arbitrary string out to the modem (see STRINGS).
  834. This is most useful in READ command files, but can often be useful in normal
  835. interactive mode.
  836.  
  837. The syntax for SENDOUT is
  838.  
  839.                 SENDOUT <string>
  840.  
  841. Before the specified string is transmitted, a PREFIX string, if any,
  842. is transmitted, followed by the string specified to SENDOUT, and
  843. terminated by a SUFFIX string  (if any; the default suffix string
  844. is a return-code, normally terminating the line to the remote). After
  845. transmitting the string, MEX will wait for a reply from the remote, up
  846. to a pre-set number of seconds; any reply will printed on your screen.
  847.  
  848. Following are settings and variables which affect the SENDOUT command:
  849.  
  850. SUFFIX: \  Described previously
  851. PREFIX: /  
  852.  
  853. WTECHO: Manipulated by the STAT command, this switch-variable determines
  854.         whether or not SENDOUT validates its transmission by waiting for
  855.         characters to be echoed from the remote.  If set to ON, then
  856.         SENDOUT checks each printing character it transmits with the
  857.         character as echoed by the remote.  If a mismatch occurs, SENDOUT
  858.         marks an error, sends a CANCEL character, and awaits a TRIGGER
  859.         character from the remote.  It then begins again, and repeats
  860.         this cycle until either the transmission occurs without error,
  861.         or the error count is exceeded (which aborts SENDOUT).
  862.         
  863.         If you use SENDOUT with WTECHO off, you'll also likely want to
  864.         set TRIGGER to null (STAT TRIGGER ""), to avoid trigger-wait.
  865.  
  866. More factors affecting SENDOUT:
  867.  
  868. RETRY   Manipulated by the STAT command, this value-variable specifies
  869.         the error-retry count for SENDOUT before aborting.
  870.  
  871. CANCHR: Manipulated by the STAT command, this string-variable (single
  872.         character) specifies the character to be transmitted to the 
  873.         remote to cancel the transmitted line after an error.
  874.  
  875. TRIGGER:Manipulated by the STAT command, this string-variable (single
  876.         character) is the character the SENDOUT command waits for after
  877.         an error-cancel, before proceeding with the retry. If the other
  878.         end doesn't echo, set TRIGGER to 0 (and WTECHO to OFF), and MEX
  879.         will simply send its arguments and not worry about validating
  880.         the echoed string (this is the technique you should use to send
  881.         Smartmodem command strings, for example).
  882.  
  883.  
  884. - The SET command
  885.  
  886. SET is a command defined entirely by the overlay; if your overlay doesn't
  887. implement the SET command, MEX will print the "invalid command" message
  888. when you try to invoke SET.
  889.  
  890.  
  891. - The SLEEP command
  892.  
  893. SLEEP is used to invoke a delay (handy sometimes in READ files).
  894. Syntax is:
  895.  
  896.                         SLEEP n
  897.  
  898. where n is the number of seconds to wait (a ^C from the console
  899. will abort the SLEEP command, as well as any active READ file).
  900.  
  901. Sleep, used with the STAT CLOCK function, can be used to "tweak" the
  902. timing constants in MEX (by timing the actual SLEEP period, and ad-
  903. justing the CLOCK value until the SLEEP argument agrees with the actual
  904. measured time).  This is especially useful with multi-tasking operating
  905. systems, such as MP/M and TurboDOS, where background processing wreaks
  906. havoc with the internal MEX timing constants.
  907.  
  908. - The STAT command
  909.  
  910. The STAT command lets you examine certain system variables, and change
  911. certain others.  In general, the syntax is as follows:
  912.  
  913.         STAT <KEYWORD>              <<== to examine a variable
  914.         STAT <KEYWORD> <NEW-VALUE>  <<== to change a variable
  915.  
  916. The NEW-VALUE will depend on the context of the keyword in question. For
  917. example, most of the switch-type variables are either ON or OFF, hence,
  918.  
  919.         STAT BAKFIL                 <<== prints out ON or OFF
  920.         STAT BAKFIL ON              <<== turns on BAKFIL
  921.         STAT BAKFIL OFF             <<== turns off BAKFIL
  922.  
  923. The value-type variables, on the other hand, will print the number or
  924. text associated with that variable.  Setting the value requires the entry
  925. in units associated with that value.  For example,
  926.  
  927.  STAT REPLY 5               <== sets 5 seconds as SENDOUT reply time
  928.  STAT WCHAR 4               <== set 40 ms as transmit-character delay tim
  929.                                 during a terminal-mode file send
  930.  
  931. Some variables are read-only, most notably STAT BUFFER (which prints
  932. out the save-buffer and printer-buffer statistics).
  933.  
  934. To obtain a list of all of the options that can be viewed or changed with
  935. the STAT command, do
  936.  
  937.         STAT ?
  938.  
  939. Most of the STAT keywords are documented in section 8.
  940.  
  941.  
  942. - The TYPE command
  943.  
  944. The TYPE command prints files on the console, similarly to the CP/M
  945. TYPE command, but with pagination:  The syntax is:
  946.  
  947.                 TYPE <filename> <'P'>
  948.  
  949. The optional 'P' will affect pagination at screen boundaries: if pagination
  950. is OFF ("STAT PAGE OFF") then 'P' will cause the file to be paged.  If
  951. pagination is ON ("STAT PAGE ON"), then 'P' will inhibit pagination.
  952.  
  953.  
  954. Examples:
  955.  
  956.                 A2>>COMMAND: TYPE REPORT.DOC    (paged output if PAGE ON)
  957.                 A2>>COMMAND: TYPE REPORT.DOC P  (inhibits paging if PAGE ON)
  958.  
  959.  
  960. - The SYSTEM command
  961.  
  962. SYSTEM is a synonym for BYE, and returns control to the operating system
  963. without disconnecting the modem.
  964.  
  965. - The WRT command
  966.  
  967. WRT is used to close and save an open terminal file. An automatic WRT
  968. if performed for you if you use any of the exit commands (BYE, EXIT,
  969. CPM, or SYSTEM) while a terminal-mode file is open.
  970.  
  971. -----------------------
  972.  
  973. 8) STAT variables
  974.  
  975. This section describes the variables that may be examined or changed
  976. with the STAT command.
  977.  
  978.  
  979. - The ALERT variable
  980.  
  981.  
  982. ALERT is a STAT value variable; it determines the number of times the
  983. console bell will ring when a remote computer is reached with the CALL
  984. and DIAL commands.  ALERT works only on calls that have taken more than
  985. one dialing attempt to reach.
  986.  
  987. ALERT is handy for dialing with the repeat option (see CALL command in
  988. section 7 for more information about the repeat option): you can enter a
  989. number (or group of numbers) to be dialed; with ALERT set non-zero, you'll
  990. have an audible signal that a call has been completed.
  991.  
  992.  
  993. - The BAKFILE variable
  994.  
  995. BAKFILE is a STAT  Switch variable: if ON, any command that creates a file
  996. when one of the same name already exists will, instead of erasing the old
  997. (or prompting for an erasure) rename the old with the same primary name,
  998. and a secondary name of "BAK".
  999.  
  1000.  
  1001. - The BELL variable
  1002.  
  1003. BELL enables or disables the console bell througout MEX (ie, in terminal
  1004. mode, command mode, and during file transfers).
  1005.  
  1006.  
  1007. - The BUFFER variable
  1008.  
  1009. BUFFER is not really a variable; use STAT BUFFER to print out the ASCII
  1010. capture buffer statistics (size, amount used, amount available).  In ad-
  1011. dition, STAT BUFFER displays the batch-filenames buffer size (which de-
  1012. termines the largest number of files that my be transferred in one batch
  1013. file transfer command).
  1014.  
  1015.  
  1016. - The TRIGGER and CANCEL variables
  1017.  
  1018. TRIGGER is a STAT CHARacter variable, and specifies the character the SENDOUT
  1019. command will look for before sending out its argument (a single-character
  1020. prompt from the remote).  To disable the trigger-wait function altogether, do
  1021.  
  1022.         STAT TRIGGER ""
  1023.  
  1024. CANCEL is anoter CHAR variable, and specifies the character the SENDOUT command
  1025. will send to the remote to cancel the line after an error.
  1026.  
  1027.  
  1028. - The CHAR variable
  1029.  
  1030.  
  1031. CHAR is not really a varible, but a command option to STAT that prints a list
  1032. of all of the CHAR variables.
  1033.  
  1034.  
  1035. - The CHECKSUM and CRC variables
  1036.  
  1037. CRC and CHECKSUM are switch variables; the two are mutually exclusive (that
  1038. is, turning one on turns the other off) and set the preferred type of error
  1039. checking in Christensen file transfers.
  1040.  
  1041. CHECKSUM is a simple sum of the outgoing record; CRC uses a more sophisticated
  1042. technique employing polynomial arithmetic, and is thus a better method (more
  1043. errors are detected, thus, there is less chance of an incorrect record being
  1044. received as if it were valid).
  1045.  
  1046. The original MODEM2 protocol employed only CHECKSUM detection; however, in
  1047. the past few years, most versions of Christensen exchange programs have been
  1048. rewritten to accept the CRC technique as well.  MEX will adapt to transmitting
  1049. programs using either type of validation.
  1050.  
  1051. If MEX is the transmitter, it will switch modes after several failed attempts
  1052. to transmit a file, thus allowing full compatibility with older modem programs.
  1053.  
  1054.  
  1055. - The CIS variable
  1056.  
  1057. CIS is a STAT switch: when ON, then Compuserve protcol file transfers
  1058. are allowed while in terminal mode.  If OFF, Compuserve transfer sequences
  1059. from the remote end are ignored altogether (although they are printed on
  1060. the screen as "normal" terminal-mode characters).
  1061.  
  1062. CIS transfers always take place while in terminal mode; there is no command to
  1063. send or receive a file using CIS protocol, since the remote Compuserve end
  1064. must initiate the transfer.
  1065.  
  1066. Note that if you use the COLD command to restart MEX while the CIS switch
  1067. is set to OFF, then the Compuserve file transfer module will be removed
  1068. altogether from the running copy of MEX.  If you subsequently use the CLONE
  1069. command to create a new executable MEX.COM, the additional space formerly
  1070. used by the CIS module (about 1000 bytes) will be available instead for
  1071. your buffers.  You will not be able to use STAT to turn the CIS switch back
  1072. on (since there is no longer a CIS module in the system).  This feature is
  1073. intended for those users who do not need the ability to do Compuserve-
  1074. protocol transfers, and would rather not waste space on an unneeded feature.
  1075.  
  1076.  
  1077. - The CLOCK variable
  1078.  
  1079. CLOCK is a STAT value variable; you may set this variable to any value be-
  1080. tween 1 and 255.  The value is the CPU clock speed in tens of Megahertz
  1081. (hence, the speed may vary between .1 and 25.5 Mhz).  You can then use
  1082. the CLONE command to make this change permanent.
  1083.  
  1084. CLOCK is useful for "tweaking" MEX under varying conditions of load when
  1085. running under multi-tasking operating systems, such as MP/M and TurboDOS.
  1086. When system load is heavy, you can decrease the CLOCK value, causing MEX
  1087. to spend less time in its internal timing loops.
  1088.  
  1089.  
  1090. - The DEBUG variable
  1091.  
  1092. DEBUG is a STAT switch that affects the Terminal mode in MEX.  If DEBUG
  1093. is ON, then characters received in Terminal mode are displayed in a form
  1094. similar to CP/M's DDT dump (D) command: hex values on the left side of
  1095. the screen and the ASCII block (as the output progresses) on the right.
  1096.  
  1097. You'll note that the ASCII right-side display is "buffered" until 16
  1098. characters have been received.  After the 16th, the ASCII right-side
  1099. is printed.  Therefore, if the remote's output pauses, you'll see only
  1100. the hex values until the remote sends more output.  Also, exiting Terminal
  1101. mode will display any buffered ASCII.
  1102.  
  1103. DEBUG is useful whenever it's necessary to know exactly what the remote
  1104. is sending (for example, if you're connected to a time-share network, and
  1105. can't transfer files, a DEBUG session can prove illuminating in determining
  1106. just what is happening).
  1107.  
  1108. In DEBUG mode, the FILTER flag is ignored, allowing all characters to 
  1109. reach the screen.  Additionally, the CIS protocol is disabled while DEBUG
  1110. is ON.
  1111.  
  1112.  
  1113. - The HEX and DECIMAL variables
  1114.  
  1115.  
  1116. HEX and DECIMAL are STAT switch variables; they are mutually exclusive (ie,
  1117. turning one ON turns the other OFF.  These variables specify the default
  1118. input radix of commands that take numeric arguments (e.g., SLEEP, STAT VAL
  1119. <#>, the '#' spec in CALL commands, etc).  If HEX mode is ON, then these
  1120. numbers are considered Hexadecimal; if DECIMAL mode is on (MEX is distributed
  1121. with DECIMAL ON), then they are considered decimal values.
  1122.  
  1123. You can force a decimal number, regardless of the HEX or DECIMAL mode, by
  1124. preceeding the number with a '$' character; similarly, the '#' character
  1125. implies a decimal number.
  1126.  
  1127. HEX mode has a side effect: it turns on HEX record count reporting in file
  1128. transfers.
  1129.  
  1130.  
  1131. - The ERRID variable
  1132.  
  1133. ERRID is a STAT switch that enables and disables the printing of the MEX
  1134. ID string in error messages.
  1135.  
  1136. The ID string is useful in applications where you're communicating with
  1137. a remote computer running MEX (if each end has a different ID code, there
  1138. is no problem confusing error messages), but if you typically use MEX
  1139. only with RCPM systems or timesharing systems that don't run MEX, you'll
  1140. likely want to turn off the ERRID switch, and shorten the error messages.
  1141.  
  1142.  
  1143. - The EXCLUDE variable
  1144.  
  1145. EXCLUDE is a STAT switch-type variable.  It modifies the action of commands
  1146. that take multiple-filename arguments (such as DIR and the batch-transmit
  1147. SB).
  1148.  
  1149. If EXCLUDE is ON, then SYS files are skipped over by these commands.
  1150.  
  1151. If EXCLUDE is OFF, then SYS files are included.
  1152.  
  1153. Thus, you can exclude SYS files from a batchfile transmission by STATting
  1154. the EXCLUDE switch ON.  These files will also be exclude from DIR listings
  1155. while EXCLUDE is ON.
  1156.  
  1157.  
  1158. - The EXTEND variable
  1159.  
  1160. EXTEND is a STAT switch variable.  When turned on, it modifies the way
  1161. MEX's command decoding works: if a command is not found in MEX's command
  1162. table, MEX will pass the entire command line on to READ, causing the
  1163. command to look like a READ command (without READ being present on the
  1164. command line).
  1165.  
  1166. For more information, see the description of the READ command in section 7.
  1167.  
  1168.  
  1169. - The ESC variable
  1170.  
  1171. ESC is a STAT CHAR variable, and specifies your terminal-mode escape character,
  1172. used to activate terminal-mode functions (such as capture and printer buffer
  1173. on/off, etc). The argument is a single character string.  Example:
  1174.  
  1175.                         STAT ESC "^I"
  1176.  
  1177.      changes your escape character to the TAB key.
  1178.  
  1179.  
  1180. - The FILTER variable
  1181.  
  1182. FILTER is a STAT switch variable; when ON, then abnormal control characters
  1183. are ignored when in terminal mode (with the exception of carriage-return,
  1184. linefeed, backspace and tab).  If OFF, then all characters from the remote
  1185. will be displayed on the screen (and included in the ASCII-capture file,
  1186. if active).
  1187.  
  1188. FILTER ON is useful if you're working with a noisy connection, and random
  1189. garbage characters on the line are erasing your screen, etc.
  1190.  
  1191. If you're using a video-oriented text editor at the remote, you'll need to
  1192. be sure FILTER is set to OFF, in order to allow the video-control characters
  1193. to be accepted by MEX.
  1194.  
  1195. Note that the CP/M end-of-file mark is specifically excluded from ASCII-
  1196. capture files regardless of the setting of FILTER (although FILTER ON
  1197. allows this character to go to the screen).
  1198.  
  1199.  
  1200. - The INITFILE variable
  1201.  
  1202. INITFILE is a STAT switch variable.  It determines whether or not MEX
  1203. will look for the start-up file INI.MEX when it is first started.
  1204.  
  1205. INITFILE is intended to be used prior to running CLONE, to prevent the
  1206. cloned MEX from looking for INI.MEX.
  1207.  
  1208. For more information about the CLONE command, see its command description
  1209. in section 7.
  1210.  
  1211.  
  1212.  
  1213. - The LF variable
  1214.  
  1215. LF is a switch variable: if ON, it affects terminal-mode file transmission by
  1216. adding a linefeed after every carriage return.
  1217.  
  1218.  
  1219. - The LIST variable
  1220.  
  1221. LIST is a Switch variable, and enables or disables the LIST device.
  1222.  
  1223. - The PAGE variable
  1224.  
  1225. PAGE is a STAT switch variable: if on, the TYPE command paginates;
  1226. TYPE scrolls if PAGE is OFF.
  1227.  
  1228.  
  1229. - The REPLY variable
  1230.  
  1231. REPLY is a STAT value variable, and specifies the amount of time (in seconds)
  1232. that the SENDOUT command will wait, after sending a string, for the remote end
  1233. to send a reply. Any such reply will be displayed on your terminal screen.
  1234.  
  1235. To query the REPLY constant, do: STAT REPLY
  1236.  
  1237. To set the REPLY time, do:       STAT REPLY <value>
  1238.  
  1239. where <value> is the number of seconds to wait, between 0 and 255.
  1240.  
  1241.  
  1242. - The RETRY variable
  1243.  
  1244. RETRY is a STAT keyword, and specifies the number of times the SENDOUT
  1245. will attempt to send a string before aborting.  Note that if the Wait-For-
  1246. Echo switch (WTECHO) is off, RETRY will have no effect, since no error
  1247. can occur.
  1248.  
  1249. To query the RETRY constant, do: STAT RETRY
  1250.  
  1251. To set the RETRY constant, do:   STAT RETRY <value>
  1252.  
  1253. where <value> is the number of retries, between 1 and 255.
  1254.  
  1255.  
  1256. - The RTIME varible
  1257.  
  1258. RTIME is a STAT value variable, and affects Christensen-protocol file
  1259. transfers.
  1260.  
  1261. RTIME is the amount of time (in seconds) that MEX will wait for a char-
  1262. acter from the remote end before declaring a timeout, and initiating
  1263. a record-retransmission sequence.
  1264.  
  1265. RTIME is set for one second in the standard distribution MEX; this is
  1266. more than adequate for RCPM work, and MEX-to-MEX file transfers where
  1267. each end is running under a single user operating system.  But when
  1268. working with a mainframe-type connection (and sometimes when a remote
  1269. MEX is running under MP/M), especially when a packet-switched network
  1270. is part of the connection, character delays can easily exceed one second.
  1271. In these environments, you'll want to set RTIME to a higher value (16
  1272. seconds is recommended; the maximum is 30).
  1273.  
  1274. - The RUB variable
  1275.  
  1276. RUB is a STAT switch variable and affects terminal mode: if ON, then the
  1277. local backspace key is converted to RUB when the character is transmitted
  1278. to the remote.
  1279.  
  1280. - The SEARCH varible
  1281.  
  1282. SEARCH is a STAT variable that may take on the values 0, 1, 2 or 3.  SEARCH
  1283. specifies a search path for READ files, phone libraries, keystring files, and
  1284. (if the append secondary option, 'A' is specified) terminal-mode ASCII capture
  1285. files.  These files normally are taken only from the currently logged DU; by
  1286. modifying SEARCH, you can change the way MEX finds these files.
  1287.  
  1288. Two drive/user areas are possible: the currently logged area ("logged" D/U)
  1289. and the Alternate DU (do HELP ALT for information on changing the alternate).
  1290.  
  1291. If SEARCH=0, then only the LOGGED DU is searched.
  1292. If SEARCH=1, then only the ALT DU is searched.
  1293. If SEARCH=2, then the LOGGED DU is searched; if the file is not found, then
  1294.              the ALT DU is searched.
  1295. If SEARCH=3, then the ALT DU is searched; if the file is not found, then the
  1296.              LOGGED DU is searched.
  1297.  
  1298.  
  1299. - The SWITCH variable
  1300.  
  1301. SPLIT is a STAT switch variable that affects the screen display of the phone
  1302. library (done from the PHONE command or the CALL command).
  1303.  
  1304. Normally the phone library is printed two numbers per line, to effect a
  1305. compact display with as much information as possible.  This compact display
  1306. does not, however, provide enough room to include the number's optional
  1307. baud-rate.
  1308.  
  1309. By setting SPLIT to ON, numbers will be printed one per line, and each
  1310. number's baud rate (if present) will be displayed.
  1311.  
  1312.  
  1313. - The SILENT variable
  1314.  
  1315. SILENT is a STAT switch variable, and, when ON, inhibits the echo of command
  1316. lines in READ files.
  1317.  
  1318.  
  1319. - The SWITCH variable
  1320.  
  1321. SWITCH is not really a varible; it requests the STAT command to list out all
  1322. of the switch-type variable.
  1323.  
  1324. - The VAL variable
  1325.  
  1326. VAL in not really a variable; it requests the STAT command to list out all
  1327. of the value-type variables.
  1328.  
  1329.  
  1330. - The WCHAR and WLINE variables
  1331.  
  1332. WCHAR and WLINE  are value variables; they specify delay times in simple
  1333. file transmissions done within terminal mode (with the <ESC> T command). When
  1334. you transfer a file, MEX will ask you whether you want to use these delays.
  1335.  
  1336. WCHAR is the delay to use between characters.(0-9, in 10's of milliseconds)
  1337. WLINE is the delay to use between lines      (0-9, in 100's of milliseconds)
  1338.  
  1339. WCHAR and WLINE delays are often needed for timesharing mainframes and
  1340. BBS's written in BASIC, to allow the slower remote end to catch the entire
  1341. file.
  1342.  
  1343.  
  1344. - The WTECHO variable
  1345.  
  1346. WTECHO is a STAT switch variable, and determines whether or not keystrings
  1347. and SENDOUT command lines transmitted to the remote are validated by compar-
  1348. ison with their echoed characters.
  1349.  
  1350. When WTECHO is ON, all printing characters transmitted to the remote
  1351. must echo correctly back from the host; this effectively halves the
  1352. transmission rate, but provides error correction feedback for the SENDOUT
  1353. command, allowing it to cancel a line and re-try.
  1354.  
  1355. If you're sending command strings out to a line that doesn't echo the
  1356. characters, you'll want to set WTECHO off.  Additionally, if you're using
  1357. the SENDOUT facility, you'll need to remove the trigger string (you can
  1358. do this with STAT TRIGGER "" , which effectively removes the trigger
  1359. character.
  1360.  
  1361.  
  1362. - The SEP variable
  1363.  
  1364. SEP is a STAT CHARacter variable, and allows you to change the command-line
  1365. separator character. The argument is a single character string. Example:
  1366.  
  1367.                         STAT SEP "$"    
  1368.  
  1369. changes your command separator to the "$" character.
  1370.  
  1371.  
  1372. - The XLINE variable
  1373.  
  1374. XLINE is a STAT switch that affects terminal-mode file transfers.  If
  1375. XLINE is set to ON, then the file will be transmitted, one line at a
  1376. time; each succeeding line will not be transmitted until an X-ON character
  1377. is received from the remote.
  1378.  
  1379. XLINE is used with some timeshare and network computers, almost never
  1380. with RCPM and BBS systems.
  1381.  
  1382.  
  1383. - The XON variable
  1384.  
  1385. XON is a STAT switch variable that affects the terminal-mode file send
  1386. (see TERMINAL MODE for a full description of terminal-mode file send).
  1387.  
  1388. When XON is set to ON, MEX will send all characters to the remote at full
  1389. speed, but will monitor for an X-OFF character from the remote.  When
  1390. MEX sees the X-OFF, it will pause, allowing the remote to read all of the
  1391. input MEX has transmitted.  When MEX sees an X-ON character from the remote,
  1392. it will resume the file transmission.
  1393.  
  1394. --------------------------
  1395.  
  1396. 9) About the source code (and other stuff).
  1397.  
  1398. Some users will note that MEX is distributed without source code; this is
  1399. not an oversight.  MEX occupied a substantial amount of my spare time over the
  1400. last few months, and I've become very possessive of the program (especially
  1401. in light of what's happened with so many other programs appearing in source
  1402. form on various RCPM's and through user groups -- they tend to get modified to
  1403. death by people who do not properly consider the effects of their changes).
  1404. For this reason, I will not be releasing source code for MEX in any form, bey-
  1405. ond the source for the overlay files..
  1406.  
  1407. I do intend to maintain the program as responsibly as is possible for any
  1408. non-funded project.  In addition, a number of enhancements are planned for
  1409. later this summer, to culminate in a 2.0 release that will offer significant
  1410. enhancements (including a simpler overlay structure, a far-more powerful
  1411. READ command processor, including nested reads and conditional execution,
  1412. smart-terminal emulation, and the capability of MEX to act as a remote-
  1413. terminal server, similar to the public domain BYE program).  I cannot guar-
  1414. antee, however, that MEX 2.0 will be distributed without charge (as MEX 1.0
  1415. is); if I decide to sell MEX 2.0, you can be assured that it will be one of
  1416. the cheapest terminal programs available for CP/M and as well supported as
  1417. any commercial product available.
  1418.  
  1419.  
  1420. 10) Support
  1421.  
  1422. MEX has been beta-tested among a small group over the last few months; however,
  1423. the nature of software development implies the existance of a microscopic
  1424. fissure through which program bugs will invariably ooze, escaping detection
  1425. by all but the omnipotent (I am, sadly, not among that group).
  1426.  
  1427. So if you detect errors or bugs in MEX, I would like to know about it. You
  1428. can reach me through the following avenues:
  1429.  
  1430.     Arpanet:    send mail to RFOWLER@SIMTEL20.ARPA
  1431.     Compuserve: send mail to Al Jewer (70040,321)
  1432.     RCPM:        If you're a sysop, leave me a message on the Dearborn,
  1433.             MI, Sysop RCPM.  Otherwise, leave a message on Keith
  1434.             Petersen's RCPM: (313) 759-6569.  After June 1, our
  1435.             local RCPM should be back "on-the-air": Fort Fone File
  1436.             Folder, (414) 563-4013.  This will be the best way to
  1437.             reach me after June 1.
  1438.     US Mail:    My mailing address is Route 1, Box 7, Fort Atkinson, WI;
  1439.              be aware that I am very slothful about answering non-
  1440.             electronic mail (ie, you may never get an answer).
  1441.     Telephone:  None.  Please do *not* call me at home; this raises
  1442.             hell with my family, and I'm not normally able to re-
  1443.             spond in "real-time" in any case. (This does not ap-
  1444.             ply, of course, to any of my paying customers who may
  1445.             be reading this).
  1446.  
  1447. If you report a bug, please be as explicit as possible, detailing any unusual
  1448. overlay configurations, STAT variables, and any other conditions you feel are
  1449. pertinent.  Bug reports like
  1450.  
  1451.         "Terminal mode doesn't work right"
  1452.  
  1453. are totally useless; all I can do is ignore such reports.
  1454.  
  1455. Feature requests for future releases of MEX are welcomed.
  1456.  
  1457. 11) Credits
  1458.  
  1459. I'd like to thank the following individuals for their participation in the
  1460. development of MEX, which included many suggestions for features, beta-
  1461. site testing and helpful feedback (and, in the cases of Bob Plouff and
  1462. Frank Wancho, code examples from their own communicatons programs):
  1463.  
  1464. Bob Plouffe     Dick Mead     Keith Petersen     Al Jewer
  1465. Frank Wancho    Sigi Kluger   David Sternlight   Shawn Everson
  1466. Dave Kozinn     Charlie Strom Eric Stork
  1467.  
  1468.  
  1469. Special thanks must go here also to Ward Christensen, who wrote the original
  1470. MODEM program from which all others have descended, Mark Zeiger, who dev-
  1471. eloped the batch-file transfer protocol extension to Ward's original MODEM2
  1472. protocol, Irv Hoff, whose work with MDM7 provided a foundation for a common
  1473. overlay format between MEX and MDM7, and the dozens of others who have con-
  1474. tributed to the development of the many versions of MODEM2, MODEM7 and MDM
  1475. (from which MEX began with a healthy advance along the learning curve).
  1476.  
  1477. 11) Distribution and a warning to illicit profit-takers
  1478.  
  1479. MEX and its documentation are Copyright (C) 1984 by Ronald G. Fowler.  A
  1480. license is extended to users to copy and exchange the program and documentation
  1481. with the sole restriction that such distribution must be non-commerical in
  1482. nature (this is not to imply that charges for such things as diskettes and
  1483. modest copying and mailing fees are of themselves commercial in nature). Re-
  1484. sale for profit may be done only with the express written consent of the
  1485. author, Ronald G. Fowler.
  1486.  
  1487. The US Copyright Act of 1978 provides for severe penalties for infringement,
  1488. including actual and punitive damages on a per-occurance basis.  The value I
  1489. attach to MEX is in circulation of my name as a consultant and contract pro-
  1490. grammer; this circulation-of-name will be used as a basis for actual damages
  1491. in any infringement suit.
  1492.  
  1493. Legitimate commercial interests interested in custom versions of MEX, for
  1494. distribution as a for-profit product, should contact the author for rates,
  1495. royalty information and sample contracts.
  1496.  
  1497. ------------------------------------------------------------
  1498.  
  1499.                     Ronald G. Fowler
  1500.                     Fort Atkinsone, WI   53538
  1501.                     May 7, 1984
  1502.  
  1503.