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 / ZSYS / ZNODE-12 / I / MEX128.LBR / MEX11DOC.WZ / MEX11DOC.WS
Text File  |  2000-06-30  |  76KB  |  1,923 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-
  827. C  is  seen at the console (aborting any command  with    CONTROL-C
  828. will 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. - The STAT command
  1012.  
  1013. The  STAT command lets you examine certain system variables,  and
  1014. change certain others.    In general, the syntax is as follows:
  1015.  
  1016.     STAT <KEYWORD>            <<== to examine a variable
  1017.     STAT <KEYWORD> <NEW-VALUE>  <<== to change a variable
  1018.  
  1019. The NEW-VALUE will depend on the context of the keyword in  ques-
  1020. tion.  For example,  most of the switch-type variables are either
  1021. ON or OFF, hence,
  1022.  
  1023.     STAT BAKFIL            <<== prints out ON or OFF
  1024.     STAT BAKFIL ON            <<== turns on BAKFIL
  1025.     STAT BAKFIL OFF         <<== turns off BAKFIL
  1026.  
  1027. The  value-type  variables,  on the other hand,  will  print  the
  1028. number or text associated with that variable.    Setting the value
  1029. requires  the  entry in units associated with  that  value.   For
  1030. example,
  1031.  
  1032.  STAT REPLY 5      <== sets 5 seconds as SENDOUT reply time
  1033.  STAT WCHAR 4      <== set 40 ms as transmit-character delay time
  1034.                during a terminal-mode file send
  1035.  
  1036. Some  variables  are read-only,  most notably STAT BUFFER  (which
  1037. prints out the save-buffer and printer-buffer statistics).
  1038.  
  1039. To  obtain  a list of all of the options that can  be  viewed  or
  1040. changed with the STAT command, do
  1041.  
  1042.     STAT ?
  1043.  
  1044. Most of the STAT keywords are documented in section 8.
  1045.  
  1046. - The TERM command
  1047.  
  1048. The TERM command is used to activate a terminal-mode file, and is
  1049. generally of use within READ files.   TERM works exactly like the
  1050. single-character T command,  but does not actually enter terminal
  1051. mode.  TERM takes a filename as an argument.
  1052.  
  1053. Some examples:
  1054.  
  1055. TERM SESSION.LOG
  1056. TERM ROYALOAK.DIR
  1057.  
  1058. - The TERMA command
  1059.  
  1060. TERMA works exactly like TERM, but opens the file in append mode.
  1061. Thus it is similar to the single-character T command,  with the A
  1062. secondary option ("TA").
  1063.  
  1064. - The TYPE command
  1065.  
  1066. The  TYPE command prints files on the console,    similarly to  the
  1067. CP/M TYPE command, but with pagination:  The syntax is:
  1068.  
  1069.         TYPE <filename> <'P'>
  1070.  
  1071. The optional 'P' will affect pagination at screen boundaries:  if
  1072. pagination  is OFF ("STAT PAGE OFF") then 'P' will cause the file
  1073. to be paged.  If pagination is ON ("STAT PAGE ON"), then 'P' will
  1074. inhibit pagination.
  1075.  
  1076.  
  1077. Examples:
  1078.  
  1079.     A2>>COMMAND: TYPE REPORT.DOC    (paged output if PAGE ON)
  1080.     A2>>COMMAND: TYPE REPORT.DOC P  (inhibits paging if PAGE ON)
  1081.  
  1082.  
  1083. - The SYSTEM command
  1084.  
  1085. SYSTEM is a synonym for BYE, and returns control to the operating
  1086. system without disconnecting the modem.
  1087.  
  1088. - The WRT command
  1089.  
  1090. WRT is used to close and save an open terminal file. An automatic
  1091. WRT  if  performed for you if you use any of  the  exit  commands
  1092. (BYE, EXIT,CPM, or SYSTEM) while a terminal-mode file is open.
  1093.  
  1094.  
  1095. 8) STAT variables
  1096.  
  1097. This  section  describes  the variables that may be  examined  or
  1098. changed with the STAT command.
  1099.  
  1100.  
  1101. - The ALERT variable
  1102.  
  1103.  
  1104. ALERT is a STAT value variable; it determines the number of times
  1105. the console bell will ring when a remote computer is reached with
  1106. the CALL and DIAL commands.   ALERT works only on calls that have
  1107. taken more than one dialing attempt to reach.
  1108.  
  1109. ALERT  is  handy  for dialing with the repeat  option  (see  CALL
  1110. command  in section 7 for more information about the  repeat  op-
  1111. tion): you can enter a number (or group of numbers) to be dialed;
  1112. with  ALERT  set non-zero,  you'll have an audible signal that    a
  1113. call has been completed.
  1114.  
  1115.  
  1116. - The BAKFILE variable
  1117.  
  1118. BAKFILE  is  a STAT  Switch variable:  if ON,  any  command  that
  1119. creates  a  file when one of the same name already  exists  will,
  1120. instead  of erasing the old (or prompting for an erasure)  rename
  1121. the  old  with the same primary name,  and a  secondary  name  of
  1122. "BAK".
  1123.  
  1124.  
  1125. - The BELL variable
  1126.  
  1127. BELL enables or disables the console bell throughout MEX (ie,  in
  1128. terminal mode, command mode, and during file transfers).
  1129.  
  1130.  
  1131. - The BUFFER variable
  1132.  
  1133. BUFFER is not really a variable; use STAT BUFFER to print out the
  1134. ASCII capture buffer statistics (size, amount used, amount avail-
  1135. able).     In  addition,    STAT BUFFER displays the  batch-filenames
  1136. buffer size (which determines the largest number of files that my
  1137. be transferred in one batch file transfer command).
  1138.  
  1139.  
  1140. - The CAPTURE variable
  1141.  
  1142. CAPTURE  is  a    switch variable that may be  used  to  enable  or
  1143. disable  save-in-memory when a term file is open (it will  refuse
  1144. to  change  if no term file is open).    CAPTURE  is  most  useful
  1145. within    a  READ file to allow SENDOUT replies to be saved to  the
  1146. capture buffer.
  1147.  
  1148. - The TRIGGER and CANCEL variables
  1149.  
  1150. TRIGGER is a STAT CHARacter variable, and specifies the character
  1151. the SENDOUT command will look for before sending out its argument
  1152. (a  single-character  prompt from the remote).     To  disable  the
  1153. trigger-wait function altogether, do
  1154.  
  1155.         STAT TRIGGER ""
  1156.  
  1157. CANCEL is anoter CHAR variable,  and specifies the character  the
  1158. SENDOUT  command will send to the remote to cancel the line after
  1159. an error.
  1160.  
  1161.  
  1162. - The CHAR variable
  1163.  
  1164.  
  1165. CHAR is not really a varible,  but a command option to STAT  that
  1166. prints a list of all of the CHAR variables.
  1167.  
  1168.  
  1169. - The CHECKSUM and CRC variables
  1170.  
  1171. CRC  and  CHECKSUM  are switch variables;  the two  are  mutually
  1172. exclusive (that is,  turning one on turns the other off) and  set
  1173. the   preferred  type  of  error  checking  in    Christensen  file
  1174. transfers.
  1175.  
  1176. CHECKSUM is a simple sum of the outgoing record;  CRC uses a more
  1177. sophisticated technique employing polynomial arithmetic,  and  is
  1178. thus  a better method (more errors are detected,  thus,  there is
  1179. less  chance of an incorrect record being received as if it  were
  1180. valid).
  1181.  
  1182. The  original MODEM2 protocol employed only  CHECKSUM  detection;
  1183. however,  in  the  past few years,  most versions of  Christensen
  1184. exchange programs have been rewritten to accept the CRC technique
  1185. as  well.   MEX will adapt to transmitting programs using  either
  1186. type of validation.
  1187.  
  1188. If  MEX is the transmitter,  it will switch modes  after  several
  1189. failed    attempts to transmit a file,  thus allowing full compati-
  1190. bility with older modem programs.
  1191.  
  1192.  
  1193. - The CIS variable
  1194.  
  1195. CIS  is  a STAT switch:  when ON,  then Compuserve  protcol  file
  1196. transfers are allowed while in terminal mode.  If OFF, Compuserve
  1197. transfer  sequences  from the remote end are  ignored  altogether
  1198. (although  they are printed on the screen as  "normal"    terminal-
  1199. mode characters).
  1200.  
  1201. CIS transfers always take place while in terminal mode;  there is
  1202. no  command to send or receive a file using CIS  protocol,  since
  1203. the remote Compuserve end must initiate the transfer.
  1204.  
  1205. Note  that  if you use the COLD command to restart MEX while  the
  1206. CIS  switch  is set to OFF,  then the  Compuserve  file  transfer
  1207. module    will be removed altogether from the running copy of  MEX.
  1208. If  you  subsequently use the CLONE command to create a new  exe-
  1209. cutable  MEX.COM,  the additional space formerly used by the  CIS
  1210. module    (about    1000 bytes) will be available  instead    for  your
  1211. buffers.  You will not be able to use STAT to turn the CIS switch
  1212. back  on  (since there is no longer a CIS module in the  system).
  1213. This  feature  is intended for those users who do  not    need  the
  1214. ability to do Compuserve-protocol transfers, and would rather not
  1215. waste space on an unneeded feature.
  1216.  
  1217.  
  1218. - The CLOCK variable
  1219.  
  1220. CLOCK is a STAT value variable;  you may set this variable to any
  1221. value  between    1 and 255.   The value is the CPU clock speed  in
  1222. tens of Megahertz (hence,  the speed may vary between .1 and 25.5
  1223. Mhz).    You  can then use the CLONE command to make  this  change
  1224. permanent.
  1225.  
  1226. CLOCK  is  useful for "tweaking" MEX under varying conditions  of
  1227. load when running under multi-tasking operating systems,  such as
  1228. MP/M and TurboDOS.   When system load is heavy,  you can decrease
  1229. the CLOCK value,  causing MEX to spend less time in its  internal
  1230. timing loops.
  1231.  
  1232.  
  1233. - The DEBUG variable
  1234.  
  1235. DEBUG is a STAT switch that affects the Terminal mode in MEX.  If
  1236. DEBUG  is ON,  then characters received in Terminal mode are dis-
  1237. played    in  a form similar to CP/M's DDT dump  (D)  command:  hex
  1238. values on the left side of the screen and the ASCII block (as the
  1239. output progresses) on the right.
  1240.  
  1241. You'll note that the ASCII right-side display is "buffered" until
  1242. 16  characters have been received.   After the    16th,  the  ASCII
  1243. right-side is printed.    Therefore, if the remote's output pauses,
  1244. you'll    see only the hex values until the remote sends more  out-
  1245. put.   Also,  exiting  Terminal  mode will display  any  buffered
  1246. ASCII.
  1247.  
  1248. DEBUG  is useful whenever it's necessary to know exactly what the
  1249. remote    is sending (for example,  if you're connected to a  time-
  1250. share  network,  and can't transfer files,  a DEBUG  session  can
  1251. prove illuminating in determining just what is happening).
  1252.  
  1253. In DEBUG mode,    the FILTER flag is ignored,  allowing all charac-
  1254. ters  to  reach the screen.   Additionally,  the CIS protocol  is
  1255. disabled while DEBUG is ON.
  1256.  
  1257.  
  1258. - The HEX and DECIMAL variables
  1259.  
  1260.  
  1261. HEX  and  DECIMAL are STAT switch variables;  they  are  mutually
  1262. exclusive (ie, turning one ON turns the other OFF.  These variab-
  1263. les specify the default input radix of commands that take numeric
  1264. arguments (e.g.,  SLEEP,  STAT VAL <#>, the '#' spec in CALL com-
  1265. mands,    etc).    If HEX mode is ON, then these numbers are consid-
  1266. ered Hexadecimal;  if DECIMAL mode is on (MEX is distributed with
  1267. DECIMAL ON), then they are considered decimal values.
  1268.  
  1269. You can force a decimal number,  regardless of the HEX or DECIMAL
  1270. mode,  by preceeding the number with a '$' character;  similarly,
  1271. the '#' character implies a decimal number.
  1272.  
  1273. HEX mode has a side effect:  it turns on HEX record count report-
  1274. ing in file transfers.
  1275.  
  1276.  
  1277. - The ERRID variable
  1278.  
  1279. ERRID is a STAT switch that enables and disables the printing  of
  1280. the MEX ID string in error messages.
  1281.  
  1282. The  ID string is useful in applications where you're  communica-
  1283. ting  with a remote computer running MEX (if each end has a  dif-
  1284. ferent    ID code,  there is no problem confusing error  messages),
  1285. but  if you typically use MEX only with RCPM systems or timeshar-
  1286. ing  systems that don't run MEX,  you'll likely want to turn  off
  1287. the ERRID switch, and shorten the error messages.
  1288.  
  1289.  
  1290. - The EXCLUDE variable
  1291.  
  1292. EXCLUDE is a STAT switch-type variable.   It modifies the  action
  1293. of  commands  that take multiple-filename arguments (such as  DIR
  1294. and the batch-transmit SB).
  1295.  
  1296. If  EXCLUDE  is  ON,  then SYS files are skipped  over    by  these
  1297. commands.
  1298.  
  1299.  
  1300. If EXCLUDE is OFF, then SYS files are included.
  1301.  
  1302. Thus,  you can exclude SYS files from a batchfile transmission by
  1303. STATting the EXCLUDE switch ON.  These files will also be exclude
  1304. from DIR listings while EXCLUDE is ON.
  1305.  
  1306. - The EXTEND variable
  1307.  
  1308. EXTEND is a STAT switch variable.   When turned on,  it  modifies
  1309. the  way MEX's command decoding works:    if a command is not found
  1310. in MEX's command table,  MEX will pass the entire command line on
  1311. to READ, causing the command to look like a READ command (without
  1312. READ being present on the command line).
  1313.  
  1314. When  using  EXTEND,  you  may notice that  the  single-character
  1315. commands  are  searched  as disk files before  being  checked  as
  1316. built-in commands;  this is due to parsing constraints.  To avoid
  1317. the disk search when using single-character commands with  EXTEND
  1318. active, prefix the command withe a '*' (eg, *RQ FILE.FOO).
  1319.  
  1320.  
  1321. - The ESC variable
  1322.  
  1323. ESC  is  a STAT CHAR variable,    and specifies your  terminal-mode
  1324. escape character,  used to activate terminal-mode functions (such
  1325. as  capture and printer buffer on/off,    etc).  The argument is    a
  1326. single character string.  Example:
  1327.  
  1328.             STAT ESC "^I"
  1329.  
  1330.      changes your escape character to the TAB key.
  1331.  
  1332.  
  1333. - The FILTER variable
  1334.  
  1335. FILTER is a STAT switch variable;  when ON, then abnormal control
  1336. characters are ignored when in terminal mode (with the    exception
  1337. of carriage-return,  linefeed,    backspace and tab).  If OFF, then
  1338. all  characters  from the remote will be displayed on the  screen
  1339. (and included in the ASCII-capture file,  if active). FILTER also
  1340. screens nulls and characters with the high-bit set.
  1341.  
  1342. FILTER    ON  is useful if you're working with a noisy  connection,
  1343. and random garbage characters on the line are erasing or mangling
  1344. your screen display.
  1345.  
  1346. If  you're  using  a video-oriented text editor  at  the  remote,
  1347. you'll    want to be sure FILTER is set to OFF,  in order to  allow
  1348. the video-control characters to be accepted by MEX.
  1349.  
  1350. Note that the CP/M end-of-file mark is specifically excluded from
  1351. ASCII-capture files regardless of the setting of FILTER (although
  1352. FILTER ON allows this character to go to the screen).
  1353.  
  1354.  
  1355. - The INITFILE variable
  1356.  
  1357. INITFILE is a STAT switch variable.  It determines whether or not
  1358. MEX  will  look  for the start-up file INI.MEX when it    is  first
  1359. started.
  1360.  
  1361. INITFILE is intended to be used prior to running CLONE,  to  pre-
  1362. vent the cloned MEX from looking for INI.MEX.
  1363.  
  1364. For  more  information about the CLONE command,  see its  command
  1365. description in section 7.
  1366.  
  1367.  
  1368.  
  1369. - The LF variable
  1370.  
  1371. LF  is a switch variable:  if ON,  it affects terminal-mode  file
  1372. transmission by adding a linefeed after every carriage return.
  1373.  
  1374.  
  1375. - The LIST variable
  1376.  
  1377. LIST  is  a Switch variable,  and enables or  disables    the  LIST
  1378. device.
  1379.  
  1380. - The PAGE variable
  1381.  
  1382. PAGE is a STAT value variable, and sets the number of lines to be
  1383. displayed on the screen, for commands like TYPE, HELP and STATUS,
  1384. which  paginate  their output.     Setting the PAGE variable  to    0
  1385. disables pagination by these commands.
  1386.  
  1387. - The PRECHO variable
  1388.  
  1389. PRECHO    is  a STAT switch variable that enables and disables  the
  1390. logging of incoming characters to the printer.     It is similar to
  1391. the <ESCAPE>-P printer toggle command used in terminal mode,  and
  1392. is intended for use in READ files.
  1393.  
  1394. - The REPLY variable
  1395.  
  1396. REPLY is a STAT value variable,  and specifies the amount of time
  1397. (in seconds) that the SENDOUT command will wait,  after sending a
  1398. string,  for the remote end to send a reply.  Any such reply will
  1399. be  displayed  on your terminal screen;  if  a    terminal-file  is
  1400. active    and CAPTURE is on,  then the reply also goes to the term-
  1401. file.    If PRECHO is active, the reply will go the list device as
  1402. well.
  1403.  
  1404. To query the REPLY constant, do: STAT REPLY
  1405.  
  1406. To set the REPLY time, do:     STAT REPLY <value>
  1407.  
  1408. where  <value> is the number of seconds to wait,  between  0  and
  1409. 255.
  1410.  
  1411. - The RETRY variable
  1412.  
  1413. RETRY is a STAT value variable, and specifies the number of times
  1414. the  SENDOUT command will attempt to send a string before  abort-
  1415. ing.   Note  that  if the Wait-For-Echo switch (WTECHO)  is  off,
  1416. RETRY will have no effect, since no error can occur.
  1417.  
  1418. To query the RETRY constant, do: STAT RETRY
  1419.  
  1420. To set the RETRY constant, do:     STAT RETRY <value>
  1421.  
  1422. where <value> is the number of retries, between 1 and 255.
  1423.  
  1424.  
  1425. - The RTIME varible
  1426.  
  1427. RTIME is a STAT value variable,  and affects Christensen-protocol
  1428. file transfers.
  1429.  
  1430. RTIME is the amount of time (in seconds) that MEX will wait for a
  1431. character  from the remote end before declaring  a  timeout,  and
  1432. initiating a record-retransmission sequence.
  1433.  
  1434. RTIME  is  set for one second in the standard  distribution  MEX;
  1435. this  is  more than adequate for RCPM work,  and MEX-to-MEX  file
  1436. transfers where each end is running under a single user operating
  1437. system.   But when working with a mainframe-type connection  (and
  1438. sometimes  when a remote MEX is running under  MP/M),  especially
  1439. when a packet-switched network is part of the connection, charac-
  1440. ter delays can easily exceed one second.   In these environments,
  1441. you'll    want to set RTIME to a higher value (16 seconds is recom-
  1442. mended; the maximum is 255).
  1443.  
  1444. - The RUB variable
  1445.  
  1446. RUB is a STAT switch variable and affects terminal mode:  if  ON,
  1447. then the local backspace key is converted to RUB when the charac-
  1448. ter is transmitted to the remote.
  1449.  
  1450. - The SEARCH varible
  1451.  
  1452. SEARCH is a STAT variable that may take on the values 0,  1, 2 or
  1453. 3.   SEARCH specifies a search path for READ files, phone librar-
  1454. ies, keystring files, and (if the append secondary option, 'A' is
  1455. specified)  terminal-mode ASCII capture files.     These files nor-
  1456. mally are taken only from the currently logged DU;  by    modifying
  1457. SEARCH, you can change the way MEX finds these files.
  1458.  
  1459. Two  drive/user (DU) areas are possible:  the currently logged DU
  1460. and  the Alternate DU (see section 7 for information on  changing
  1461. the alternate DU).
  1462.  
  1463. If SEARCH=0, then only the currently logged DU is searched.
  1464. If SEARCH=1, then only the ALT DU is searched.
  1465. If SEARCH=2, then the currently logged is searched;  if the file
  1466.          is not found, then the ALT DU is searched.
  1467. If SEARCH=3, then the ALT DU is searched;  if the file    is  not 
  1468.          found, then the currently logged DU is searched.
  1469.  
  1470.  
  1471. - The SODELAY variable
  1472.  
  1473. SODELAY  is a switch variable;    when ON,  SENDOUT  arguments  and
  1474. keystrings  sent  from    terminal mode are tied to the  WCHAR  and
  1475. WLINE  delay  variables  normally  used to  transmit  a  file  in
  1476. terminal mode.    This provides a conventient means of transmitting
  1477. passwords,  etc. to the remote from within a READ file (you don't
  1478. have  to force MEX to wait for an echo that never comes,  yet you
  1479. don't run the risk of overrunning the remote input buffer).
  1480.  
  1481. Note  that,  for SODELAY to have any effect,  the  WTECHO  switch
  1482. variable  must be OFF (WTECHO takes preference if both are active
  1483. at the same time).
  1484.  
  1485. - The SPLIT variable
  1486.  
  1487. SPLIT  is a STAT switch variable that affects the screen  display
  1488. of  the  phone library (done from the PHONE command or    the  CALL
  1489. command).
  1490.  
  1491. This variable is set ON in the distribution version of    MEX,  but
  1492. may  be turned OFF if you're using a terminal with an  extra-wide
  1493. display, to effect a more compact phone library display using two
  1494. entries per screen line.  This compact display does not, however,
  1495. provide  a number's optional baud-rate (as does the display  when
  1496. SPLIT set to ON).
  1497.  
  1498. - The SILENT variable
  1499.  
  1500. SILENT is a STAT switch variable, and, when ON, inhibits the echo
  1501. of command lines in READ files.
  1502.  
  1503.  
  1504. - The SWITCH variable
  1505.  
  1506. SWITCH    is not really a varible;  it requests the STAT command to
  1507. list out all of the switch-type variable.
  1508.  
  1509. - The TAB variable
  1510.  
  1511. TAB  is a switch variable that can be used to enable  or  disable
  1512. the internal tab expander within MEX; this is sometimes necessary
  1513. when using certain terminals with remote screen editors.
  1514.  
  1515. Note that TAB is set to ON in the distribution version of MEX.
  1516.  
  1517. - The VAL variable
  1518.  
  1519. VAL  in not really a variable;    it requests the STAT  command  to
  1520. list out all of the value-type variables.
  1521.  
  1522. - The WCHAR and WLINE variables
  1523.  
  1524. WCHAR and WLINE  are value variables; they specify delay times in
  1525. simple    file  transmissions done within terminal mode  (with  the
  1526. <ESC>- T  command).  When you transfer a file,    MEX will ask  you
  1527. whether you want to use these delays.
  1528.  
  1529.        WCHAR is the delay to use between characters.
  1530.          (0-9, in 10's of milliseconds)
  1531.        WLINE is the delay to use between lines
  1532.          (0-9, in 100's of milliseconds)
  1533.  
  1534. WCHAR  and  WLINE delays are often needed for  timesharing  main-
  1535. frames and BBS's written in BASIC, to allow the slower remote end
  1536. to  catch  the entire file.   These variables are also    using  in
  1537. keystrings and SENDOUT arguments when SODELAY is ON and WTECHO is
  1538. OFF.
  1539.  
  1540. - The WECHO variable
  1541.  
  1542. WECHO  is  a value variable that affects the use of  the  SENDOUT
  1543. command.   WECHO is the time,  in seconds, that SENDOUT will wait
  1544. between  characters  during  a    reply  from  the  remote,  before
  1545. considering  the reply ended.    This should not be confused  with
  1546. the REPLY variable,  which is the maximum amount of time to wait,
  1547. after  sending    a  string,  before considering that no    reply  is
  1548. forthcoming.
  1549.  
  1550. - The WTECHO variable
  1551.  
  1552. WTECHO is a STAT switch variable,  and determines whether or  not
  1553. keystrings  and  SENDOUT command lines transmitted to the  remote
  1554. are validated by comparison with their echoed characters.
  1555.  
  1556. When  WTECHO is ON,  all printing characters transmitted  to  the
  1557. remote    must echo correctly back from the host;  this effectively
  1558. halves the transmission rate,  but provides error detection feed-
  1559. back  for the SENDOUT command,    allowing it to cancel a line  and
  1560. retry.
  1561.  
  1562. If you're sending command strings out to a line that doesn't echo
  1563. the characters,  you'll want to set WTECHO off.  Additionally, if
  1564. you're using the SENDOUT facility, you'll want to also remove the
  1565. trigger  string  (you  can do this with STAT  TRIGGER  "",  which
  1566. effectively removes the trigger character.
  1567.  
  1568.  
  1569. - The SEP variable
  1570.  
  1571. SEP  is a STAT character variable,  and allows you to change  the
  1572. character  used to separate commands when using multiple commands
  1573. on a line.  The argument is a single character string. Example:
  1574.  
  1575.             STAT SEP "$"    
  1576.  
  1577. changes your command separator to the "$" character.
  1578.  
  1579.  
  1580. - The XLINE variable
  1581.  
  1582. XLINE is a STAT switch that affects terminal-mode file transfers.
  1583. If  XLINE is set to ON,  then the file will be    transmitted,  one
  1584. line  at  a time;  each succeeding line will not  be  transmitted
  1585. until an X-ON character is received from the remote.
  1586.  
  1587. XLINE  is used with a very fewe timeshare and network  computers,
  1588. almost never with RCPM and BBS systems.
  1589.  
  1590.  
  1591. - The XON variable
  1592.  
  1593. XON is a STAT switch variable that affects the terminal-mode file
  1594. send  (see TERMINAL MODE for a full description of  terminal-mode
  1595. file send).
  1596.  
  1597. When XON is set to ON, MEX will send all characters to the remote
  1598. at  full speed,  but will monitor for an X-OFF character from the
  1599. remote.   When MEX sees the X-OFF,  it will pause,  allowing  the
  1600. remote    to read all of the input MEX has transmitted.    When  MEX
  1601. sees  an X-ON character from the remote,  it will resume the file
  1602. transmission.
  1603.  
  1604.  
  1605.  
  1606. 9) About the source code (and other stuff).
  1607.  
  1608. Some users will note that MEX is distributed without source code;
  1609. this  is not an oversight.   MEX has required a very  substantial
  1610. investment in development time,  and I've become very  possessive
  1611. of  the  program (especially in light of what's happened with  so
  1612. many  other programs appearing in source form on  various  RCPM's
  1613. and  through user groups -- they tend to get modified to death by
  1614. people    who  do  not  properly    consider  the  effects    of  their
  1615. changes).   For this reason,  I will not be releasing source code
  1616. for MEX in any form, beyond the source for the overlay files.
  1617.  
  1618. I do intend to maintain the program as responsibly as is possible
  1619. for any non-funded project.   In addition,  a number of  enhance-
  1620. ments  are planned for this fall,  to culminate in a 2.0  release
  1621. that  will  offer significant enhancements (including  a  simpler
  1622. overlay  structure,  a far-more powerful READ command  processor,
  1623. including nested reads and conditional execution,  smart-terminal
  1624. emulation,  and the capability of MEX to act as a remote terminal
  1625. server,  similar  to  the public domain BYE program).    It's  not
  1626. likely    that MEX 2.0 will be distributed without charge  (as  MEX
  1627. 1.0 is);  you can, however, be assured that it will be one of the
  1628. cheapest terminal programs available for CP/M and as well suppor-
  1629. ted as any commercial product available.
  1630.  
  1631. 10) Support
  1632.  
  1633. MEX  has  been beta-tested among a small group over the last  few
  1634. months;  however,  the nature of software development implies the
  1635. existance  of  a microscopic fissure through which  program  bugs
  1636. will invariably ooze,  escaping detection by all but the  omnipo-
  1637. tent (I am, sadly, not among that group).
  1638.  
  1639. So  if    you detect errors or bugs in MEX,  I would like  to  know
  1640. about it. You can reach me through the following avenues:
  1641.  
  1642.   Arpanet:  Send mail to RFOWLER@SIMTEL20.ARPA
  1643.   RCPM:     Fort  Fone File Folder,  Fort Atkinson, WI (owned and    
  1644.         operated  by Al Jewer).   (414) 563-9932,  running    a    
  1645.         Compupro  40  MB hard disk and Frank  Wancho's  RBBS4
  1646.         message system.
  1647.   US Mail:  My mailing address is Route 1,  Box 7, Fort Atkinson,
  1648.         Wi.; be aware that I am very slothful about answering
  1649.         non-electronic mail (ie, you may never get an answer).
  1650.   Phone:    None.   Please do  not call me at home; this raises
  1651.         hell with my family, and I'm not normally able to re-
  1652.         spond in "real-time" in any case.
  1653. If you report a bug, please be as explicit as possible, detailing
  1654. any unusual overlay configurations, STAT variables, and any other
  1655. conditions you feel are pertinent.  Bug reports like
  1656.  
  1657.         "Terminal mode doesn't work right"
  1658.  
  1659. are totally useless; all I can do is ignore such reports.
  1660.  
  1661. Feature requests for future releases of MEX are welcomed.
  1662.  
  1663.  
  1664. 11) Credits
  1665.  
  1666. I'd like to thank the following individuals for their  participa-
  1667. tion  in the development of MEX,  which included many suggestions
  1668. for features, beta site testing and helpful feedback (and, in the
  1669. cases  of Bob Plouff and Frank Wancho,    code examples from  their
  1670. own communicatons programs):
  1671.  
  1672. Bob Plouffe    Dick Mead     Keith Petersen     Al Jewer
  1673. Frank Wancho    Sigi Kluger   David Sternlight     Shawn Everson
  1674. Dave Kozinn    Charlie Strom Eric Stork
  1675.  
  1676. Special thanks must go here also to Ward Christensen,  who  wrote
  1677. the  original MODEM program from which all others have descended,
  1678. Mark Zeiger,  who developed the batch-file transfer protocol  ex-
  1679. tension to Ward's original MODEM2 protocol,  Irv Hoff, whose work
  1680. with  MDM7  provided  a foundation for a  common  overlay  format
  1681. between  MEX and MDM7,    and the dozens of others who have contri-
  1682. buted to the development of the many versions of  MODEM2,  MODEM7
  1683. and  MDM  (from which MEX began with a healthy advance along  the
  1684. learning curve).
  1685.  
  1686. 11) Distribution and a warning to illicit profit-takers
  1687.  
  1688. MEX  and  its documentation are Copyright (C) 1984 by  Ronald  G.
  1689. Fowler.   A license is extended to users to copy and exchange the
  1690. program  and  documentation with the sole restriction  that  such
  1691. distribution  must  be non-commerical in nature (this is  not  to
  1692. imply that charges for such things as diskettes and modest  copy-
  1693. ing  and  mailing fees are of themselves commercial  in  nature).
  1694. Resale    for  profit  may be done only with  the  express  written
  1695. consent of the author, Ronald G. Fowler.
  1696.  
  1697. The  US  Copyright Act of 1978 provides for severe penalties  for
  1698. infringement,  including  actual and punitive damages on  a  per-
  1699. occurance basis.
  1700.  
  1701. Legitimate  commercial interests interested in custom versions of
  1702. MEX, for distribution as a for-profit product, should contact the
  1703. author for rates, royalty information and sample contracts.
  1704.  
  1705.  
  1706.                 Ronald G. Fowler
  1707.                 Fort Atkinson, WI   53538
  1708.                 August 20, 1984
  1709.  
  1710.  
  1711.  
  1712.          Appendix 1: Buffer Modification
  1713.  
  1714. This  section explains the buffering scheme used in MEX,  and how
  1715. you can change it using the MEXPAT overlay file.
  1716.  
  1717. MEX  employs  a number of dynamically-allocated buffers for  such
  1718. things    as terminal-file  storage,  printer  buffer,  keystrings,
  1719. modem pre-read queue,  and the phone library.    The size of these
  1720. buffers are defined in a fixed area of MEX;  you can change their
  1721. values    by editing and assembling MEXPATxx.ASM,  then using MLOAD
  1722. to bind in the new values:
  1723.  
  1724.         ASM MEXPAT11
  1725.           MLOAD MEXNEW.COM=MEX.COM,MEXPAT10
  1726.  
  1727. The variable labeled PSIZE in the MEXPAT file defines the  number
  1728. of Kbytes to use for the printer buffer.   This can be set as low
  1729. as  0,    or as arbitrarily large as you'd like.     The variable la-
  1730. beled  ASIZE  performs a similar function for  the  terminal-mode
  1731. file capture buffer,  but must be set to 2 or greater, to reserve
  1732. the minimum 2K space for file transfers.
  1733.  
  1734. One  of  the two (and only one) must have the value  255  (0FFH);
  1735. this defines a particular buffer as the "top" buffer ...  ie, the
  1736. buffer    allocated after all other space has been  allocated,  and
  1737. extends  to  the top of the TPA.   This is  usually  the  largest
  1738. buffer,  and  I recommend that this be the terminal-mode  capture
  1739. buffer, since that is the most frequently used buffer.
  1740.  
  1741. The  PHSIZE label defines the maximum size of the phone  library,
  1742. in entries.   Currently an entry is 43 bytes long,  so the "stan-
  1743. dard" value for PHSIZE of 30 results in a phone library consuming
  1744. almost 1300 bytes.
  1745.  
  1746. Similarly,  the  KYSIZE variable defines the amount of space  (in
  1747. bytes)    reserved for terminal-modem keystrings.   The  "standard"
  1748. value is 400 bytes.
  1749.  
  1750. If  you don't use phone libraries or keystrings,  either variable
  1751. may  be set to zero,  and the resulting space reclaimed  for  the
  1752. "top" buffer.
  1753.  
  1754. Another buffer variable is the NSIZE label: this defines the size
  1755. of  the  file-transfer batch filenames buffer (in  Kbytes).   For
  1756. each 1K allocated to this buffer,  you can transmit 85 files at a
  1757. time.    Hence, if 85 files are not enough, you can set NSIZE to 2
  1758. and  transmit 170 files at a time.   If you don't use batch  file
  1759. transfers,  you can set this variable to 0, and reclaim the space
  1760. for the "top" buffer.
  1761.  
  1762. The XSIZE label defines the number of Kbytes for the file  trans-
  1763. fer disk buffer;   note that this is not an allocated buffer, but
  1764. resides  within the terminal-mode file buffer.     XSIZE is used to
  1765. restrict the actual size of the buffer,  and should be less  than
  1766. or equal to ASIZE.  This restriction is necessary in systems with
  1767. extremely slow floppy disks, since there is the possiblity of the
  1768. remote end timing out while MEX flushes its disk buffer.
  1769.  
  1770. PQSIZE defines the size of the queue used to service the modem at
  1771. certain  times (such as after sending an X-OFF to the remote when
  1772. the terminal-file buffer fills up,  during the overflow wait time
  1773. SENDOUT strings,  and within certain long loops,  when there is a
  1774. possibility of losing characters).  This buffer must be a minimum
  1775. of 2 bytes, and may be as arbitrarily large as you'd like.  There
  1776. is  little to gain in increasing the size,  however,  unless  you
  1777. consistently run at speeds greater than 1200 baud.
  1778.  
  1779. You may at some time see the message "Not enough memory for MEX!"
  1780. minimum buffer requirements.   Normally, this will only happen in
  1781. small  memory segments (when you're running a small CP/M  system,
  1782. for example, or running in a small MP/M segment), but you'll also
  1783. see it if you've increased MEX's buffers too much.
  1784.  
  1785. The  only recovery possible is to reduce some of the buffers  (or
  1786. obtain more memory).
  1787.  
  1788.  
  1789.  
  1790.    Appendix 2: Alternate Long Distance Service numbers (ALDS):
  1791.  
  1792. This  appendix details the use of Alternate Long Distance Service
  1793. (ALDS) numbers with MEX.
  1794.  
  1795. You may have two ALDS numbers defined;    simply enter them as  you
  1796. would  any  other  number,  but give them a name of  '>'  or  '<'
  1797. (normal delay characters, passwords, etc may be included).  Then,
  1798. if  you have a number you'd like to route through your ALDS  ser-
  1799. vice,  simply prefix it with the associated '>' or '<'.  An exam-
  1800. ple should clarify this:
  1801.  
  1802. You  have MCI service,    your password is 98765,  and it takes 2-4
  1803. seconds  to connect after the number is dialed.   You  also  have
  1804. Sprint    (you cover all your bases,  don't you?),  the password is
  1805. 12345, and it sometimes takes 6 seconds to reach the number after
  1806. it is dialed.    Finally,  you have a Hayes Smartmodem; a comma in
  1807. the  dialing string is a 2-second pause (is it    really?  I  don't
  1808. have a Hayes, so let's pretend).
  1809.  
  1810. In order to use both services, we'll put one number on the > key:
  1811.  
  1812.     [MEX] A0>>PHONE >=555-9122,,98765      <<--- MCI
  1813.  
  1814. note  the  four  second  delay with  the  two  commas,    then  the
  1815. password.
  1816.  
  1817. Now Sprint:
  1818.  
  1819.     [MEX] A0>>PHONE <=555-8144,,,12345
  1820.  
  1821. <longer delay, different password>.
  1822.  
  1823. Now RBBS Rockhead is a long,  long distance call;  it's available
  1824. only through Sprint (and,  of course, Ma Bell). We decide that if
  1825. we  can't  make  it through Sprint,  we don't want to  call  RBBS
  1826. Rockhead.  Here's how we enter the number:
  1827.  
  1828.     [MEX] A0>>PHONE ROCKHEAD=<202-555-1414
  1829.  
  1830. Now RBBS Aristocrat is our favorite BBS;  if Sprint is jammed up,
  1831. we'd like the option of dialing it over (ugh) Ma Bell lines.   So
  1832. we define it without an ALDS marker, like this:
  1833.  
  1834.     [MEX] A0>>PHONE ARISTOCRAT=202-555-2222
  1835.  
  1836. Now  notice that we can still call Aristocrat through  Sprint  or
  1837. MCI with:
  1838.  
  1839.     [MEX] A0>>CALL <ARISTOCRAT        <<--- Sprint
  1840.     [MEX] A0>>CALL >ARISTOCRAT        <<--- MCI
  1841.  
  1842. But we must explicitly enter the ALDS symbol in the CALL command.
  1843.  
  1844. Since  Rockhead is defined with a leading '<',    it will always go
  1845. through MCI;  we don't have to supply an ALDS symbol in the  CALL
  1846. command  (we  can switch to the other ALDS  number,  however,  by
  1847. specifying  the other ALDS symbol in the CALL  command;  eg,"CALL
  1848. >ROCKHEAD"   will switch to MCI even though we've defined  Sprint
  1849. as Rockhead's ALDS number).
  1850.  
  1851. In short,  the left or right arrow specification is treated as if
  1852. its ALDS number were part of the number being dialed.
  1853.  
  1854.  
  1855.     Appendix 3: Hints on using SENDOUT and keystrings
  1856.  
  1857. There  have  been some queries    regarding  keystrings,    and  some
  1858. problems  reported  in using them on RCPM systems.   I'd like  to
  1859. clarify their use a little.
  1860.  
  1861. First,    there  is  a variable that may be changed with    the  STAT
  1862. command that directly affects keystrings: this varible is WTECHO.
  1863. When this switch-variable is turned ON,  MEX will send each char-
  1864. acter,    then wait for it to echo from the remote end.    If you're
  1865. sending  into  a system that allows type-ahead    (most  time-share
  1866. computers,  Compuserve,  Arpanet, some MP/M and TurboDOS systems,
  1867. etc), it is best to turn this variable OFF; the keystring will be
  1868. transmitted a lot faster.  If you're dealing with an RCPM system,
  1869. however,  you might well overrun the receiving end with the  key-
  1870. string    (especially if you're transmitting into a BASIC  program,
  1871. such as RBBS).    For such systems,  you should turn WTECHO ON; MEX
  1872. will then wait for each character to be echoed from the remote.
  1873.  
  1874. The rest of this discussion addresses the same topic with respect
  1875. to the SENDOUT command.
  1876.  
  1877. WTECHO also affects the SENDOUT command in the same way; there is
  1878. a  difference between SENDOUT and keystrings,  however,  that you
  1879. must  be  aware of:   SENDOUT tries its best to send  the  string
  1880. correctly when WTECHO is on;  if an echoed character is different
  1881. than the transmitted character,  SENDOUT will send a cancel char-
  1882. acter and try again (up to a retry-limit).
  1883.  
  1884. The  retry-limit and  the trigger and cancel characters  are  all
  1885. STAT  variables,  allowing them to be changed with the STAT  com-
  1886. mand.  The trigger-character in the distributed MEX is the right-
  1887. arrow  ('>');  this is most handy for RCPM systems (which  prompt
  1888. each  command  with a right-arrow).   If you want to use  SENDOUT
  1889. with non-CP/M systems (or with RCPM programs that use a different
  1890. prompt),  you'll need to change the trigger character.    For exam-
  1891. ple,  if you're sending commands to a remote PIP,  you'd want  to
  1892. use  PIP's  asterisk  ('*') as the trigger,  so  you'd    do:
  1893.     
  1894.             STAT TRIGGER "*"
  1895.  
  1896.   For  sending    commands to a Smartmodem (with the modem  set  to
  1897. non-echo,  which is the default for US Robotics),  you'll want to
  1898. set WTECHO to OFF and TRIGGER to 0.
  1899.  
  1900.  
  1901.         Appendix 4: High-speed transfers:
  1902.  
  1903. I've  been using MEX locally for transfers between two    computers
  1904. connected  through an RS-232 link.   File transfers at speeds  of
  1905. 9600 and 19200 are possible, with the following guidelines noted:
  1906.  
  1907. 1)  If one computer has a faster CPU clock speed than the  other,
  1908. it  can  receive at 9600 or 19200 without problems  (assuming  no
  1909. extraordinary delay in the overlay modem I/O routines).
  1910. 2)  The  receiver  should use the 'Q' mode  ('quiet':  no  status
  1911. messages, but more relevantly, no console-status checking) if the
  1912. transmitter is at an equal or greater clock speed.
  1913.  
  1914. 3)  It's  not generally a good idea to view  either  received  or
  1915. transmitted characters at the receiving end,  regardless of clock
  1916. speed  (i.e.,  avoid use of the V,  S and R secondary commands at
  1917. the receiving end).
  1918.  
  1919. 4)  Batch  file transfers will work much better  with  the  above
  1920. speed patch.
  1921.  
  1922.  
  1923.