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 / ENTERPRS / CPM / TERMS / MEX-128.ARK / MEX114.DOC < prev    next >
Text File  |  1992-11-04  |  77KB  |  1,925 lines

  1.                           1)   Overview: What is MEX?
  2.  
  3.  
  4.  
  5. MEX  is an acronym (sort of)  for Modem EXecutive;  its purpose is 
  6. to   build  upon  the capabilities provided  by various   terminal 
  7. emulation  and file transfer programs written for  CP/M-80.    MEX 
  8. provides,   in  one program,  a phone-number librarian and  editor 
  9. (supporting   mnemonnic 12-character names for phone numbers   and 
  10. load/save for phone number files),  a  powerful autodialer (allow-
  11. ing   lists of numbers to be called repeatedly until  one  answers 
  12. with a modem tone;   the entire list may be repeated any number of 
  13. times),   a  file transfer facility supporting three common proto-
  14. cols  (and "batch" file transfers),   a  "dumb-terminal"  emulator 
  15. that   includes the ability to dynamically  define   multiple-line 
  16. character   strings  under  a single key (and  save/load  sets  of 
  17. keystrings  to and from disk files),  a  STAT command that  allows 
  18. you   to  examine and change a wide range of operating  parameters 
  19. (especially  useful with the CLONE command,   which allows you  to 
  20. save a new copy of MEX to disk,   including any currently  defined 
  21. phone  numbers and keystrings),   a  batch-command file  processor 
  22. that   allows the program to take its input from a disk file  (al-
  23. lowing  unattended  use of MEX),   and an  on-line  help  facility 
  24. (employing  CP/M's  random-access  file accessing  functions   for 
  25. quick access) that completely documents the program. 
  26.  
  27. MEX combines the capability of many public domain utilities,   and 
  28. is  a superset of such programs as MODEM2,  MODEM7 and MDM.    MEX 
  29. provides more functionality than many commerical programs,  and is 
  30. gaining  ground on the top-of-the-line modem  packages,   such  as 
  31. Microstuf's  Crosstalk (TM).    But enough horn blowing ...  let's 
  32. get on with it. 
  33.  
  34. 2) Getting started: the physical modem overlay
  35.  
  36. First,  let me note that MEX,   as distributed,  contains no modem 
  37. I/O at all;   it will run on your computer as is (in fact, you can 
  38. do an initial evaluation of MEX without doing any installation  at 
  39. all),   but  commands dealing with the modem will elicit an  error 
  40. message.   To  be fully functional,   MEX needs modem driver  code 
  41. (written  in 8080  assembly language) installed internally;   this 
  42. driver code is called the physical modem overlay. 
  43.  
  44.  
  45. If  you're a user of Irv Hoff's MDM7  program,  you have  an  easy 
  46. progression path:  MEX uses a compatible overlay format,  and thus 
  47. almost any MDM overlay may be loaded directly into MEX.   In fact, 
  48. you can use the MLOAD program distributed with MEX to install  the 
  49. overlay   relatively painlessly (the use of the dreaded DDT is not 
  50. required). 
  51.  
  52. In  addition,   there  are a large number of  overlays  available, 
  53. written specifically for MEX,   that make available the full power 
  54. of the program. 
  55.  
  56. If  you don't have a MEX or MDM7  overlay,   you'll have to  write 
  57. your  own,  or,   if  you're not proficient in  assembly  language 
  58. programming,   find someone to write one for you.   If you have to 
  59. take this route,   use the Godbout Interfacer  overlay distributed 
  60. with MEX (named MXO-GBxx.ASM,   where xx is the revision level) as 
  61. a model.   This file is a full-featured overlay,  containing modem 
  62. dialing   drivers  and  a fully functional SET command (SET  is  a 
  63. user-defined  command,  used for such things as baud-rate   selec-
  64. tion,   answer/originate modem setup,  etc).  You can implement as 
  65. little or as much of the "fancy stuff" as you like.    If you  re-
  66. distribute  your  overlay,   please follow the naming  conventions 
  67. I've established for MEX overlay files:  "MXO-nnxx.ASM",  where nn 
  68. is  a 2-letter code identifying the overlay,   and xx is the  rev-
  69. ision level. 
  70.  
  71. Once you have an overlay file,  assemble it with ASM or MAC,  then 
  72. bind  it into the system with MLOAD.    The following example  as-
  73. sumes you're using the Godbout overlay;   if not,  just substitute 
  74. the name of your overlay for MXO-GB10: 
  75.  
  76.    ASM MXO-GB10         <<--- assemble the overlay
  77.    MLOAD MEX.COM=MEX10.COM,MXO-GB10   <<--- load a new MEX.COM
  78.  
  79. -Smartmodem overlay installation
  80.  
  81. If you have a Smartmodem (Hayes,  USR,  etc),  you'll want to take 
  82. advantage  of one of the the Smartmodem logical overlays (MEX  has 
  83. no  inbound Smartmodem code);   these overlays come in two  varie-
  84. ties,   and  you  can tell one from the other by the  first  three 
  85. characters of the filename:  MXO for the (older) "small"  overlay, 
  86. and "MXM"  for the newer and more capable overlay.   Note that the 
  87. MXO  overlay  type  is shared (confusingly enough)  with  the  MXO 
  88. physical  overlays (although I hope MXO physical overlays will die 
  89. out eventually as they are upgraded to MXM types).   You should be 
  90. aware   the the MXO logical overlay is located at the top  of  the 
  91. overlay  area (about 500 bytes starting at 0B00H),   and will work 
  92. with  any physical overlay that terminates before 0B00H (all known 
  93. overlays   do),  while the newer MXM overlays require  about  1000 
  94. bytes,   and  start at 0900H (you should check that your  physical 
  95. overlay ends before this point; most do). 
  96.  
  97. The  Smartmodem  overlays  provide  autodial  capabilities    and, 
  98. optionally, disconnect capability, using Smartmodem commands. 
  99.  
  100. Use   the following example as a guide for installing a Smartmodem 
  101. overlay and your physical overlay simultaneously (the   Smartmodem 
  102. overlay  is named MXM-SMxx.ASM --  xx is the revision level -- and 
  103. MXO-GB10.ASM  is the name of a typical MEX overlay;   replace  the 
  104. former with the name of your own overlay): 
  105.  
  106.   ASM MXO-GB103        <<--- assemble phys. overlay
  107.   ASM MXM-SM10       <<--- asm. Smartmodem overlay
  108.   MLOAD MEX.COM=MEX11.COM,MXO-GB10,MXM-SM10 <<--- build new MEX.COM
  109.  
  110. (The   order  is  important in the MLOAD command line due  to  the 
  111. structure of the overlays). 
  112.  
  113.  
  114. Some notes about the preceeding discussion:
  115.  
  116. The  version of MLOAD used MUST be 2.0 or greater;   earlier  ver-
  117. sions   didn't have the ability to load a HEX file over a  non-HEX 
  118. file. 
  119.  
  120. A  very few MDM7 overlays are not compatible;   such overlays  are 
  121. typified   by the requirement that they be revised with each  suc-
  122. ceeding   revision of MDM7.    These overlays  typically implement 
  123. dialing facilities for unusual modems (actually non-PMMI and  non-
  124. Smartmodem),   and require specific addresses within MDM7 in order 
  125. to function.   This was necessary because MDM7  does not provide a 
  126. redefinable   interface for dialing code (in spite of the  overlay 
  127. table   entry present for the dialing routine),  and worked  'nat-
  128. urally' only with Smartmodems and PMMIs.  As a result,  the major-
  129. ity of overlays written do not contain any dialing code,  and thus 
  130. will   function correctly with MEX (note that MEX allows a   fully 
  131. re-definable  dialing vector --  see MXO-PMxx.ASM for  details  --
  132. and thus may be extended for use with virtually any modem). 
  133.  
  134. 3)  Some  precepts:  Filespecs,  string arguments,  and  multiple
  135.     command-lines
  136.  
  137. Before detailing MEX's command set,   there are a few  topics   we 
  138. must address that apply generally throughout MEX. 
  139.  
  140. MEX   supports the same drive/user specification for files as Rick 
  141. Conn's ZCPR and ZCPR2: A  file may be prefixed by either the drive 
  142. name,   the user number or both (this extends to batch file trans-
  143. missions). 
  144.  
  145. Examples:
  146.  
  147.  [MEX] A3>>SB B3:*.ASM A9:*.OBJ C6:UPDATE.DOC
  148.  [MEX] A0>>DIR A12:*.SUB
  149.  [MEX] B3>>TYPE 5:REPORT.DOC
  150.  [MEX] C3>>T B6:SESSION.LOG
  151.  
  152. LOGGING DRIVES:   MEX supports relogging drive/user in two  ways,
  153. both of which are pertinent to a discussion of DU specifications:
  154.  
  155.  1) LOG command: Takes optional DU spec (trailing colon optional)
  156.     resets disk system
  157.  2) At command prompt: simply enter the DU spec (colon required)
  158.  
  159. Examples:
  160.  
  161.     [MEX] A0>>LOG  (relogs current d/u: resets system)
  162.     [MEX] A0>>LOG B:  (relogs current user, drive b, resets)
  163.     [MEX] A0>>LOG B7:  (relogs drive b, user 7, resets)
  164.     [MEX] A0>>B:  (logs current user, drv B, no reset)
  165.     [MEX] A0>>A9:  (logs drive A, user 9, no reset).
  166.  
  167. Several  MEX commands take string arguments.    These strings must 
  168. be   surrounded by quotatation marks,   and may contain   imbedded 
  169. control  characters (with the singular exception of binary   zero, 
  170. which will generate an argument error).    The caret ("^") is used 
  171. to prefix a control character. 
  172.  
  173. Thus,  you can specify multi-line strings within one string speci-
  174. fication.    Examples  (note that that the control-character ^M is 
  175. the carriage return code, and ^J is a linefeed): 
  176.  
  177.  KEY A="BILL USER;J^MWHATSNEW^MB:^MWHATSNEW^M"
  178.  SENDOUT "SD B:*.ASM^MCRCK *.BIN^M"
  179.  
  180. Additionally,  the  slant character ('/')  may be used  to  denote 
  181. several common control-character sequences: 
  182.  
  183.  
  184. /R    specifies a newline (Carriage return code only; same as ^M)
  185. /N    specifies carriage-return+linefeed
  186. /T    specifies a tab
  187. //    specifies the '/' character
  188. /Onnn specifies any binary value (except 0):  nnn is the decimal
  189.       value (all three digits must be present)
  190.  
  191. Note  that the command-separator character may be included  freely 
  192. within  a  string;   it separates your command strings outside  of 
  193. quotation marks only. 
  194.  
  195. MEX   supports multiple commands on a line,   both in READ  files, 
  196. and in directly typed commands.   A command line may optionally be 
  197. entered  on the CP/M invocation command line,   and this line  may 
  198. also  contain multiple commands.    Note that a READ command  will 
  199. "stack"  any current multiple commands;  when input from the  READ 
  200. file  is exhausted,   the remaining commands will then be executed 
  201. (a  control-C at any time will abort a running READ file and/or  a 
  202. multiple command line). 
  203.  
  204. The   multiple command separator in the file as distributed is the 
  205. semicolon   ";").    This  character may be changed with the  STAT 
  206. command ("STAT ESC") or by modifying the patch file. 
  207.  
  208. Examples:
  209.  
  210.    from CP/M:
  211.  
  212.  A>MEX DIR;READ MYFILE;SENDOUT "LOGOUT";BYE
  213.  
  214. This example will bring up MEX,  which will first print the direc-
  215. tory,   then begin executing MYFILE.MEX,  which may conain SENDOUT 
  216. commands  and R commands to send and receive  files.   When  input 
  217. from  MYFILE.MEX is exhausted,  MEX will send the string  "LOGOUT" 
  218. to the remote. Finally, MEX will execute the "BYE" command. 
  219.  
  220.    from MEX:
  221.  
  222.    [MEX] A3>>COMMAND: RB;SENDOUT "BYE";BYE
  223.  
  224. This  one receives a batch transmission,   sends the string  "BYE" 
  225. (gracefully logout from a remote CP/M system,  for example),  then 
  226. disconnects and exits to CP/M. 
  227.  
  228.  
  229. 4) Terminal mode
  230.  
  231. MEX   terminal  mode is entered with any of  the  single-character 
  232. commands  T,  L,   or E (the differences among the three  will  be 
  233. explained shortly). 
  234.  
  235. While in terminal mode,  you are communicating with the remote end 
  236. as  a  console;   your keyboard characters are transmitted to  the 
  237. remote, and the remote characters are displayed on your screen. 
  238.  
  239. There   are several functions that are available to you from  ter-
  240. minal mode,  all of which are invoked by typing the escape-charac-
  241. ter (do "STAT ESC"  at command level if you don't know your escape 
  242. character) followed by one of several characters;   this  combina-
  243. tion is called an "escape-sequence". 
  244.  
  245. Terminal mode escape-sequences: 
  246.  
  247. <ESC>-E   exits back to command level
  248. <ESC>-?   prints a menu of escape sequences
  249. <ESC>-S   start copying incoming text into file buffer
  250. <ESC>-U   end (un-start) copying text into file buffer
  251. <ESC>-P   toggle copy-to-printer on/off if enabled in the overlay
  252. <ESC>-T   transmit a file to the remote (prompts for a filename)
  253.  
  254. Note   that  <ESC>-S and <ESC>-U require a filename argument  with 
  255. the  T when you enter terminal mode (otherwise,  there is no  file 
  256. active to write the incoming text into). 
  257.  
  258. You  can use <ESC>-P to copy incoming text to the  printer.    The 
  259. text is held in a buffer,  and prints only as the printer is ready 
  260. for a character. Thus,  your printer may be slower than the modem, 
  261. and you won't lose characters unless the buffer fills up. 
  262.  
  263. Terminal-mode files (also called CAPTURE or ASCII-SAVE files)  are 
  264. created by entering a filename with the T (or E or L) command;  if 
  265. the file already exists,   you will be asked if the file should be 
  266. erased.  MEX  will create the new file,   and enter terminal mode. 
  267. You   may  also append to an existing file by specifying  the  "A" 
  268. secondary option (explained in more detail later). 
  269.  
  270. At this point,  incoming text is being saved;  you can temporarily 
  271. disable  this  by  using  the <ESC>-U  command;   use  <ESC>-S  to 
  272. continue   saving in memory (at the point where the  last  <ESC>-U 
  273. left  off).   You can perform as many start/stop sequences as  you 
  274. like  (when text-save is active,   you'll see a colon at the start 
  275. of each line as an indication that the save is active). 
  276.  
  277. You can exit terminal mode and move freely among drives and   user 
  278. areas without affecting an open term-file.   The LOG command (used 
  279. to  change drive/user and reset the disk simultaneously)  will not 
  280. be functional. 
  281.  
  282. If   you enter terminal mode with the T,E or L command witha file-
  283. name,  when a file is already open,  the open file will be closed, 
  284. and the new one opened. 
  285.  
  286. You  can transfer files using either Christensen or CIS  protocols 
  287. while  a TERM file is open --  your buffer may be written to  disk 
  288. to make room,  but nothing will be lost,   and the file will still 
  289. be open. 
  290.  
  291. To  close  the file when you're done saving text,   exit  terminal 
  292. mode with <ESC>-E,  and use the WRT command.    If you change your 
  293. mind,   and decide you don't want to keep the file after all,  use 
  294. the   DEL  command  to erase the file entry and delete  any   text 
  295. already saved in memory. 
  296.  
  297. When your printer or ASCII-save buffer fills,  MEX will send an X-
  298. OFF character to the remote.    MEX will then wait for the  remote 
  299. to stop,  and will save up to an additional 150 characters into an 
  300. auxiliary  buffer (this buffer may be increased in size by   modi-
  301. fying   MEXPATxx.OVR).  When  the remote stops (or  the  auxiliary 
  302. buffer  fills)  MEX will write the ASCII-save buffer to disk   (if 
  303. ASCII-save   is active)   and print characters until  the  printer 
  304. buffer is half-full (if List-copy is on).   Then MEX will re-start 
  305. the  remote  by sending an X-OFF character.   However,if  the  MEX 
  306. queue function is disabled (see the QUEUE STAT option in   section 
  307. 8), MEX will not save any additional characters after the X-OFF. 
  308.  
  309. Note  that  for this scheme to work,   the  remote  computer  must 
  310. respond  to  this X-ON/X-OFF "protocol" (most computers  do,   but 
  311. not all!). 
  312.  
  313. You   can transmit a local disk file to the remote  with  <ESC>-T; 
  314. you will be prompted for a filename.   If you have the XON and and 
  315. XLINE  variables  turned off (see section 8)  MEX will ask if  you 
  316. want to use the character and line delays for the filesend;  these 
  317. delays allow slow remote computers to receive files. 
  318.  
  319. The  WCHAR and WLINE variables determine the time-delay values for 
  320. each   character and each line respectively (of course,  you  must 
  321. have answered "Y"  to the "want delays?" prompt).    See section 9 
  322. for more discussion these variables. 
  323.  
  324. If  either  of the the XLINE or XON switches  is  ON,   the  delay 
  325. prompt will be skipped, and delays will not be used. 
  326.  
  327. XLINE  is  a technique used by some mainframes:   after a line  is 
  328. transmitted,   MEX will not transmit another until receiving an X-
  329. ON character from the remote. 
  330.  
  331. XON is more frequently used:   when XON is active,  MEX will  send 
  332. characters   at full speed,   but monitor the remote for an  X-OFF 
  333. character.   When an X-OFF is received,   MEX will pause until the 
  334. remote sends an X-ON character. 
  335.  
  336.  
  337. The APPEND secondary option:
  338.  
  339. MEX has a special feature that allows you to maintain 'log' files
  340. of  your sessions;  this is the 'A' secondary  option  (specified
  341. with  the T,  E or L primary commands when entering terminal mode
  342. IF a filename is specified).
  343.  
  344. When  you specify the 'A' secondary option,  MEX will search  the
  345. logged area (and/or the ALT area: see the ALT command description
  346. in  section  7 for more information on searching)  for the  file
  347. specified.   If found, MEX will scan to the end of the file, and
  348. append new data on to the end, rather than querying for an erase.
  349.  
  350. If  'A' is not specified,  MEX will limit its search to the  cur-
  351. rently logged DU,  and,  if the file is found, will ask you if it
  352. should erase the file.
  353.  
  354. In either case,  if the file is NOT found,  MEX will create a new
  355. file in the currently logged DU.
  356.  
  357.  
  358. 5) Single-character commands
  359.  
  360. The  most  commonly used MEX commands are implemented  as  single
  361. character commands, for ease of use.  These are:
  362.  
  363. S: Send a file or group of files using Christensen protocol
  364. R: Receive a file or group of files using Christensen protocol
  365. T: Enter terminal mode (may specify an ASCII-save file argument)
  366. E: Enter terminal mode with echo (filename argument ok)
  367. L: Enter terminal mode with local-echo only (filename ok here)
  368.  
  369. T,  E, and L are all variations of terminal mode: T sends keyboard 
  370. characters  to the remote and prints characters received from  the 
  371. remote on the console.  E  mode echoes received characters back to 
  372. the remote ("half duplex"  mode), and L echoes keyboard characters 
  373. on the console before they go out to the remote ("half duplex"  in 
  374. the other direction). 
  375.  
  376.  
  377. 6) Secondary commands (options)
  378.  
  379. Secondary   options modify the way the  single-character  commands 
  380. work,   and  are  normally  placed immediately after  the  single-
  381. character  command on the command line.    Following is a list  of 
  382. the secondary commands: 
  383.  
  384.      COMMANDS
  385. OPT   NAME    USED WITH   ACTION
  386. --- --------    ---------   ------
  387. A   Append      E,L,T       Append to a terminal-mode file
  388. B   Batch       R and S     BATCH mode, Christensen protocol 
  389. D   Disconnect  R and S     Disconnects after a file transfer
  390. E   Term/echo   R and S     Term-mode w/echo after transfer
  391. L   Local       T,E         Local-character echo
  392. Q   Quiet       R and S     Sets quiet mode for file transfer
  393. R   Recv-view   R and S     Shows received-characters only
  394. S   Send-view   R and S     Shows transmitted characters only
  395. T   Terminal-mode  R and S  Enter terminal mode after xfer
  396. V   View        R and S     Views the file transfer in ASCII
  397. X   Exit        R and S     Disconnect and exit after xfer
  398.  
  399. Note  that the options used with R and S are also effective   with 
  400. CIS transfers (except for the 'B'  option), if set with the GLOBAL 
  401. command (see the command description for "GLOBAL" in section 7). 
  402.  
  403. Examples of secondary options:
  404.  
  405. Primary Option
  406. |Secondary Options
  407. |||
  408. |||
  409. ST   MYFILE.FOO   <<== send MYFILE.FOO, go into Term. mode after
  410. RVT  CRACKER.JAK  <<== receive file with view, enter Term mode
  411. RQX  MONKEY.SHN   <<== recv file quietly, disconnect/exit after
  412. RBT    <<== recv batch files, Terminal mode after
  413. T    DISKFILE.SAV <<== enter term. mode, allow save to disk file
  414.     (note that the actual copy to the file must be
  415.      activated with ESC-S while in terminal mode)
  416. TA   DISKFILE.SAV <<== Enter tr area. The command
  417.  
  418. 7) Command descriptions
  419.  
  420. The following pages detail the command set recognized by MEX.   In 
  421. general,  the bracket characters denote optional items, and should 
  422. not be entered literally.  For example, the syntax descriptor 
  423.  
  424.   DIR [<du-spec>]
  425.  
  426. means that the du-spec is optional; hence,  the command syntax may 
  427. be satisfied with any of the following actual command lines: 
  428.  
  429.   DIR
  430.   DIR A3:
  431.   DIR 0:
  432.  
  433. Items  surrouded  in angle-brackets denote an  item's  type;   the 
  434. angle brackets should not be included in the actual command  line, 
  435. nor   should the description inside the angle brackets be  entered 
  436. literally.   In  the above example,  the descriptor <du-spec>   is 
  437. replaced with an actual drive/user specification. 
  438.  
  439. --------------------
  440.  
  441. We will now look at each command in detail,  in roughly alphabeti-
  442. cal order. 
  443.  
  444.  
  445. - The ALT command
  446.  
  447. The  ALT  command specifies the ALTernate drive/user area  to   be 
  448. searched by MEX for LOAD files (.PHN and .KEY),   READ files,  and 
  449. terminal capture files (when APPEND is on).  Syntax is 
  450.  
  451.   ALT <du-spec>
  452.  
  453. Examples:
  454.  
  455.   ALT A0:
  456.   ALT B3:
  457.  
  458. - The BELL command
  459.  
  460. The  BELL command rings the bell on your terminal (regardless   of 
  461. the setting of the STAT BELL,   which normally disables the bell). 
  462. BELL takes a single argument,  which specifies the number of times 
  463. to ring the bell.    BELL is intended for use in READ files,  as a 
  464. means   of  summoning the operator when a certain point has   been 
  465. reached in the READ file's execution). 
  466.  
  467. - The BYE command
  468.  
  469. BYE is used to return to CP/M (does not disconnect)  at the end of 
  470. a MEX session. 
  471.  
  472.  
  473. - The CALL command
  474.  
  475. The  CALL command is used to dial numbers either from the  library 
  476. or from the keyboard.   If you specify more than one number on the 
  477. command line,  CALL will try each until one answers with a carrier 
  478. tone.  For example, 
  479.  
  480.  CALL 16165559033 SENACA
  481.  
  482. will dial the first number; if busy (or no answer),  CALL will try 
  483. the second.   The special number '#' will cause the entire command 
  484. line to be repeated if none of the dialed numbers responds with  a 
  485. carrier: 
  486.  
  487.  CAL WESTWOOD 1-616-555-2040 TCBBS #
  488.  
  489. will try all three numbers repeatedly until one answers.   You may 
  490. optionally  place a limit on the number of retries by including  a 
  491. number after the '#': 
  492.  
  493.  CAL 555-1212 #48
  494.  
  495. A ^C will abort dialing at any time.
  496.  
  497. Phone-library  numbers may specify an optional baud rate (see  the 
  498. description  for  the  PHONE command for information  on  how   to 
  499. specify  the rate).   If a baud-rate is present,  CALL will change 
  500. the baud rate before dialing the number. 
  501.  
  502. Note that,  for this feature to work,   your hardware must be cap-
  503. able   of  changing the rate AND your overlay must  implement  the 
  504. NEWBD vector.   Most MEX overlays (overlays whose names start with 
  505. "MXO-")    allow this,   if the hardware is  capable  of baud-rate 
  506. change; most MDM overlays do NOT. 
  507.  
  508. - The CLONE command
  509.  
  510. The CLONE command allows you to save a new copy of MEX,   with the 
  511. current   options  intact  (including any defined  keystrings  and 
  512. phone numbers). The syntax is: 
  513.  
  514.   CLONE <filename>
  515.  
  516. Examples:
  517.  
  518.   CLONE MEX.COM
  519.   CLONE NEWMEX.COM
  520.  
  521. Clone  will prompt you for an erase-file operation if the   speci-
  522. fied file already exists on the disk. 
  523.  
  524. - The CLS command
  525.  
  526. CLS   clears  the  screen on your terminal (if supported  by  your 
  527. physical modem overlay).    Handy when a burst of noise leaves the 
  528. cursor atop a screenful of garbage,   but  requires   clear-screen 
  529. support in the physical overlay. 
  530.  
  531. - The COLD command
  532.  
  533. The  COLD command re-starts MEX and erases any defined  keystrings 
  534. along  with the phone library.  This is the only way to erase  the 
  535. entire phone  library with one command.    The COLD command   also 
  536. allows  you to remove the CIS protocol module (for those who don't 
  537. need it) ... do this: 
  538.  
  539.   STAT CIS OFF
  540.   COLD
  541.   CLONE <filename>
  542.  
  543. Note  that this removes the CIS module altogether (you can't   get 
  544. it back with the STAT CIS command).    This frees up roughly 1K of 
  545. memory. 
  546.  
  547.  
  548. - The CPM command
  549.  
  550. CPM   is a synonym for BYE,   and returns control to the operating 
  551. system without disconnecting. 
  552.  
  553. - The DEL command
  554.  
  555. DEL   is used to close and erase an open terminal file;  use  this 
  556. command when you change your mind about saving a terminal file. 
  557.  
  558. - The DIAL command
  559.  
  560.  
  561. The  DIAL  command performs the same task as  the  CALL   command, 
  562. except that  after calling,   DIAL returns to command mode   (CALL 
  563. goes to terminal mode). 
  564.  
  565. The   syntax for DIAL is exactly the same as the syntax for   CALL 
  566. (described previously),  including the multiple-number feature and 
  567. the repeat option. 
  568.  
  569. DIAL is intended to be used in READ files,   where it is desirable 
  570. for   the READ file to retain control after calling a number (READ 
  571. files  have no effect in terminal mode;  thus using CALL in a READ 
  572. file would pause execution of the read file when the distant   end 
  573. is reached). 
  574.  
  575. - The DIR command
  576.  
  577.  
  578. DIR  works  similarly to the CP/M DIR command,  and displays   the 
  579. disk  directory  on the screen.   DIR takes advantage  of  the  DU 
  580. specification,  thus  "DIR B7:"  will display all of the files  in 
  581. user  7  on drive B.    System files will be excluded if the  STAT 
  582. variable 'EXCLUDE'  is set to ON.   If EXCLUDE is OFF,  all  files 
  583. will be displayed. 
  584.  
  585. More examples:
  586.  
  587.  DIR C3:*.?Q?
  588.  DIR LOGIN.MEX
  589.  DIR 3:
  590.  
  591. - The DSC command
  592.  
  593. DSC  disconnects the modem from the phone line (may not be  imple-
  594. mented in all overlays). 
  595.  
  596.  
  597. - The ERA command
  598.  
  599. ERA  erases files,   similarly to CP/M's ERA.   The syntax  is  as 
  600. follows: 
  601.  
  602.    ERA <filename> [V]
  603.  
  604. The   filename may be ambiguous (e.g.,  *.ASM,  BOOT?.BAK).    ERA 
  605. always  displays a list of the files that are being  erased.    If 
  606. you specify the optional 'V' after the filename,  ERA will ask for 
  607. verification   before actually erasing the files (after displaying 
  608. the names). 
  609.  
  610. - The GLOBAL command
  611.  
  612. The GLOBAL command allows you to set the secondary options  (des-
  613. cribed previously) for the single character commands.  Any  op-
  614. tions  set this way will then be active for the  single-character
  615. commands  whether or not they are specified in the actual command
  616. line.  For example, if you prefer to go directly to terminal mode
  617. after a file transfer, do:
  618.  
  619.   GLOBAL T
  620.  
  621. You can also set the VIEW mode for CIS transfers by doing
  622.  
  623.   GLOBAL V
  624.  
  625. (note that this is the only way to "view" a CIS file transfer.
  626.  
  627. - The EXIT command
  628.  
  629. EXIT is a synonym for BYE,  and returns control to the operating
  630. system without disconnecting.
  631.  
  632.  
  633. - The HELP command
  634.  
  635. HELP  is used to access the on-line manual for MEX (contained  in
  636. the file HELP.MEX).  Syntax for the HELP command is as follows:
  637.  
  638. HELP   <<--- prints help for the HELP command
  639. HELP ?   <<--- lists available topics
  640. HELP <topicname> <<--- prints help information for a topic
  641.  
  642. HELP.MEX   must reside in the currently logged   drive/user   area 
  643. (unless you use an ALT area,  with the SEARCH variable).  Once the 
  644. help   file is opened,   you may move freely among drive and  user 
  645. areas   without affecting the operation of  HELP;   MEX  remembers 
  646. where the HELP file is located. 
  647.  
  648. Once  opened,   the HELP file will remain open for the duration of 
  649. the session, unless a LOG command is executed. 
  650.  
  651.  
  652. - The ID command
  653.  
  654. The  ID command allows you to configure the MEX ID string   (which 
  655. is  printed in the prompt,   and in error messages,   if the  STAT 
  656. ERRID switch is set to ON).    This is useful if you're communica-
  657. ting   with another computer running MEX;   if each computer has a 
  658. different ID string,  you're never in doubt as to which one you're 
  659. typing commands to, or which one printed an error message. 
  660.  
  661. The syntax for the ID command is
  662.  
  663.   ID <string>    (see "STRINGS")
  664.  
  665. The  string may be a multi-line string;   it's length in the stan-
  666. dard distributed MEX may not exceed 28 characters.    This  length 
  667. may  be different if your system overlay replaces the MEX defaults 
  668. (in fact, the overlay may disable this command altogether;  if the 
  669. "INVALID  COMMAND"  message appears when you attempt to use the ID 
  670. command, then this is probably the case). 
  671.  
  672. -The KEY command
  673.  
  674. The   KEY  command is used to manipulate the keystrings that   are 
  675. available   in  terminal mode.  There are several  forms  of   the 
  676. command: 
  677.  
  678. KEY        <<= prints out all of the keystrings
  679. KEY <keyname>=[<string>]     <<= defines a new keystring
  680.  
  681. Keyname is any valid ASCII character,   except for the set defined 
  682. as  the  terminal  mode escape-sequence  commands  (see   TERMINAL 
  683. MODE). 
  684.  
  685. In  the  second form,   above,  if <string> is omitted,  then  the 
  686. specified keystring is erased. 
  687.  
  688. Examples:
  689.  
  690.       KEY %="ATDT 14145559932"       <<= sets up the '%' key
  691.       KEY Q=         <<= erases the Q keystring
  692.  
  693. Note  that KEY names that duplicate terminal-mode commands will be 
  694. rejected   by  the  KEY command,   and an  error message  will  be 
  695. printed. 
  696.  
  697.  
  698. - The LOAD and SAVE commands
  699.  
  700.  
  701. LOAD   and  SAVE are used to load and save phone number and   key-
  702. string files.  Both commands take a filename argument. Examples: 
  703.  
  704.      LOAD A5:CBBSPHON.PHN   <<== loads a phone # file
  705.      LOAD ARPA.KEY    <<== loads a keystring file
  706.      SAVE C:NEWPHONE.PHN   <<== saves phone # file
  707.      SAVE 9:COMPUSRV.KEY   <<== saves keystring file
  708.  
  709. Note   that  the  filetype determines what type of file is   being 
  710. saved  (.PHN for phone number files,   .KEY for keystring  files). 
  711. Any other filetype will generate an argument error. 
  712.  
  713. - The LOG command
  714.  
  715. The   LOG  command allows you to reset the  drive  (for  switching 
  716. disks)  and,  optionally,  simultaneously change drive and/or user 
  717. area. The command syntax is 
  718.  
  719.   LOG <DU-SPEC>
  720.  
  721. where  DU-SPEC is either or both of the new drive to log into  and 
  722. the  new user area.    An optional colon may follow  the  DU-SPEC. 
  723. Examples: 
  724.  
  725.      LOG B7:     <<= reset, log in drive B user 7
  726.      LOG 7:     <<= reset, log user 7 current drive
  727.      LOG B:     <<= reset, log drive B current user
  728.      LOG      <<= reset, retain current user/drive
  729.  
  730. If either a terminal file or a READ file is open,   the disk-reset 
  731. will be denied and the LOG command will display an error message. 
  732.  
  733. If you want to change drive and/or user without a disk reset,  you 
  734. can do so without the LOG command:   just enter the DU spec at the 
  735. MEX command prompt. 
  736.  
  737. - The PHONE command
  738.  
  739. The   PHONE command may be used to query the phone number library, 
  740. as well as for adding and deleting numbers.  To add a number,  use 
  741. this form: 
  742.  
  743.   PHONE <id>=<number> [baud-rate]
  744.  
  745. Where ID is a string (up to 8 characters)  that you want to use to 
  746. call  out the number and <number> is the  telephone  number.    If 
  747. <id>   already  exists, it will be replaced.   <Baud-rate>  is  an 
  748. optional rate to be associated with the number,   used by the CALL 
  749. command.  To remove a number, do 
  750.  
  751.   PHONE <ID>=
  752.  
  753. To see the entire library, do
  754.  
  755.   PHONE
  756.  
  757. To see a single entry, do
  758.  
  759.   PHONE <ID>
  760.  
  761. Examples:
  762.  
  763. PHONE FONE=1-414-563-4013 1200 <<--- associates number w/FONE
  764. PHONE FONE=1-414-563-4013      <<--- same but no baudrate chg
  765. PHONE          <<--- lists the phone number lib
  766. PHONE FONE=         <<--- removes FORTFONE from lib
  767. PHONE FONE         <<--- prints entry for FORTFONE
  768.  
  769. - The PREFIX and SUFFIX commands
  770.  
  771.  
  772. PREFIX  and SUFFIX are used with the SENDOUT  command   (described 
  773. later). PREFIX is used to manipulate a special PREFIX string,  and 
  774. SUFFIX is used to manipulate a SUFFIX string. 
  775.  
  776. The   PREFIX  string is transmitted ahead of any  SENDOUT  string, 
  777. when the SENDOUT command is used,  and the SUFFIX string is trans-
  778. mitted  after.   This  simplifies  the construction  of   complex, 
  779. repetitive command lines to be sent to the remote. 
  780.  
  781. Either command without arguments prints the current value of   the 
  782. string.   To  change the string,  enter the string on the  command 
  783. line after the command. 
  784.  
  785. Examples:
  786.  
  787.       PREFIX ""        <<== sets null prefix string
  788.       PREFIX "XMODEM S "      <<== sets a prefix
  789.       SUFFIX "^M"       <<== set carriage-return as suffix
  790.  
  791. In  the second and third examples above,   the subsequent  SENDOUT 
  792. would work like this: 
  793.  
  794.   SENDOUT FOO.BAR
  795.  
  796. which would actually send out "XMODEM S FOO.BAR" <CR>
  797.  
  798.  
  799. - The READ command
  800.  
  801. The   READ  command causes MEX to take command lines from  a  disk 
  802. file.   This  can be handy for such things as controlling a set of 
  803. file   transfers  (especially when you can't be present  for   the 
  804. entire session)  and executing complicated login sequences   auto-
  805. matically.   READ, used with the EXTEND function (see the descrip-
  806. tion   of  the EXTEND variable in section 8)  provides a means  of 
  807. extending MEX's command set. 
  808.  
  809. The syntax for READ is:
  810.  
  811.  READ <filename> [<parm1>] [<parm2>] ...
  812.        \        \
  813.          \ ________\_____>> optional!
  814.  
  815.  
  816. The  READ file may contain any valid command EXCEPT another   READ 
  817. command.    These  commands may freely move among drives and  user 
  818. areas; MEX will remember where the READ file is located. 
  819.  
  820. Typically,  READ  files are created with a text editor,   and  may 
  821. contain  STAT commands to set MEX for a particular type of connec-
  822. tion,  DIAL commands to actually make the connection,  and SENDOUT 
  823. commands  to  log in at the destination.    It's possible  for  an 
  824. entire session to take place under a READ command. 
  825.  
  826. A READ file will terminate when the file ends, or when a CONTROL-C  
  827. is  seen at the console (aborting any command  with CONTROL-C will 
  828. abort the READ file). 
  829.  
  830. It's   important  to note that,  while you can use a READ file  to 
  831. enter  the  terminal mode,   the READ file is not used  while  the 
  832. terminal mode is active.    When you exit terminal mode,  the READ 
  833. file starts again. 
  834.  
  835. Normally, READ commands echo on the screen when they execute.  You 
  836. can inhibit this,   however,  by manipulating the SILENT  variable 
  837. (do STAT SILENT ON to inhibit the command echo). 
  838.  
  839. READ parameters are very similar to CPM's SUBMIT parameters;  they 
  840. are called ACTUAL parameters.   If they are present in the command 
  841. line,   they  will  be plugged into the FORMAL parameters  in  the 
  842. submit file.   This substitution facility provides a powerful tool 
  843. for generating multiple-purpose command files. 
  844.  
  845. Formal parameters occur in the READ file,   and take the form {n}, 
  846. where n is the parameter number;  these numbers correspond sequen-
  847. tially  with  the ACTUAL parameters entered on the command   line. 
  848. The ACTUAL parameters in the command line are substituted for  the 
  849. FORMAL  parameters in the READ file when the file is executed.   A 
  850. special  form  of FORMAL parameter allows a default value  to   be 
  851. used  if an ACTUAL parameter is not specified on the command line; 
  852. this  form  is {n:<text>} where n is the  parameter  number,   and 
  853. <text> is any arbitrary text to be used as the default. 
  854.  
  855. If the default form of the formal parameter is not used,   and  no 
  856. actual parameter is specified in the command line,  execution will 
  857. continue, but the parameter will be blank. 
  858.  
  859. Normally,   the parameters in the READ command line are terminated 
  860. by the space between parameters (or the end-of-line);   spaces can 
  861. be imbedded in the ACTUAL parameter by enclosing it in braces. 
  862.  
  863. I  know  this  all sounds quite complex,   but it's  really  quite 
  864. simple, as the following example will show. 
  865.  
  866. Assume a file named FILEGET.MEX contains the following lines: 
  867.  
  868. SENDOUT XMODEM S{2} {1:SENACA.DQR}
  869. R{2} {1:SENECA.DQR}
  870.  
  871. ( {2} and {1:SENACA.DQR} are FORMAL parameters). This file can be
  872. used in several ways:
  873.  
  874. READ FILEGET  will transfer SENACA.DQR to your system
  875. READ FILEGET MEX.UPD will transfer MEX.UPD to your system
  876. READ FILEGET *.NEW B will transfer all NEW files in batch mode
  877. READ FILEGET USQ.DOC VT will transfer FILEGET, viewed,then T mode
  878.  
  879. The  following line illustrates how to expand a parameter,   using 
  880. the   above  file,   and is useful only if MEX is running  on  the 
  881. remote end: 
  882.  
  883.  READ FILEGET {*.BOO NEWSTUFF.DOC} BX
  884.  
  885. (Transfers all .BOO files and NEWSTUFF.DOC) in batch  mode,   then 
  886. disconnects) 
  887.  
  888. If you turn the command extender on (STAT EXTEND ON),  the READ in 
  889. the above lines can be omitted,   making the READ file look like a 
  890. built-in  command.   This affects single-character commands  some-
  891. what:   the disk is searched before the the command is checked for 
  892. a  single;   you can avoid this by prefixing single character com-
  893. mand lines with a '*'  (eg, *RQ FILE.FOO). 
  894.  
  895. - The REN command
  896.  
  897. The REN command  syntax is similar to the CP/M's REN, except that
  898. DU  specifications may be employed in either the new OR  the  old
  899. filename (but not in both).
  900.  
  901. In general the syntax is
  902.  
  903.   REN <newfilename>=<oldfilename>
  904.  Examples:
  905.       [MEX] A0>> REN NEWFILE=OLDFILE      (uses A0)
  906.       [MEX] C9>> REN B6:REPORT.OLD=REPORT.DOC (uses B6)
  907.       [MEX] B4>> REN 6:MYFILE=B:YOURFILE      (uses B6)
  908.       [MEX] D4>> REN ERROR=C9:BLUNDER      (uses C9)
  909.  
  910. Note that the following REN commands will produce errors:
  911.  
  912.       [MEX] A0>> REN B3:SOMETHING=C:ELSE      (ambig drives)
  913.       [MEX] A0>> REN 6:ME=7:YOU        (ambig user #'s)
  914.  
  915. Also, ERA will prompt for erasure if the new name already exists.
  916. Before doing this,  it checks for the existence of the old  file-
  917. name,  and, if not found, aborts before checking for the presence
  918. of the new name. 
  919.  
  920.  
  921. - The SENDOUT command
  922.  
  923. SENDOUT  allows you to send an arbitrary string out to the  modem
  924. (see  STRINGS).   This is most useful in READ command files,  but
  925. can often be useful in normal interactive mode.
  926.  
  927. The syntax for SENDOUT is
  928.  
  929.   SENDOUT <string>
  930.  
  931. Before the specified string is transmitted,  a PREFIX string,   if 
  932. any,  is transmitted, followed by the string specified to SENDOUT, 
  933. and  terminated by a SUFFIX string  (if any;   the default  suffix 
  934. string is a return-code,   normally terminating the line  to   the 
  935. remote).  After transmitting the string, MEX will wait for a reply 
  936. from  the remote,  up to a pre-set number of seconds;   any  reply 
  937. will printed on your screen. 
  938.  
  939. Following  are settings and variables which affect  the  SENDOUT
  940. command:
  941.  
  942. SUFFIX: \  Described previously
  943. PREFIX: /
  944.  
  945. WTECHO:  Manipulated  by the STAT command,  this  switch-variable
  946. determines  whether or not SENDOUT validates its transmission  by
  947. waiting  for characters to be echoed from the remote. If set to
  948. ON, then SENDOUT checks each printing character it transmits with
  949. the  character as echoed by the remote.   If a mismatch  occurs,
  950. SENDOUT  marks an error,  sends a CANCEL character,  and awaits a
  951. TRIGGER  character from the remote.   It then begins  again,  and
  952. repeats  this cycle until either the transmission occurs  without
  953. error, or the error count is exceeded (which aborts SENDOUT).
  954.  
  955. If you use SENDOUT with WTECHO off, you'll also likely want to
  956. set TRIGGER to null (STAT TRIGGER ""), to avoid trigger-wait.
  957.  
  958. More factors affecting SENDOUT:
  959.  
  960. RETRY:  Manipulated  by the STAT  command,  this  value-variable
  961. specifies the error-retry count for SENDOUT before aborting.
  962.  
  963. CANCHR:  Manipulated  by the STAT command,  this  string-variable
  964. (single  character) specifies the character to be transmitted  to
  965. the remote to cancel the transmitted line after an error.
  966.  
  967. SODELAY:  Manipulated by the STAT command,  this  switch-variable
  968. ties  SENDOUT strings (and terminal-mode keystrings) to the WCHAR
  969. and WLINE time-delay values,  as long as WTECHO is off (if WTECHO
  970. is on, it takes precedence, and delays are not used).
  971.  
  972. TRIGGER:  Manipulated by the STAT command,  this  string-variable
  973. (single character) is the character the SENDOUT command waits for
  974. after an error-cancel, before proceeding with the retry.  If the
  975. other end doesn't echo, set TRIGGER to 0 (and WTECHO to OFF), and
  976. MEX will simply send its arguments and not worry about validating
  977. the  echoed string (this is the technique you should use to  send
  978. Smartmodem command strings, for example).
  979.  
  980.  
  981. - The SET command
  982.  
  983. SET is a command defined entirely by the overlay; if your overlay
  984. doesn't  implement the SET command,  MEX will print the  "invalid
  985. command" message when you try to invoke SET.
  986.  
  987.  
  988. - The SSET command
  989.  
  990. SSET is similar to SET, but is included for use of the Smartmodem
  991. logical overlay.   Not all Smartmodem overlays implement set, but
  992. those that do aren't guaranteed to use identical syntax.
  993.  
  994. - The SLEEP command
  995.  
  996. SLEEP is used to invoke a delay (handy sometimes in READ files).
  997. Syntax is:
  998.  
  999.    SLEEP n
  1000.  
  1001. where n is the number of seconds to wait (a ^C from the console
  1002. will abort the SLEEP command, as well as any active READ file).
  1003.  
  1004. SLEEP, used with the STAT CLOCK function, can be used to "tweak"
  1005. the  timing constants in MEX (by timing the actual SLEEP  period,
  1006. and  adjusting the CLOCK value until the SLEEP  argument  agrees
  1007. with the actual measured time).   This is especially useful  with
  1008. multi-tasking operating systems, such as MP/M and TurboDOS, where
  1009. background  processing wreaks havoc with the internal MEX  timing
  1010. constants.
  1011.  
  1012. - The STAT command
  1013.  
  1014. The  STAT command lets you examine certain system variables,  and
  1015. change certain others. In general, the syntax is as follows:
  1016.  
  1017.  STAT <KEYWORD>      <<== to examine a variable
  1018.  STAT <KEYWORD> <NEW-VALUE>  <<== to change a variable
  1019.  
  1020. The NEW-VALUE will depend on the context of the keyword in  ques-
  1021. tion.  For example,  most of the switch-type variables are either
  1022. ON or OFF, hence,
  1023.  
  1024.  STAT BAKFIL      <<== prints out ON or OFF
  1025.  STAT BAKFIL ON      <<== turns on BAKFIL
  1026.  STAT BAKFIL OFF      <<== turns off BAKFIL
  1027.  
  1028. The  value-type  variables,  on the other hand,  will  print  the
  1029. number or text associated with that variable. Setting the value
  1030. requires  the  entry in units associated with  that  value.   For
  1031. example,
  1032.  
  1033.  STAT REPLY 5   <== sets 5 seconds as SENDOUT reply time
  1034.  STAT WCHAR 4   <== set 40 ms as transmit-character delay time
  1035.          during a terminal-mode file send
  1036.  
  1037. Some  variables  are read-only,  most notably STAT BUFFER  (which
  1038. prints out the save-buffer and printer-buffer statistics).
  1039.  
  1040. To  obtain  a list of all of the options that can  be  viewed  or
  1041. changed with the STAT command, do
  1042.  
  1043.  STAT ?
  1044.  
  1045. Most of the STAT keywords are documented in section 8.
  1046.  
  1047. - The TERM command
  1048.  
  1049. The TERM command is used to activate a terminal-mode file, and is
  1050. generally of use within READ files.   TERM works exactly like the
  1051. single-character T command,  but does not actually enter terminal
  1052. mode.  TERM takes a filename as an argument.
  1053.  
  1054. Some examples:
  1055.  
  1056. TERM SESSION.LOG
  1057. TERM ROYALOAK.DIR
  1058.  
  1059. - The TERMA command
  1060.  
  1061. TERMA works exactly like TERM, but opens the file in append mode.
  1062. Thus it is similar to the single-character T command,  with the A
  1063. secondary option ("TA").
  1064.  
  1065. - The TYPE command
  1066.  
  1067. The  TYPE command prints files on the console, similarly to  the
  1068. CP/M TYPE command, but with pagination:  The syntax is:
  1069.  
  1070.   TYPE <filename> <'P'>
  1071.  
  1072. The optional 'P' will affect pagination at screen boundaries:  if
  1073. pagination  is OFF ("STAT PAGE OFF") then 'P' will cause the file
  1074. to be paged.  If pagination is ON ("STAT PAGE ON"), then 'P' will
  1075. inhibit pagination.
  1076.  
  1077.  
  1078. Examples:
  1079.  
  1080.     A2>>COMMAND: TYPE REPORT.DOC    (paged output if PAGE ON)
  1081.     A2>>COMMAND: TYPE REPORT.DOC P  (inhibits paging if PAGE ON)
  1082.  
  1083.  
  1084. - The SYSTEM command
  1085.  
  1086. SYSTEM is a synonym for BYE, and returns control to the operating
  1087. system without disconnecting the modem.
  1088.  
  1089. - The WRT command
  1090.  
  1091. WRT is used to close and save an open terminal file. An automatic
  1092. WRT  if  performed for you if you use any of  the  exit  commands
  1093. (BYE, EXIT,CPM, or SYSTEM) while a terminal-mode file is open.
  1094.  
  1095.  
  1096. 8) STAT variables
  1097.  
  1098. This  section  describes  the variables that may be  examined  or
  1099. changed with the STAT command.
  1100.  
  1101.  
  1102. - The ALERT variable
  1103.  
  1104.  
  1105. ALERT is a STAT value variable; it determines the number of times
  1106. the console bell will ring when a remote computer is reached with
  1107. the CALL and DIAL commands.   ALERT works only on calls that have
  1108. taken more than one dialing attempt to reach.
  1109.  
  1110. ALERT  is  handy  for dialing with the repeat  option  (see  CALL
  1111. command  in section 7 for more information about the  repeat  op-
  1112. tion): you can enter a number (or group of numbers) to be dialed;
  1113. with  ALERT  set non-zero,  you'll have an audible signal that a
  1114. call has been completed.
  1115.  
  1116.  
  1117. - The BAKFILE variable
  1118.  
  1119. BAKFILE  is  a STAT  Switch variable:  if ON,  any  command  that
  1120. creates  a  file when one of the same name already  exists  will,
  1121. instead  of erasing the old (or prompting for an erasure)  rename
  1122. the  old  with the same primary name,  and a  secondary  name  of
  1123. "BAK".
  1124.  
  1125.  
  1126. - The BELL variable
  1127.  
  1128. BELL enables or disables the console bell throughout MEX (ie,  in
  1129. terminal mode, command mode, and during file transfers).
  1130.  
  1131.  
  1132. - The BUFFER variable
  1133.  
  1134. BUFFER is not really a variable; use STAT BUFFER to print out the
  1135. ASCII capture buffer statistics (size, amount used, amount avail-
  1136. able).  In  addition, STAT BUFFER displays the  batch-filenames
  1137. buffer size (which determines the largest number of files that my
  1138. be transferred in one batch file transfer command).
  1139.  
  1140.  
  1141. - The CAPTURE variable
  1142.  
  1143. CAPTURE  is  a switch variable that may be  used  to  enable  or
  1144. disable  save-in-memory when a term file is open (it will  refuse
  1145. to  change  if no term file is open). CAPTURE  is  most  useful
  1146. within a  READ file to allow SENDOUT replies to be saved to  the
  1147. capture buffer.
  1148.  
  1149. - The TRIGGER and CANCEL variables
  1150.  
  1151. TRIGGER is a STAT CHARacter variable, and specifies the character
  1152. the SENDOUT command will look for before sending out its argument
  1153. (a  single-character  prompt from the remote).  To  disable  the
  1154. trigger-wait function altogether, do
  1155.  
  1156.   STAT TRIGGER ""
  1157.  
  1158. CANCEL is anoter CHAR variable,  and specifies the character  the
  1159. SENDOUT  command will send to the remote to cancel the line after
  1160. an error.
  1161.  
  1162.  
  1163. - The CHAR variable
  1164.  
  1165.  
  1166. CHAR is not really a varible,  but a command option to STAT  that
  1167. prints a list of all of the CHAR variables.
  1168.  
  1169.  
  1170. - The CHECKSUM and CRC variables
  1171.  
  1172. CRC  and  CHECKSUM  are switch variables;  the two  are  mutually
  1173. exclusive (that is,  turning one on turns the other off) and  set
  1174. the   preferred  type  of  error  checking  in Christensen  file
  1175. transfers.
  1176.  
  1177. CHECKSUM is a simple sum of the outgoing record;  CRC uses a more
  1178. sophisticated technique employing polynomial arithmetic,  and  is
  1179. thus  a better method (more errors are detected,  thus,  there is
  1180. less  chance of an incorrect record being received as if it  were
  1181. valid).
  1182.  
  1183. The  original MODEM2 protocol employed only  CHECKSUM  detection;
  1184. however,  in  the  past few years,  most versions of  Christensen
  1185. exchange programs have been rewritten to accept the CRC technique
  1186. as  well.   MEX will adapt to transmitting programs using  either
  1187. type of validation.
  1188.  
  1189. If  MEX is the transmitter,  it will switch modes  after  several
  1190. failed attempts to transmit a file,  thus allowing full compati-
  1191. bility with older modem programs.
  1192.  
  1193.  
  1194. - The CIS variable
  1195.  
  1196. CIS  is  a STAT switch:  when ON,  then Compuserve  protcol  file
  1197. transfers are allowed while in terminal mode.  If OFF, Compuserve
  1198. transfer  sequences  from the remote end are  ignored  altogether
  1199. (although  they are printed on the screen as  "normal" terminal-
  1200. mode characters).
  1201.  
  1202. CIS transfers always take place while in terminal mode;  there is
  1203. no  command to send or receive a file using CIS  protocol,  since
  1204. the remote Compuserve end must initiate the transfer.
  1205.  
  1206. Note  that  if you use the COLD command to restart MEX while  the
  1207. CIS  switch  is set to OFF,  then the  Compuserve  file  transfer
  1208. module will be removed altogether from the running copy of  MEX.
  1209. If  you  subsequently use the CLONE command to create a new  exe-
  1210. cutable  MEX.COM,  the additional space formerly used by the  CIS
  1211. module (about 1000 bytes) will be available  instead for  your
  1212. buffers.  You will not be able to use STAT to turn the CIS switch
  1213. back  on  (since there is no longer a CIS module in the  system).
  1214. This  feature  is intended for those users who do  not need  the
  1215. ability to do Compuserve-protocol transfers, and would rather not
  1216. waste space on an unneeded feature.
  1217.  
  1218.  
  1219. - The CLOCK variable
  1220.  
  1221. CLOCK is a STAT value variable;  you may set this variable to any
  1222. value  between 1 and 255.   The value is the CPU clock speed  in
  1223. tens of Megahertz (hence,  the speed may vary between .1 and 25.5
  1224. Mhz). You  can then use the CLONE command to make  this  change
  1225. permanent.
  1226.  
  1227. CLOCK  is  useful for "tweaking" MEX under varying conditions  of
  1228. load when running under multi-tasking operating systems,  such as
  1229. MP/M and TurboDOS.   When system load is heavy,  you can decrease
  1230. the CLOCK value,  causing MEX to spend less time in its  internal
  1231. timing loops.
  1232.  
  1233.  
  1234. - The DEBUG variable
  1235.  
  1236. DEBUG is a STAT switch that affects the Terminal mode in MEX.  If
  1237. DEBUG  is ON,  then characters received in Terminal mode are dis-
  1238. played in  a form similar to CP/M's DDT dump  (D)  command:  hex
  1239. values on the left side of the screen and the ASCII block (as the
  1240. output progresses) on the right.
  1241.  
  1242. You'll note that the ASCII right-side display is "buffered" until
  1243. 16  characters have been received.   After the 16th,  the  ASCII
  1244. right-side is printed. Therefore, if the remote's output pauses,
  1245. you'll see only the hex values until the remote sends more  out-
  1246. put.   Also,  exiting  Terminal  mode will display  any  buffered
  1247. ASCII.
  1248.  
  1249. DEBUG  is useful whenever it's necessary to know exactly what the
  1250. remote is sending (for example,  if you're connected to a  time-
  1251. share  network,  and can't transfer files,  a DEBUG  session  can
  1252. prove illuminating in determining just what is happening).
  1253.  
  1254. In DEBUG mode, the FILTER flag is ignored,  allowing all charac-
  1255. ters  to  reach the screen.   Additionally,  the CIS protocol  is
  1256. disabled while DEBUG is ON.
  1257.  
  1258.  
  1259. - The HEX and DECIMAL variables
  1260.  
  1261.  
  1262. HEX  and  DECIMAL are STAT switch variables;  they  are  mutually
  1263. exclusive (ie, turning one ON turns the other OFF.  These variab-
  1264. les specify the default input radix of commands that take numeric
  1265. arguments (e.g.,  SLEEP,  STAT VAL <#>, the '#' spec in CALL com-
  1266. mands, etc). If HEX mode is ON, then these numbers are consid-
  1267. ered Hexadecimal;  if DECIMAL mode is on (MEX is distributed with
  1268. DECIMAL ON), then they are considered decimal values.
  1269.  
  1270. You can force a decimal number,  regardless of the HEX or DECIMAL
  1271. mode,  by preceeding the number with a '$' character;  similarly,
  1272. the '#' character implies a decimal number.
  1273.  
  1274. HEX mode has a side effect:  it turns on HEX record count report-
  1275. ing in file transfers.
  1276.  
  1277.  
  1278. - The ERRID variable
  1279.  
  1280. ERRID is a STAT switch that enables and disables the printing  of
  1281. the MEX ID string in error messages.
  1282.  
  1283. The  ID string is useful in applications where you're  communica-
  1284. ting  with a remote computer running MEX (if each end has a  dif-
  1285. ferent ID code,  there is no problem confusing error  messages),
  1286. but  if you typically use MEX only with RCPM systems or timeshar-
  1287. ing  systems that don't run MEX,  you'll likely want to turn  off
  1288. the ERRID switch, and shorten the error messages.
  1289.  
  1290.  
  1291. - The EXCLUDE variable
  1292.  
  1293. EXCLUDE is a STAT switch-type variable.   It modifies the  action
  1294. of  commands  that take multiple-filename arguments (such as  DIR
  1295. and the batch-transmit SB).
  1296.  
  1297. If  EXCLUDE  is  ON,  then SYS files are skipped  over by  these
  1298. commands.
  1299.  
  1300.  
  1301. If EXCLUDE is OFF, then SYS files are included.
  1302.  
  1303. Thus,  you can exclude SYS files from a batchfile transmission by
  1304. STATting the EXCLUDE switch ON.  These files will also be exclude
  1305. from DIR listings while EXCLUDE is ON.
  1306.  
  1307. - The EXTEND variable
  1308.  
  1309. EXTEND is a STAT switch variable.   When turned on,  it  modifies
  1310. the  way MEX's command decoding works: if a command is not found
  1311. in MEX's command table,  MEX will pass the entire command line on
  1312. to READ, causing the command to look like a READ command (without
  1313. READ being present on the command line).
  1314.  
  1315. When  using  EXTEND,  you  may notice that  the  single-character
  1316. commands  are  searched  as disk files before  being  checked  as
  1317. built-in commands;  this is due to parsing constraints.  To avoid
  1318. the disk search when using single-character commands with  EXTEND
  1319. active, prefix the command withe a '*' (eg, *RQ FILE.FOO).
  1320.  
  1321.  
  1322. - The ESC variable
  1323.  
  1324. ESC  is  a STAT CHAR variable, and specifies your  terminal-mode
  1325. escape character,  used to activate terminal-mode functions (such
  1326. as  capture and printer buffer on/off, etc).  The argument is a
  1327. single character string.  Example:
  1328.  
  1329.    STAT ESC "^I"
  1330.  
  1331.      changes your escape character to the TAB key.
  1332.  
  1333.  
  1334. - The FILTER variable
  1335.  
  1336. FILTER is a STAT switch variable;  when ON, then abnormal control
  1337. characters are ignored when in terminal mode (with the exception
  1338. of carriage-return,  linefeed, backspace and tab).  If OFF, then
  1339. all  characters  from the remote will be displayed on the  screen
  1340. (and included in the ASCII-capture file,  if active). FILTER also
  1341. screens nulls and characters with the high-bit set.
  1342.  
  1343. FILTER ON  is useful if you're working with a noisy  connection,
  1344. and random garbage characters on the line are erasing or mangling
  1345. your screen display.
  1346.  
  1347. If  you're  using  a video-oriented text editor  at  the  remote,
  1348. you'll want to be sure FILTER is set to OFF,  in order to  allow
  1349. the video-control characters to be accepted by MEX.
  1350.  
  1351. Note that the CP/M end-of-file mark is specifically excluded from
  1352. ASCII-capture files regardless of the setting of FILTER (although
  1353. FILTER ON allows this character to go to the screen).
  1354.  
  1355.  
  1356. - The INITFILE variable
  1357.  
  1358. INITFILE is a STAT switch variable.  It determines whether or not
  1359. MEX  will  look  for the start-up file INI.MEX when it is  first
  1360. started.
  1361.  
  1362. INITFILE is intended to be used prior to running CLONE,  to  pre-
  1363. vent the cloned MEX from looking for INI.MEX.
  1364.  
  1365. For  more  information about the CLONE command,  see its  command
  1366. description in section 7.
  1367.  
  1368.  
  1369.  
  1370. - The LF variable
  1371.  
  1372. LF  is a switch variable:  if ON,  it affects terminal-mode  file
  1373. transmission by adding a linefeed after every carriage return.
  1374.  
  1375.  
  1376. - The LIST variable
  1377.  
  1378. LIST  is  a Switch variable,  and enables or  disables the  LIST
  1379. device.
  1380.  
  1381. - The PAGE variable
  1382.  
  1383. PAGE is a STAT value variable, and sets the number of lines to be
  1384. displayed on the screen, for commands like TYPE, HELP and STATUS,
  1385. which  paginate  their output.  Setting the PAGE variable  to 0
  1386. disables pagination by these commands.
  1387.  
  1388. - The PRECHO variable
  1389.  
  1390. PRECHO is  a STAT switch variable that enables and disables  the
  1391. logging of incoming characters to the printer.  It is similar to
  1392. the <ESCAPE>-P printer toggle command used in terminal mode,  and
  1393. is intended for use in READ files.
  1394.  
  1395. - The REPLY variable
  1396.  
  1397. REPLY is a STAT value variable,  and specifies the amount of time
  1398. (in seconds) that the SENDOUT command will wait,  after sending a
  1399. string,  for the remote end to send a reply.  Any such reply will
  1400. be  displayed  on your terminal screen;  if  a terminal-file  is
  1401. active and CAPTURE is on,  then the reply also goes to the term-
  1402. file. If PRECHO is active, the reply will go the list device as
  1403. well.
  1404.  
  1405. To query the REPLY constant, do: STAT REPLY
  1406.  
  1407. To set the REPLY time, do:  STAT REPLY <value>
  1408.  
  1409. where  <value> is the number of seconds to wait,  between  0  and
  1410. 255.
  1411.  
  1412. - The RETRY variable
  1413.  
  1414. RETRY is a STAT value variable, and specifies the number of times
  1415. the  SENDOUT command will attempt to send a string before  abort-
  1416. ing.   Note  that  if the Wait-For-Echo switch (WTECHO)  is  off,
  1417. RETRY will have no effect, since no error can occur.
  1418.  
  1419. To query the RETRY constant, do: STAT RETRY
  1420.  
  1421. To set the RETRY constant, do:  STAT RETRY <value>
  1422.  
  1423. where <value> is the number of retries, between 1 and 255.
  1424.  
  1425.  
  1426. - The RTIME varible
  1427.  
  1428. RTIME is a STAT value variable,  and affects Christensen-protocol
  1429. file transfers.
  1430.  
  1431. RTIME is the amount of time (in seconds) that MEX will wait for a
  1432. character  from the remote end before declaring  a  timeout,  and
  1433. initiating a record-retransmission sequence.
  1434.  
  1435. RTIME  is  set for one second in the standard  distribution  MEX;
  1436. this  is  more than adequate for RCPM work,  and MEX-to-MEX  file
  1437. transfers where each end is running under a single user operating
  1438. system.   But when working with a mainframe-type connection  (and
  1439. sometimes  when a remote MEX is running under  MP/M),  especially
  1440. when a packet-switched network is part of the connection, charac-
  1441. ter delays can easily exceed one second.   In these environments,
  1442. you'll want to set RTIME to a higher value (16 seconds is recom-
  1443. mended; the maximum is 255).
  1444.  
  1445. - The RUB variable
  1446.  
  1447. RUB is a STAT switch variable and affects terminal mode:  if  ON,
  1448. then the local backspace key is converted to RUB when the charac-
  1449. ter is transmitted to the remote.
  1450.  
  1451. - The SEARCH varible
  1452.  
  1453. SEARCH is a STAT variable that may take on the values 0,  1, 2 or
  1454. 3.   SEARCH specifies a search path for READ files, phone librar-
  1455. ies, keystring files, and (if the append secondary option, 'A' is
  1456. specified)  terminal-mode ASCII capture files.  These files nor-
  1457. mally are taken only from the currently logged DU;  by modifying
  1458. SEARCH, you can change the way MEX finds these files.
  1459.  
  1460. Two  drive/user (DU) areas are possible:  the currently logged DU
  1461. and  the Alternate DU (see section 7 for information on  changing
  1462. the alternate DU).
  1463.  
  1464. If SEARCH=0, then only the currently logged DU is searched.
  1465. If SEARCH=1, then only the ALT DU is searched.
  1466. If SEARCH=2, then the currently logged is searched;  if the file
  1467.       is not found, then the ALT DU is searched.
  1468. If SEARCH=3, then the ALT DU is searched;  if the file is  not 
  1469.       found, then the currently logged DU is searched.
  1470.  
  1471.  
  1472. - The SODELAY variable
  1473.  
  1474. SODELAY  is a switch variable; when ON,  SENDOUT  arguments  and
  1475. keystrings  sent  from terminal mode are tied to the  WCHAR  and
  1476. WLINE  delay  variables  normally  used to  transmit  a  file  in
  1477. terminal mode. This provides a conventient means of transmitting
  1478. passwords,  etc. to the remote from within a READ file (you don't
  1479. have  to force MEX to wait for an echo that never comes,  yet you
  1480. don't run the risk of overrunning the remote input buffer).
  1481.  
  1482. Note  that,  for SODELAY to have any effect,  the  WTECHO  switch
  1483. variable  must be OFF (WTECHO takes preference if both are active
  1484. at the same time).
  1485.  
  1486. - The SPLIT variable
  1487.  
  1488. SPLIT  is a STAT switch variable that affects the screen  display
  1489. of  the  phone library (done from the PHONE command or the  CALL
  1490. command).
  1491.  
  1492. This variable is set ON in the distribution version of MEX,  but
  1493. may  be turned OFF if you're using a terminal with an  extra-wide
  1494. display, to effect a more compact phone library display using two
  1495. entries per screen line.  This compact display does not, however,
  1496. provide  a number's optional baud-rate (as does the display  when
  1497. SPLIT set to ON).
  1498.  
  1499. - The SILENT variable
  1500.  
  1501. SILENT is a STAT switch variable, and, when ON, inhibits the echo
  1502. of command lines in READ files.
  1503.  
  1504.  
  1505. - The SWITCH variable
  1506.  
  1507. SWITCH is not really a varible;  it requests the STAT command to
  1508. list out all of the switch-type variable.
  1509.  
  1510. - The TAB variable
  1511.  
  1512. TAB  is a switch variable that can be used to enable  or  disable
  1513. the internal tab expander within MEX; this is sometimes necessary
  1514. when using certain terminals with remote screen editors.
  1515.  
  1516. Note that TAB is set to ON in the distribution version of MEX.
  1517.  
  1518. - The VAL variable
  1519.  
  1520. VAL  in not really a variable; it requests the STAT  command  to
  1521. list out all of the value-type variables.
  1522.  
  1523. - The WCHAR and WLINE variables
  1524.  
  1525. WCHAR and WLINE  are value variables; they specify delay times in
  1526. simple file  transmissions done within terminal mode  (with  the
  1527. <ESC>- T  command).  When you transfer a file, MEX will ask  you
  1528. whether you want to use these delays.
  1529.  
  1530.     WCHAR is the delay to use between characters.
  1531.    (0-9, in 10's of milliseconds)
  1532.     WLINE is the delay to use between lines
  1533.    (0-9, in 100's of milliseconds)
  1534.  
  1535. WCHAR  and  WLINE delays are often needed for  timesharing  main-
  1536. frames and BBS's written in BASIC, to allow the slower remote end
  1537. to  catch  the entire file.   These variables are also using  in
  1538. keystrings and SENDOUT arguments when SODELAY is ON and WTECHO is
  1539. OFF.
  1540.  
  1541. - The WECHO variable
  1542.  
  1543. WECHO  is  a value variable that affects the use of  the  SENDOUT
  1544. command.   WECHO is the time,  in seconds, that SENDOUT will wait
  1545. between  characters  during  a reply  from  the  remote,  before
  1546. considering  the reply ended. This should not be confused  with
  1547. the REPLY variable,  which is the maximum amount of time to wait,
  1548. after  sending a  string,  before considering that no reply  is
  1549. forthcoming.
  1550.  
  1551. - The WTECHO variable
  1552.  
  1553. WTECHO is a STAT switch variable,  and determines whether or  not
  1554. keystrings  and  SENDOUT command lines transmitted to the  remote
  1555. are validated by comparison with their echoed characters.
  1556.  
  1557. When  WTECHO is ON,  all printing characters transmitted  to  the
  1558. remote must echo correctly back from the host;  this effectively
  1559. halves the transmission rate,  but provides error detection feed-
  1560. back  for the SENDOUT command, allowing it to cancel a line  and
  1561. retry.
  1562.  
  1563. If you're sending command strings out to a line that doesn't echo
  1564. the characters,  you'll want to set WTECHO off.  Additionally, if
  1565. you're using the SENDOUT facility, you'll want to also remove the
  1566. trigger  string  (you  can do this with STAT  TRIGGER  "",  which
  1567. effectively removes the trigger character.
  1568.  
  1569.  
  1570. - The SEP variable
  1571.  
  1572. SEP  is a STAT character variable,  and allows you to change  the
  1573. character  used to separate commands when using multiple commands
  1574. on a line.  The argument is a single character string. Example:
  1575.  
  1576.    STAT SEP "$" 
  1577.  
  1578. changes your command separator to the "$" character.
  1579.  
  1580.  
  1581. - The XLINE variable
  1582.  
  1583. XLINE is a STAT switch that affects terminal-mode file transfers.
  1584. If  XLINE is set to ON,  then the file will be transmitted,  one
  1585. line  at  a time;  each succeeding line will not  be  transmitted
  1586. until an X-ON character is received from the remote.
  1587.  
  1588. XLINE  is used with a very fewe timeshare and network  computers,
  1589. almost never with RCPM and BBS systems.
  1590.  
  1591.  
  1592. - The XON variable
  1593.  
  1594. XON is a STAT switch variable that affects the terminal-mode file
  1595. send  (see TERMINAL MODE for a full description of  terminal-mode
  1596. file send).
  1597.  
  1598. When XON is set to ON, MEX will send all characters to the remote
  1599. at  full speed,  but will monitor for an X-OFF character from the
  1600. remote.   When MEX sees the X-OFF,  it will pause,  allowing  the
  1601. remote to read all of the input MEX has transmitted. When  MEX
  1602. sees  an X-ON character from the remote,  it will resume the file
  1603. transmission.
  1604.  
  1605.  
  1606.  
  1607. 9) About the source code (and other stuff).
  1608.  
  1609. Some users will note that MEX is distributed without source code;
  1610. this  is not an oversight.   MEX has required a very  substantial
  1611. investment in development time,  and I've become very  possessive
  1612. of  the  program (especially in light of what's happened with  so
  1613. many  other programs appearing in source form on  various  RCPM's
  1614. and  through user groups -- they tend to get modified to death by
  1615. people who  do  not  properly consider  the  effects of  their
  1616. changes).   For this reason,  I will not be releasing source code
  1617. for MEX in any form, beyond the source for the overlay files.
  1618.  
  1619. I do intend to maintain the program as responsibly as is possible
  1620. for any non-funded project.   In addition,  a number of  enhance-
  1621. ments  are planned for this fall,  to culminate in a 2.0  release
  1622. that  will  offer significant enhancements (including  a  simpler
  1623. overlay  structure,  a far-more powerful READ command  processor,
  1624. including nested reads and conditional execution,  smart-terminal
  1625. emulation,  and the capability of MEX to act as a remote terminal
  1626. server,  similar  to  the public domain BYE program). It's  not
  1627. likely that MEX 2.0 will be distributed without charge  (as  MEX
  1628. 1.0 is);  you can, however, be assured that it will be one of the
  1629. cheapest terminal programs available for CP/M and as well suppor-
  1630. ted as any commercial product available.
  1631.  
  1632. 10) Support
  1633.  
  1634. MEX  has  been beta-tested among a small group over the last  few
  1635. months;  however,  the nature of software development implies the
  1636. existance  of  a microscopic fissure through which  program  bugs
  1637. will invariably ooze,  escaping detection by all but the  omnipo-
  1638. tent (I am, sadly, not among that group).
  1639.  
  1640. So  if you detect errors or bugs in MEX,  I would like  to  know
  1641. about it. You can reach me through the following avenues:
  1642.  
  1643.   Arpanet:  Send mail to RFOWLER@SIMTEL20.ARPA
  1644.   RCPM:     Fort  Fone File Folder,  Fort Atkinson, WI (owned and 
  1645.      operated  by Al Jewer).   (414) 563-9932,  running a 
  1646.      Compupro  40  MB hard disk and Frank  Wancho's  RBBS4
  1647.      message system.
  1648.   US Mail:  My mailing address is Route 1,  Box 7, Fort Atkinson,
  1649.      Wi.; be aware that I am very slothful about answering
  1650.      non-electronic mail (ie, you may never get an answer).
  1651.   Phone:    None.   Please do  not call me at home; this raises
  1652.      hell with my family, and I'm not normally able to re-
  1653.      spond in "real-time" in any case.
  1654. If you report a bug, please be as explicit as possible, detailing
  1655. any unusual overlay configurations, STAT variables, and any other
  1656. conditions you feel are pertinent.  Bug reports like
  1657.  
  1658.   "Terminal mode doesn't work right"
  1659.  
  1660. are totally useless; all I can do is ignore such reports.
  1661.  
  1662. Feature requests for future releases of MEX are welcomed.
  1663.  
  1664.  
  1665. 11) Credits
  1666.  
  1667. I'd like to thank the following individuals for their  participa-
  1668. tion  in the development of MEX,  which included many suggestions
  1669. for features, beta site testing and helpful feedback (and, in the
  1670. cases  of Bob Plouff and Frank Wancho, code examples from  their
  1671. own communicatons programs):
  1672.  
  1673. Bob Plouffe Dick Mead     Keith Petersen  Al Jewer
  1674. Frank Wancho Sigi Kluger   David Sternlight  Shawn Everson
  1675. Dave Kozinn Charlie Strom Eric Stork
  1676.  
  1677. Special thanks must go here also to Ward Christensen,  who  wrote
  1678. the  original MODEM program from which all others have descended,
  1679. Mark Zeiger,  who developed the batch-file transfer protocol  ex-
  1680. tension to Ward's original MODEM2 protocol,  Irv Hoff, whose work
  1681. with  MDM7  provided  a foundation for a  common  overlay  format
  1682. between  MEX and MDM7, and the dozens of others who have contri-
  1683. buted to the development of the many versions of  MODEM2,  MODEM7
  1684. and  MDM  (from which MEX began with a healthy advance along  the
  1685. learning curve).
  1686.  
  1687. 11) Distribution and a warning to illicit profit-takers
  1688.  
  1689. MEX  and  its documentation are Copyright (C) 1984 by  Ronald  G.
  1690. Fowler.   A license is extended to users to copy and exchange the
  1691. program  and  documentation with the sole restriction  that  such
  1692. distribution  must  be non-commerical in nature (this is  not  to
  1693. imply that charges for such things as diskettes and modest  copy-
  1694. ing  and  mailing fees are of themselves commercial  in  nature).
  1695. Resale for  profit  may be done only with  the  express  written
  1696. consent of the author, Ronald G. Fowler.
  1697.  
  1698. The  US  Copyright Act of 1978 provides for severe penalties  for
  1699. infringement,  including  actual and punitive damages on  a  per-
  1700. occurance basis.
  1701.  
  1702. Legitimate  commercial interests interested in custom versions of
  1703. MEX, for distribution as a for-profit product, should contact the
  1704. author for rates, royalty information and sample contracts.
  1705.  
  1706.  
  1707.     Ronald G. Fowler
  1708.     Fort Atkinson, WI   53538
  1709.     August 20, 1984
  1710.  
  1711.  
  1712.  
  1713.    Appendix 1: Buffer Modification
  1714.  
  1715. This  section explains the buffering scheme used in MEX,  and how
  1716. you can change it using the MEXPAT overlay file.
  1717.  
  1718. MEX  employs  a number of dynamically-allocated buffers for  such
  1719. things as terminal-file  storage,  printer  buffer,  keystrings,
  1720. modem pre-read queue,  and the phone library. The size of these
  1721. buffers are defined in a fixed area of MEX;  you can change their
  1722. values by editing and assembling MEXPATxx.ASM,  then using MLOAD
  1723. to bind in the new values:
  1724.  
  1725.   ASM MEXPAT11
  1726.     MLOAD MEXNEW.COM=MEX.COM,MEXPAT10
  1727.  
  1728. The variable labeled PSIZE in the MEXPAT file defines the  number
  1729. of Kbytes to use for the printer buffer.   This can be set as low
  1730. as  0, or as arbitrarily large as you'd like.  The variable la-
  1731. beled  ASIZE  performs a similar function for  the  terminal-mode
  1732. file capture buffer,  but must be set to 2 or greater, to reserve
  1733. the minimum 2K space for file transfers.
  1734.  
  1735. One  of  the two (and only one) must have the value  255  (0FFH);
  1736. this defines a particular buffer as the "top" buffer ...  ie, the
  1737. buffer allocated after all other space has been  allocated,  and
  1738. extends  to  the top of the TPA.   This is  usually  the  largest
  1739. buffer,  and  I recommend that this be the terminal-mode  capture
  1740. buffer, since that is the most frequently used buffer.
  1741.  
  1742. The  PHSIZE label defines the maximum size of the phone  library,
  1743. in entries.   Currently an entry is 43 bytes long,  so the "stan-
  1744. dard" value for PHSIZE of 30 results in a phone library consuming
  1745. almost 1300 bytes.
  1746.  
  1747. Similarly,  the  KYSIZE variable defines the amount of space  (in
  1748. bytes) reserved for terminal-modem keystrings.   The  "standard"
  1749. value is 400 bytes.
  1750.  
  1751. If  you don't use phone libraries or keystrings,  either variable
  1752. may  be set to zero,  and the resulting space reclaimed  for  the
  1753. "top" buffer.
  1754.  
  1755. Another buffer variable is the NSIZE label: this defines the size
  1756. of  the  file-transfer batch filenames buffer (in  Kbytes).   For
  1757. each 1K allocated to this buffer,  you can transmit 85 files at a
  1758. time. Hence, if 85 files are not enough, you can set NSIZE to 2
  1759. and  transmit 170 files at a time.   If you don't use batch  file
  1760. transfers,  you can set this variable to 0, and reclaim the space
  1761. for the "top" buffer.
  1762.  
  1763. The XSIZE label defines the number of Kbytes for the file  trans-
  1764. fer disk buffer;   note that this is not an allocated buffer, but
  1765. resides  within the terminal-mode file buffer.  XSIZE is used to
  1766. restrict the actual size of the buffer,  and should be less  than
  1767. or equal to ASIZE.  This restriction is necessary in systems with
  1768. extremely slow floppy disks, since there is the possiblity of the
  1769. remote end timing out while MEX flushes its disk buffer.
  1770.  
  1771. PQSIZE defines the size of the queue used to service the modem at
  1772. certain  times (such as after sending an X-OFF to the remote when
  1773. the terminal-file buffer fills up,  during the overflow wait time
  1774. SENDOUT strings,  and within certain long loops,  when there is a
  1775. possibility of losing characters).  This buffer must be a minimum
  1776. of 2 bytes, and may be as arbitrarily large as you'd like.  There
  1777. is  little to gain in increasing the size,  however,  unless  you
  1778. consistently run at speeds greater than 1200 baud.
  1779.  
  1780. You may at some time see the message "Not enough memory for MEX!"
  1781. minimum buffer requirements.   Normally, this will only happen in
  1782. small  memory segments (when you're running a small CP/M  system,
  1783. for example, or running in a small MP/M segment), but you'll also
  1784. see it if you've increased MEX's buffers too much.
  1785.  
  1786. The  only recovery possible is to reduce some of the buffers  (or
  1787. obtain more memory).
  1788.  
  1789.  
  1790.  
  1791.    Appendix 2: Alternate Long Distance Service numbers (ALDS):
  1792.  
  1793. This  appendix details the use of Alternate Long Distance Service
  1794. (ALDS) numbers with MEX.
  1795.  
  1796. You may have two ALDS numbers defined; simply enter them as  you
  1797. would  any  other  number,  but give them a name of  '>'  or  '<'
  1798. (normal delay characters, passwords, etc may be included).  Then,
  1799. if  you have a number you'd like to route through your ALDS  ser-
  1800. vice,  simply prefix it with the associated '>' or '<'.  An exam-
  1801. ple should clarify this:
  1802.  
  1803. You  have MCI service, your password is 98765,  and it takes 2-4
  1804. seconds  to connect after the number is dialed.   You  also  have
  1805. Sprint (you cover all your bases,  don't you?),  the password is
  1806. 12345, and it sometimes takes 6 seconds to reach the number after
  1807. it is dialed. Finally,  you have a Hayes Smartmodem; a comma in
  1808. the  dialing string is a 2-second pause (is it really?  I  don't
  1809. have a Hayes, so let's pretend).
  1810.  
  1811. In order to use both services, we'll put one number on the > key:
  1812.  
  1813.  [MEX] A0>>PHONE >=555-9122,,98765   <<--- MCI
  1814.  
  1815. note  the  four  second  delay with  the  two  commas, then  the
  1816. password.
  1817.  
  1818. Now Sprint:
  1819.  
  1820.  [MEX] A0>>PHONE <=555-8144,,,12345
  1821.  
  1822. <longer delay, different password>.
  1823.  
  1824. Now RBBS Rockhead is a long,  long distance call;  it's available
  1825. only through Sprint (and,  of course, Ma Bell). We decide that if
  1826. we  can't  make  it through Sprint,  we don't want to  call  RBBS
  1827. Rockhead.  Here's how we enter the number:
  1828.  
  1829.  [MEX] A0>>PHONE ROCKHEAD=<202-555-1414
  1830.  
  1831. Now RBBS Aristocrat is our favorite BBS;  if Sprint is jammed up,
  1832. we'd like the option of dialing it over (ugh) Ma Bell lines.   So
  1833. we define it without an ALDS marker, like this:
  1834.  
  1835.  [MEX] A0>>PHONE ARISTOCRAT=202-555-2222
  1836.  
  1837. Now  notice that we can still call Aristocrat through  Sprint  or
  1838. MCI with:
  1839.  
  1840.  [MEX] A0>>CALL <ARISTOCRAT  <<--- Sprint
  1841.  [MEX] A0>>CALL >ARISTOCRAT  <<--- MCI
  1842.  
  1843. But we must explicitly enter the ALDS symbol in the CALL command.
  1844.  
  1845. Since  Rockhead is defined with a leading '<', it will always go
  1846. through MCI;  we don't have to supply an ALDS symbol in the  CALL
  1847. command  (we  can switch to the other ALDS  number,  however,  by
  1848. specifying  the other ALDS symbol in the CALL  command;  eg,"CALL
  1849. >ROCKHEAD"   will switch to MCI even though we've defined  Sprint
  1850. as Rockhead's ALDS number).
  1851.  
  1852. In short,  the left or right arrow specification is treated as if
  1853. its ALDS number were part of the number being dialed.
  1854.  
  1855.  
  1856.  Appendix 3: Hints on using SENDOUT and keystrings
  1857.  
  1858. There  have  been some queries regarding  keystrings, and  some
  1859. problems  reported  in using them on RCPM systems.   I'd like  to
  1860. clarify their use a little.
  1861.  
  1862. First, there  is  a variable that may be changed with the  STAT
  1863. command that directly affects keystrings: this varible is WTECHO.
  1864. When this switch-variable is turned ON,  MEX will send each char-
  1865. acter, then wait for it to echo from the remote end. If you're
  1866. sending  into  a system that allows type-ahead (most  time-share
  1867. computers,  Compuserve,  Arpanet, some MP/M and TurboDOS systems,
  1868. etc), it is best to turn this variable OFF; the keystring will be
  1869. transmitted a lot faster.  If you're dealing with an RCPM system,
  1870. however,  you might well overrun the receiving end with the  key-
  1871. string (especially if you're transmitting into a BASIC  program,
  1872. such as RBBS). For such systems,  you should turn WTECHO ON; MEX
  1873. will then wait for each character to be echoed from the remote.
  1874.  
  1875. The rest of this discussion addresses the same topic with respect
  1876. to the SENDOUT command.
  1877.  
  1878. WTECHO also affects the SENDOUT command in the same way; there is
  1879. a  difference between SENDOUT and keystrings,  however,  that you
  1880. must  be  aware of:   SENDOUT tries its best to send  the  string
  1881. correctly when WTECHO is on;  if an echoed character is different
  1882. than the transmitted character,  SENDOUT will send a cancel char-
  1883. acter and try again (up to a retry-limit).
  1884.  
  1885. The  retry-limit and  the trigger and cancel characters  are  all
  1886. STAT  variables,  allowing them to be changed with the STAT  com-
  1887. mand.  The trigger-character in the distributed MEX is the right-
  1888. arrow  ('>');  this is most handy for RCPM systems (which  prompt
  1889. each  command  with a right-arrow).   If you want to use  SENDOUT
  1890. with non-CP/M systems (or with RCPM programs that use a different
  1891. prompt),  you'll need to change the trigger character. For exam-
  1892. ple,  if you're sending commands to a remote PIP,  you'd want  to
  1893. use  PIP's  asterisk  ('*') as the trigger,  so  you'd do:
  1894.  
  1895.    STAT TRIGGER "*"
  1896.  
  1897.   For  sending commands to a Smartmodem (with the modem  set  to
  1898. non-echo,  which is the default for US Robotics),  you'll want to
  1899. set WTECHO to OFF and TRIGGER to 0.
  1900.  
  1901.  
  1902.   Appendix 4: High-speed transfers:
  1903.  
  1904. I've  been using MEX locally for transfers between two computers
  1905. connected  through an RS-232 link.   File transfers at speeds  of
  1906. 9600 and 19200 are possible, with the following guidelines noted:
  1907.  
  1908. 1)  If one computer has a faster CPU clock speed than the  other,
  1909. it  can  receive at 9600 or 19200 without problems  (assuming  no
  1910. extraordinary delay in the overlay modem I/O routines).
  1911. 2)  The  receiver  should use the 'Q' mode  ('quiet':  no  status
  1912. messages, but more relevantly, no console-status checking) if the
  1913. transmitter is at an equal or greater clock speed.
  1914.  
  1915. 3)  It's  not generally a good idea to view  either  received  or
  1916. transmitted characters at the receiving end,  regardless of clock
  1917. speed  (i.e.,  avoid use of the V,  S and R secondary commands at
  1918. the receiving end).
  1919.  
  1920. 4)  Batch  file transfers will work much better  with  the  above
  1921. speed patch.
  1922.  
  1923.  
  1924.  
  1925.