home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / mex / mx114doc.prn < prev    next >
Encoding:
Text File  |  1994-07-13  |  85.5 KB  |  3,037 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.            MEX: a Modem Executive for CP/M-80
  17.  
  18.  
  19.  
  20.  
  21.  
  22.               USER'S GUIDE
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.         Copyright (C) 1984 by Ronald G. Fowler
  30.               All Rights Reserved
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                 1
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.             TABLE OF CONTENTS
  73.  
  74. 1)   Overview: What is MEX?.................................1
  75. 2)   Getting started: the physical modem overlay............2
  76.       Smartmodem overlay installation...................3
  77. 3)   Some precepts: Filespecs, string arguments,
  78.       and multiple command-lines........................4
  79.       Logging drives....................................4
  80. 4)   Terminal mode..........................................6
  81.       APPEND secondary option...........................8
  82. 5)   Single-character commands..............................8
  83. 6)   Secondary commands (options)...........................8
  84. 7)   Command descriptions..................................10
  85.       ALT, BELL, BYE, .................................10
  86.       CALL, CLONE......................................11
  87.       CLS, COLD, CPM, DEL, DIAL........................12
  88.       DIR, DSC, ERA, GLOBAL............................13
  89.       EXIT, HELP, ID, KEY..............................14
  90.       LOAD, SAVE, LOG..................................15
  91.       PHONE, PREFIX, SUFFIX............................16
  92.       READ.............................................17
  93.       REN, SENDOUT.....................................19
  94.       SET, SSET........................................20
  95.       SLEEP, STAT......................................21
  96.       TERM, TERMA, TYPE, SYSTEM, WRT...................22
  97. 8)   STAT variables........................................23
  98.       ALERT, BAKFILE, BELL, BUFFER, CAPTURE............23
  99.       TRIGGER, CANCEL, CHAR, CHECKSUM, CRC, CIS........24
  100.       CLOCK, DEBUG.....................................25
  101.       HEX, DECIMAL, ERRID, EXCLUDE.....................26
  102.       EXTEND, ESC, FILTER, INITFILE....................27
  103.       LF, LIST, PAGE, PRECHO, REPLY....................28
  104.       RETRY, RTIME, RUB, SEARCH........................29
  105.       SODELAY, SPLIT, SILENT, SWITCH...................30
  106.       TAB, VAL, WCHAR, WLINE, WECHO, WTECHO............31
  107.       SEP, XLINE, XON..................................32
  108. 9)   About the source code (and other stuff)...............33
  109. 10)  Support...............................................34
  110. 11)  Credits...............................................35
  111. 12)  Distribution and a warning to illicit profit takers...36
  112.  
  113.                APPENDICES
  114.  
  115. A)   MEX buffer allocation guide...........................37
  116. B)   Alternate Long Distance Service support...............39
  117. C)   Tips when using keystrings and SENDOUT................41
  118. D)   Using MEX at higher baud rates........................42
  119. E)   Additional features in MEX114.........................45
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                 2
  128.  
  129.  
  130.  
  131.  
  132.  
  133. MEX User's Guide                     Overview
  134.  
  135.  
  136. 1)   Overview: What is MEX?
  137.  
  138.  
  139.  
  140. MEX  is an acronym (sort of) for Modem EXecutive;  its purpose is
  141. to  build  upon  the capabilities provided  by    various  terminal
  142. emulation  and file transfer programs written for  CP/M-80.   MEX
  143. provides,  in  one program,  a phone-number librarian and  editor
  144. (supporting  mnemonnic    12-character names for phone numbers  and
  145. load/save for phone number files),  a powerful autodialer (allow-
  146. ing  lists of numbers to be called repeatedly until  one  answers
  147. with a modem tone;  the entire list may be repeated any number of
  148. times),  a  file transfer facility supporting three common proto-
  149. cols  (and "batch" file transfers),  a    "dumb-terminal"  emulator
  150. that  includes    the ability to dynamically  define  multiple-line
  151. character  strings  under  a single key (and  save/load  sets  of
  152. keystrings  to and from disk files),  a STAT command that  allows
  153. you  to  examine and change a wide range of operating  parameters
  154. (especially  useful with the CLONE command,  which allows you  to
  155. save a new copy of MEX to disk,  including any currently  defined
  156. phone  numbers    and keystrings),  a batch-command file    processor
  157. that  allows the program to take its input from a disk file  (al-
  158. lowing    unattended  use of MEX),  and an  on-line  help  facility
  159. (employing  CP/M's  random-access  file accessing  functions  for
  160. quick access) that completely documents the program.
  161.  
  162. MEX combines the capability of many public domain utilities,  and
  163. is  a superset of such programs as MODEM2,  MODEM7 and MDM.   MEX
  164. provides more functionality than many commerical programs, and is
  165. gaining  ground on the top-of-the-line modem  packages,  such  as
  166. Microstuf's  Crosstalk (TM).   But enough horn blowing ...  let's
  167. get on with it.
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.                 3
  194.  
  195.  
  196.  
  197.  
  198.  
  199. MEX User's Guide                 Physical Overlay
  200.  
  201.  
  202. 2) Getting started: the physical modem overlay
  203.  
  204. First,    let me note that MEX,  as distributed,    contains no modem
  205. I/O at all;  it will run on your computer as is (in fact, you can
  206. do an initial evaluation of MEX without doing any installation at
  207. all),  but  commands dealing with the modem will elicit an  error
  208. message.   To  be fully functional,  MEX needs modem driver  code
  209. (written  in 8080 assembly language) installed    internally;  this
  210. driver code is called the physical modem overlay.
  211.  
  212.  
  213. If  you're a user of Irv Hoff's MDM7 program,  you have  an  easy
  214. progression path:  MEX uses a compatible overlay format, and thus
  215. almost any MDM overlay may be loaded directly into MEX.  In fact,
  216. you can use the MLOAD program distributed with MEX to install the
  217. overlay  relatively painlessly (the use of the dreaded DDT is not
  218. required).
  219.  
  220. In  addition,  there  are a large number of  overlays  available,
  221. written specifically for MEX,  that make available the full power
  222. of the program.
  223.  
  224. If  you don't have a MEX or MDM7 overlay,  you'll have    to  write
  225. your  own,  or,  if  you're not proficient in  assembly  language
  226. programming,  find someone to write one for you.   If you have to
  227. take this route,  use the Godbout Interfacer  overlay distributed
  228. with MEX (named MXO-GBxx.ASM,  where xx is the revision level) as
  229. a model.   This file is a full-featured overlay, containing modem
  230. dialing  drivers  and  a fully functional SET command (SET  is    a
  231. user-defined  command,    used for such things as baud-rate  selec-
  232. tion,  answer/originate modem setup,  etc).  You can implement as
  233. little or as much of the "fancy stuff" as you like.   If you  re-
  234. distribute  your  overlay,  please follow the naming  conventions
  235. I've established for MEX overlay files:  "MXO-nnxx.ASM", where nn
  236. is  a 2-letter code identifying the overlay,  and xx is the  rev-
  237. ision level.
  238.  
  239. Once you have an overlay file,    assemble it with ASM or MAC, then
  240. bind  it into the system with MLOAD.   The following example  as-
  241. sumes you're using the Godbout overlay;  if not,  just substitute
  242. the name of your overlay for MXO-GB10:
  243.  
  244.    ASM MXO-GB10               <<--- assemble the overlay
  245.    MLOAD MEX.COM=MEX10.COM,MXO-GB10   <<--- load a new MEX.COM
  246.  
  247. -Smartmodem overlay installation
  248.  
  249. If you have a Smartmodem (Hayes,  USR, etc),  you'll want to take
  250. advantage of one of the the Smartmodem logical overlays (MEX  has
  251. no  inbound Smartmodem code);  these overlays come in two  varie-
  252. ties,  and  you  can tell one from the other by the  first  three
  253. characters of the filename:  MXO for the (older) "small" overlay,
  254. and "MXM" for the newer and more capable overlay.   Note that the
  255. MXO  overlay  type  is shared (confusingly enough) with  the  MXO
  256. physical overlays (although I hope MXO physical overlays will die
  257.  
  258.  
  259.                 4
  260.  
  261.  
  262.  
  263.  
  264.  
  265. MEX User's Guide                   Smartmodem Overlay
  266.  
  267.  
  268. out eventually as they are upgraded to MXM types).  You should be
  269. aware  the the MXO logical overlay is located at the top  of  the
  270. overlay  area (about 500 bytes starting at 0B00H),  and will work
  271. with any physical overlay that terminates before 0B00H (all known
  272. overlays  do),    while the newer MXM overlays require  about  1000
  273. bytes,    and  start at 0900H (you should check that your  physical
  274. overlay ends before this point; most do).
  275.  
  276. The  Smartmodem  overlays  provide  autodial  capabilities   and,
  277. optionally, disconnect capability, using Smartmodem commands.
  278.  
  279. Use  the following example as a guide for installing a Smartmodem
  280. overlay and your physical overlay simultaneously (the  Smartmodem
  281. overlay  is named MXM-SMxx.ASM -- xx is the revision level -- and
  282. MXO-GB10.ASM  is the name of a typical MEX overlay;  replace  the
  283. former with the name of your own overlay):
  284.  
  285.   ASM MXO-GB103              <<--- assemble phys. overlay
  286.   ASM MXM-SM10                <<--- asm. Smartmodem overlay
  287.   MLOAD MEX.COM=MEX11.COM,MXO-GB10,MXM-SM10 <<--- build new MEX.COM
  288.  
  289. (The  order  is  important in the MLOAD command line due  to  the
  290. structure of the overlays).
  291.  
  292.  
  293. Some notes about the preceeding discussion:
  294.  
  295. The  version of MLOAD used MUST be 2.0 or greater;  earlier  ver-
  296. sions  didn't have the ability to load a HEX file over a  non-HEX
  297. file.
  298.  
  299. A  very few MDM7 overlays are not compatible;  such overlays  are
  300. typified  by the requirement that they be revised with each  suc-
  301. ceeding  revision of MDM7.   These overlays  typically    implement
  302. dialing facilities for unusual modems (actually non-PMMI and non-
  303. Smartmodem),  and require specific addresses within MDM7 in order
  304. to function.   This was necessary because MDM7 does not provide a
  305. redefinable  interface for dialing code (in spite of the  overlay
  306. table  entry present for the dialing routine),    and worked  'nat-
  307. urally' only with Smartmodems and PMMIs.  As a result, the major-
  308. ity of overlays written do not contain any dialing code, and thus
  309. will  function    correctly with MEX (note that MEX allows a  fully
  310. re-definable  dialing vector -- see MXO-PMxx.ASM for  details  --
  311. and thus may be extended for use with virtually any modem).
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.                 5
  326.  
  327.  
  328.  
  329.  
  330.  
  331. MEX User's Guide                     Precepts
  332.  
  333.  
  334.  
  335. 3)  Some  precepts:  Filespecs,  string arguments,  and  multiple
  336.     command-lines
  337.  
  338. Before    detailing MEX's command set,  there are a few  topics  we
  339. must address that apply generally throughout MEX.
  340.  
  341. MEX  supports the same drive/user specification for files as Rick
  342. Conn's ZCPR and ZCPR2: A file may be prefixed by either the drive
  343. name,  the user number or both (this extends to batch file trans-
  344. missions).
  345.  
  346. Examples:
  347.  
  348.     [MEX] A3>>SB B3:*.ASM A9:*.OBJ C6:UPDATE.DOC
  349.     [MEX] A0>>DIR A12:*.SUB
  350.     [MEX] B3>>TYPE 5:REPORT.DOC
  351.     [MEX] C3>>T B6:SESSION.LOG
  352.  
  353. LOGGING DRIVES:   MEX supports relogging drive/user in two  ways,
  354. both of which are pertinent to a discussion of DU specifications:
  355.  
  356.  1) LOG command: Takes optional DU spec (trailing colon optional)
  357.           resets disk system
  358.  2) At command prompt: simply enter the DU spec (colon required)
  359.  
  360. Examples:
  361.  
  362.     [MEX] A0>>LOG     (relogs current d/u: resets system)
  363.     [MEX] A0>>LOG B:     (relogs current user, drive b, resets)
  364.     [MEX] A0>>LOG B7:     (relogs drive b, user 7, resets)
  365.     [MEX] A0>>B:     (logs current user, drv B, no reset)
  366.     [MEX] A0>>A9:     (logs drive A, user 9, no reset).
  367.  
  368. Several  MEX commands take string arguments.   These strings must
  369. be  surrounded    by quotatation marks,  and may    contain  imbedded
  370. control  characters (with the singular exception of binary  zero,
  371. which will generate an argument error).   The caret ("^") is used
  372. to prefix a control character.
  373.  
  374. Thus, you can specify multi-line strings within one string speci-
  375. fication.   Examples  (note that that the control-character ^M is
  376. the carriage return code, and ^J is a linefeed):
  377.  
  378.     KEY A="BILL USER;J^MWHATSNEW^MB:^MWHATSNEW^M"
  379.     SENDOUT "SD B:*.ASM^MCRCK *.BIN^M"
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.                 6
  392.  
  393.  
  394.  
  395.  
  396.  
  397. MEX User's Guide                     Precepts
  398.  
  399.  
  400. Additionally,  the  slant character ('/') may be used  to  denote
  401. several common control-character sequences:
  402.  
  403.  
  404. /R    specifies a newline (Carriage return code only; same as ^M)
  405. /N    specifies carriage-return+linefeed
  406. /T    specifies a tab
  407. //    specifies the '/' character
  408. /Onnn specifies any binary value (except 0):  nnn is the decimal
  409.       value (all three digits must be present)
  410.  
  411. Note that the command-separator character may be included  freely
  412. within    a  string;  it separates your command strings outside  of
  413. quotation marks only.
  414.  
  415. MEX   supports multiple commands on a line,  both in READ  files,
  416. and in directly typed commands.  A command line may optionally be
  417. entered  on the CP/M invocation command line,  and this line  may
  418. also  contain multiple commands.   Note that a READ command  will
  419. "stack" any current multiple commands;    when input from the  READ
  420. file  is exhausted,  the remaining commands will then be executed
  421. (a control-C at any time will abort a running READ file and/or    a
  422. multiple command line).
  423.  
  424. The  multiple command separator in the file as distributed is the
  425. semicolon  ";").   This  character may be changed with    the  STAT
  426. command ("STAT ESC") or by modifying the patch file.
  427.  
  428. Examples:
  429.  
  430.    from CP/M:
  431.  
  432.     A>MEX DIR;READ MYFILE;SENDOUT "LOGOUT";BYE
  433.  
  434. This example will bring up MEX, which will first print the direc-
  435. tory,  then begin executing MYFILE.MEX,  which may conain SENDOUT
  436. commands  and R commands to send and receive  files.  When  input
  437. from  MYFILE.MEX is exhausted,    MEX will send the string "LOGOUT"
  438. to the remote.    Finally, MEX will execute the "BYE" command.
  439.  
  440.    from MEX:
  441.  
  442.       [MEX] A3>>COMMAND: RB;SENDOUT "BYE";BYE
  443.  
  444. This  one receives a batch transmission,  sends the string  "BYE"
  445. (gracefully logout from a remote CP/M system,  for example), then
  446. disconnects and exits to CP/M.
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.                 7
  458.  
  459.  
  460.  
  461.  
  462.  
  463. MEX User's Guide                    Terminal mode
  464.  
  465.  
  466.  
  467.  
  468. 4) Terminal mode
  469.  
  470. MEX  terminal  mode is entered with any of  the  single-character
  471. commands  T,  L,  or E (the differences among the three  will  be
  472. explained shortly).
  473.  
  474. While in terminal mode, you are communicating with the remote end
  475. as  a  console;  your keyboard characters are transmitted to  the
  476. remote, and the remote characters are displayed on your screen.
  477.  
  478. There  are several functions that are available to you from  ter-
  479. minal mode, all of which are invoked by typing the escape-charac-
  480. ter (do "STAT ESC" at command level if you don't know your escape
  481. character) followed by one of several characters;  this  combina-
  482. tion is called an "escape-sequence".
  483.  
  484. Terminal mode escape-sequences:
  485.  
  486. <ESC>-E   exits back to command level
  487. <ESC>-?   prints a menu of escape sequences
  488. <ESC>-S   start copying incoming text into file buffer
  489. <ESC>-U   end (un-start) copying text into file buffer
  490. <ESC>-P   toggle copy-to-printer on/off if enabled in the overlay
  491. <ESC>-T   transmit a file to the remote (prompts for a filename)
  492.  
  493. Note  that  <ESC>-S and <ESC>-U require a filename argument  with
  494. the T when you enter terminal mode (otherwise,    there is no  file
  495. active to write the incoming text into).
  496.  
  497. You  can use <ESC>-P to copy incoming text to the  printer.   The
  498. text is held in a buffer, and prints only as the printer is ready
  499. for a character. Thus, your printer may be slower than the modem,
  500. and you won't lose characters unless the buffer fills up.
  501.  
  502. Terminal-mode files (also called CAPTURE or ASCII-SAVE files) are
  503. created by entering a filename with the T (or E or L) command; if
  504. the file already exists,  you will be asked if the file should be
  505. erased.  MEX  will create the new file,  and enter terminal mode.
  506. You  may  also append to an existing file by specifying  the  "A"
  507. secondary option (explained in more detail later).
  508.  
  509. At this point,    incoming text is being saved; you can temporarily
  510. disable  this  by  using  the <ESC>-U  command;  use  <ESC>-S  to
  511. continue  saving in memory (at the point where the  last  <ESC>-U
  512. left  off).  You can perform as many start/stop sequences as  you
  513. like  (when text-save is active,  you'll see a colon at the start
  514. of each line as an indication that the save is active).
  515.  
  516. You can exit terminal mode and move freely among drives and  user
  517. areas without affecting an open term-file.  The LOG command (used
  518. to  change drive/user and reset the disk simultaneously) will not
  519. be functional.
  520.  
  521.  
  522.  
  523.                 8
  524.  
  525.  
  526.  
  527.  
  528.  
  529. MEX User's Guide                    Terminal mode
  530.  
  531.  
  532. If  you enter terminal mode with the T,E or L command witha file
  533. name,  when a file is already open, the open file will be closed,
  534. and the new one opened.
  535.  
  536. You can transfer files using either Christensen or CIS    protocols
  537. while  a TERM file is open -- your buffer may be written to  disk
  538. to make room,  but nothing will be lost,  and the file will still
  539. be open.
  540.  
  541. To  close  the file when you're done saving text,  exit  terminal
  542. mode with <ESC>-E,  and use the WRT command.   If you change your
  543. mind,  and decide you don't want to keep the file after all,  use
  544. the  DEL  command  to erase the file entry and    delete    any  text
  545. already saved in memory.
  546.  
  547. When your printer or ASCII-save buffer fills, MEX will send an X-
  548. OFF character to the remote.   MEX will then wait for the  remote
  549. to stop, and will save up to an additional 150 characters into an
  550. auxiliary  buffer (this buffer may be increased in size by  modi-
  551. fying  MEXPATxx.OVR).    When  the remote stops (or the    auxiliary
  552. buffer    fills) MEX will write the ASCII-save buffer to    disk  (if
  553. ASCII-save  is    active)  and print characters until  the  printer
  554. buffer is half-full (if List-copy is on).  Then MEX will re-start
  555. the  remote  by sending an X-OFF character.  However,if  the  MEX
  556. queue function is disabled (see the QUEUE STAT option in  section
  557. 8), MEX will not save any additional characters after the X-OFF.
  558.  
  559. Note  that  for this scheme to work,  the  remote  computer  must
  560. respond  to  this X-ON/X-OFF "protocol" (most computers  do,  but
  561. not all!).
  562.  
  563. You  can transmit a local disk file to the remote  with  <ESC>-T;
  564. you will be prompted for a filename.  If you have the XON and and
  565. XLINE  variables  turned off (see section 8) MEX will ask if  you
  566. want to use the character and line delays for the filesend; these
  567. delays allow slow remote computers to receive files.
  568.  
  569. The WCHAR and WLINE variables determine the time-delay values for
  570. each  character and each line respectively (of course,    you  must
  571. have answered "Y" to the "want delays?" prompt).   See section    9
  572. for more discussion these variables.
  573.  
  574. If  either  of the the XLINE or XON switches  is  ON,  the  delay
  575. prompt will be skipped, and delays will not be used.
  576.  
  577. XLINE  is  a technique used by some mainframes:  after a line  is
  578. transmitted,  MEX will not transmit another until receiving an X-
  579. ON character from the remote.
  580.  
  581. XON is more frequently used:  when XON is active,  MEX will  send
  582. characters  at    full speed,  but monitor the remote for an  X-OFF
  583. character.   When an X-OFF is received,  MEX will pause until the
  584. remote sends an X-ON character.
  585.  
  586.  
  587.  
  588.  
  589.                 9
  590.  
  591.  
  592.  
  593.  
  594.  
  595. MEX User's Guide                    Append option
  596.  
  597.  
  598. The APPEND secondary option:
  599.  
  600. MEX has a special feature that allows you to maintain 'log' files
  601. of  your sessions;  this is the 'A' secondary  option  (specified
  602. with  the T,  E or L primary commands when entering terminal mode
  603. IF a filename is specified).
  604.  
  605. When  you specify the 'A' secondary option,  MEX will search  the
  606. logged area (and/or the ALT area: see the ALT command description
  607. in  section  7 for more information on searching)  for    the  file
  608. specified.   If found,    MEX will scan to the end of the file, and
  609. append new data on to the end, rather than querying for an erase.
  610.  
  611. If  'A' is not specified,  MEX will limit its search to the  cur-
  612. rently logged DU,  and,  if the file is found, will ask you if it
  613. should erase the file.
  614.  
  615. In either case,  if the file is NOT found,  MEX will create a new
  616. file in the currently logged DU.
  617.  
  618.  
  619. 5) Single-character commands
  620.  
  621. The  most  commonly used MEX commands are implemented  as  single
  622. character commands, for ease of use.  These are:
  623.  
  624. S: Send a file or group of files using Christensen protocol
  625. R: Receive a file or group of files using Christensen protocol
  626. T: Enter terminal mode (may specify an ASCII-save file argument)
  627. E: Enter terminal mode with echo (filename argument ok)
  628. L: Enter terminal mode with local-echo only (filename ok here)
  629.  
  630. T, E, and L are all variations of terminal mode: T sends keyboard
  631. characters  to the remote and prints characters received from the
  632. remote on the console.    E mode echoes received characters back to
  633. the remote ("half duplex" mode), and L echoes keyboard characters
  634. on the console before they go out to the remote ("half duplex" in
  635. the other direction).
  636.  
  637.  
  638. 6) Secondary commands (options)
  639.  
  640. Secondary  options modify the way the  single-character  commands
  641. work,  and  are  normally  placed immediately after  the  single-
  642. character  command on the command line.   Following is a list  of
  643. the secondary commands:
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.                    10
  656.  
  657.  
  658.  
  659.  
  660.  
  661. MEX User's Guide                Secondary options
  662.  
  663.  
  664.            COMMANDS
  665. OPT   NAME       USED WITH   ACTION
  666. --- --------       ---------   ------
  667. A   Append       E,L,T       Append to a terminal-mode file
  668. B   Batch       R and S     BATCH mode, Christensen protocol
  669. D   Disconnect       R and S     Disconnects after a file transfer
  670. E   Term/echo       R and S     Term-mode w/echo after transfer
  671. L   Local       T,E           Local-character echo
  672. Q   Quiet       R and S     Sets quiet mode for file transfer
  673. R   Recv-view       R and S     Shows received-characters only
  674. S   Send-view       R and S     Shows transmitted characters only
  675. T   Terminal-mode  R and S     Enter terminal mode after xfer
  676. V   View       R and S     Views the file transfer in ASCII
  677. X   Exit       R and S     Disconnect and exit after xfer
  678.  
  679. Note  that the options used with R and S are also effective  with
  680. CIS transfers (except for the 'B' option), if set with the GLOBAL
  681. command (see the command description for "GLOBAL" in section 7).
  682.  
  683. Examples of secondary options:
  684.  
  685. Primary Option
  686. |Secondary Options
  687. |||
  688. |||
  689. ST   MYFILE.FOO   <<== send MYFILE.FOO, go into Term. mode after
  690. RVT  CRACKER.JAK  <<== receive file with view, enter Term mode
  691. RQX  MONKEY.SHN   <<== recv file quietly, disconnect/exit after
  692. RBT          <<== recv batch files, Terminal mode after
  693. T    DISKFILE.SAV <<== enter term. mode, allow save to disk file
  694.           (note that the actual copy to the file must be
  695.            activated with ESC-S while in terminal mode)
  696. TA   DISKFILE.SAV <<== Enter tr area. The command
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.                    11
  722.  
  723.  
  724.  
  725.  
  726.  
  727. MEX User's Guide                 Command Descriptions
  728.  
  729.  
  730. 7) Command descriptions
  731.  
  732. The following pages detail the command set recognized by MEX.  In
  733. general, the bracket characters denote optional items, and should
  734. not be entered literally.  For example, the syntax descriptor
  735.  
  736.         DIR [<du-spec>]
  737.  
  738. means that the du-spec is optional; hence, the command syntax may
  739. be satisfied with any of the following actual command lines:
  740.  
  741.         DIR
  742.         DIR A3:
  743.         DIR 0:
  744.  
  745. Items  surrouded  in angle-brackets denote an  item's  type;  the
  746. angle brackets should not be included in the actual command line,
  747. nor  should the description inside the angle brackets be  entered
  748. literally.   In  the above example,  the descriptor <du-spec>  is
  749. replaced with an actual drive/user specification.
  750.  
  751. --------------------
  752.  
  753. We will now look at each command in detail, in roughly alphabeti-
  754. cal order.
  755.  
  756.  
  757. - The ALT command
  758.  
  759. The  ALT  command specifies the ALTernate drive/user area  to  be
  760. searched by MEX for LOAD files (.PHN and .KEY),  READ files,  and
  761. terminal capture files (when APPEND is on).  Syntax is
  762.  
  763.         ALT <du-spec>
  764.  
  765. Examples:
  766.  
  767.         ALT A0:
  768.         ALT B3:
  769.  
  770. - The BELL command
  771.  
  772. The  BELL command rings the bell on your terminal (regardless  of
  773. the setting of the STAT BELL,  which normally disables the bell).
  774. BELL takes a single argument, which specifies the number of times
  775. to ring the bell.   BELL is intended for use in READ files,  as a
  776. means  of  summoning the operator when a certain point    has  been
  777. reached in the READ file's execution).
  778.  
  779. - The BYE command
  780.  
  781. BYE is used to return to CP/M (does not disconnect) at the end of
  782. a MEX session.
  783.  
  784.  
  785.  
  786.  
  787.                    12
  788.  
  789.  
  790.  
  791.  
  792.  
  793. MEX User's Guide                 Command Descriptions
  794.  
  795.  
  796. - The CALL command
  797.  
  798. The CALL command is used to dial numbers either from the  library
  799. or from the keyboard.  If you specify more than one number on the
  800. command line, CALL will try each until one answers with a carrier
  801. tone.  For example,
  802.  
  803.     CALL 16165559033 SENACA
  804.  
  805. will dial the first number; if busy (or no answer), CALL will try
  806. the second.  The special number '#' will cause the entire command
  807. line to be repeated if none of the dialed numbers responds with a
  808. carrier:
  809.  
  810.     CAL WESTWOOD 1-616-555-2040 TCBBS #
  811.  
  812. will try all three numbers repeatedly until one answers.  You may
  813. optionally  place a limit on the number of retries by including a
  814. number after the '#':
  815.  
  816.     CAL 555-1212 #48
  817.  
  818. A ^C will abort dialing at any time.
  819.  
  820. Phone-library numbers may specify an optional baud rate (see  the
  821. description  for  the  PHONE command for information  on  how  to
  822. specify  the rate).  If a baud-rate is present,  CALL will change
  823. the baud rate before dialing the number.
  824.  
  825. Note that,  for this feature to work,  your hardware must be cap-
  826. able  of  changing the rate AND your overlay must  implement  the
  827. NEWBD vector.  Most MEX overlays (overlays whose names start with
  828. "MXO-")  allow    this,  if the hardware is  capable  of    baud-rate
  829. change; most MDM overlays do NOT.
  830.  
  831. - The CLONE command
  832.  
  833. The CLONE command allows you to save a new copy of MEX,  with the
  834. current  options  intact  (including any defined  keystrings  and
  835. phone numbers). The syntax is:
  836.  
  837.         CLONE <filename>
  838.  
  839. Examples:
  840.  
  841.         CLONE MEX.COM
  842.         CLONE NEWMEX.COM
  843.  
  844. Clone  will prompt you for an erase-file operation if the  speci-
  845. fied file already exists on the disk.
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.                    13
  854.  
  855.  
  856.  
  857.  
  858.  
  859. MEX User's Guide                 Command Descriptions
  860.  
  861.  
  862. - The CLS command
  863.  
  864. CLS  clears  the  screen on your terminal (if supported  by  your
  865. physical modem overlay).   Handy when a burst of noise leaves the
  866. cursor    atop a screenful of garbage,  but  requires  clear-screen
  867. support in the physical overlay.
  868.  
  869. - The COLD command
  870.  
  871. The COLD command re-starts MEX and erases any defined  keystrings
  872. along with the phone library.    This is the only way to erase the
  873. entire    phone  library with one command.   The COLD command  also
  874. allows you to remove the CIS protocol module (for those who don't
  875. need it) ... do this:
  876.  
  877.         STAT CIS OFF
  878.         COLD
  879.         CLONE <filename>
  880.  
  881. Note  that this removes the CIS module altogether (you can't  get
  882. it back with the STAT CIS command).   This frees up roughly 1K of
  883. memory.
  884.  
  885.  
  886. - The CPM command
  887.  
  888. CPM  is a synonym for BYE,  and returns control to the    operating
  889. system without disconnecting.
  890.  
  891. - The DEL command
  892.  
  893. DEL  is used to close and erase an open terminal file;    use  this
  894. command when you change your mind about saving a terminal file.
  895.  
  896. - The DIAL command
  897.  
  898.  
  899. The  DIAL  command performs the same task as  the  CALL  command,
  900. except    that  after calling,  DIAL returns to command mode  (CALL
  901. goes to terminal mode).
  902.  
  903. The  syntax for DIAL is exactly the same as the syntax    for  CALL
  904. (described previously), including the multiple-number feature and
  905. the repeat option.
  906.  
  907. DIAL is intended to be used in READ files,  where it is desirable
  908. for  the READ file to retain control after calling a number (READ
  909. files have no effect in terminal mode;    thus using CALL in a READ
  910. file would pause execution of the read file when the distant  end
  911. is reached).
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.                    14
  920.  
  921.  
  922.  
  923.  
  924.  
  925. MEX User's Guide                 Command Descriptions
  926.  
  927.  
  928. - The DIR command
  929.  
  930.  
  931. DIR  works  similarly to the CP/M DIR command,    and displays  the
  932. disk  directory  on the screen.  DIR takes advantage  of  the  DU
  933. specification,    thus  "DIR B7:" will display all of the files  in
  934. user  7  on drive B.   System files will be excluded if the  STAT
  935. variable 'EXCLUDE' is set to ON.   If EXCLUDE is OFF,  all  files
  936. will be displayed.
  937.  
  938. More examples:
  939.  
  940.     DIR C3:*.?Q?
  941.     DIR LOGIN.MEX
  942.     DIR 3:
  943.  
  944. - The DSC command
  945.  
  946. DSC  disconnects the modem from the phone line (may not be imple-
  947. mented in all overlays).
  948.  
  949.  
  950. - The ERA command
  951.  
  952. ERA  erases files,  similarly to CP/M's ERA.   The syntax  is  as
  953. follows:
  954.  
  955.             ERA <filename> [V]
  956.  
  957. The  filename may be ambiguous    (e.g.,    *.ASM,    BOOT?.BAK).   ERA
  958. always    displays a list of the files that are being  erased.   If
  959. you specify the optional 'V' after the filename, ERA will ask for
  960. verification  before actually erasing the files (after displaying
  961. the names).
  962.  
  963. - The GLOBAL command
  964.  
  965. The GLOBAL command allows you to set the secondary options  (des-
  966. cribed    previously) for the single character commands.     Any  op-
  967. tions  set this way will then be active for the  single-character
  968. commands  whether or not they are specified in the actual command
  969. line.  For example, if you prefer to go directly to terminal mode
  970. after a file transfer, do:
  971.  
  972.         GLOBAL T
  973.  
  974. You can also set the VIEW mode for CIS transfers by doing
  975.  
  976.         GLOBAL V
  977.  
  978. (note that this is the only way to "view" a CIS file transfer.
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.                    15
  986.  
  987.  
  988.  
  989.  
  990.  
  991. MEX User's Guide                 Command Descriptions
  992.  
  993.  
  994. - The EXIT command
  995.  
  996. EXIT is a synonym for BYE,  and returns control to the    operating
  997. system without disconnecting.
  998.  
  999.  
  1000. - The HELP command
  1001.  
  1002. HELP  is used to access the on-line manual for MEX (contained  in
  1003. the file HELP.MEX).  Syntax for the HELP command is as follows:
  1004.  
  1005. HELP            <<--- prints help for the HELP command
  1006. HELP ?            <<--- lists available topics
  1007. HELP <topicname>    <<--- prints help information for a topic
  1008.  
  1009. HELP.MEX  must    reside    in the currently logged  drive/user  area
  1010. (unless you use an ALT area, with the SEARCH variable).  Once the
  1011. help  file is opened,  you may move freely among drive    and  user
  1012. areas  without    affecting the operation of  HELP;  MEX    remembers
  1013. where the HELP file is located.
  1014.  
  1015. Once  opened,  the HELP file will remain open for the duration of
  1016. the session, unless a LOG command is executed.
  1017.  
  1018.  
  1019. - The ID command
  1020.  
  1021. The  ID command allows you to configure the MEX ID string  (which
  1022. is  printed in the prompt,  and in error messages,  if    the  STAT
  1023. ERRID switch is set to ON).   This is useful if you're communica-
  1024. ting  with another computer running MEX;  if each computer has    a
  1025. different ID string, you're never in doubt as to which one you're
  1026. typing commands to, or which one printed an error message.
  1027.  
  1028. The syntax for the ID command is
  1029.  
  1030.         ID <string>          (see "STRINGS")
  1031.  
  1032. The  string may be a multi-line string;  it's length in the stan-
  1033. dard distributed MEX may not exceed 28 characters.   This  length
  1034. may be different if your system overlay replaces the MEX defaults
  1035. (in fact, the overlay may disable this command altogether; if the
  1036. "INVALID  COMMAND" message appears when you attempt to use the ID
  1037. command, then this is probably the case).
  1038.  
  1039. -The KEY command
  1040.  
  1041. The  KEY  command is used to manipulate the keystrings    that  are
  1042. available  in  terminal mode.    There are several  forms  of  the
  1043. command:
  1044.  
  1045. KEY                 <<= prints out all of the keystrings
  1046. KEY <keyname>=[<string>]     <<= defines a new keystring
  1047.  
  1048.  
  1049.  
  1050.  
  1051.                    16
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057. MEX User's Guide                 Command Descriptions
  1058.  
  1059.  
  1060.  
  1061. Keyname is any valid ASCII character,  except for the set defined
  1062. as  the  terminal  mode escape-sequence  commands  (see  TERMINAL
  1063. MODE).
  1064.  
  1065. In  the  second form,  above,  if <string> is omitted,    then  the
  1066. specified keystring is erased.
  1067.  
  1068. Examples:
  1069.  
  1070.       KEY %="ATDT 14145559932"          <<= sets up the '%' key
  1071.       KEY Q=                  <<= erases the Q keystring
  1072.  
  1073. Note that KEY names that duplicate terminal-mode commands will be
  1074. rejected  by  the  KEY command,  and an  error    message  will  be
  1075. printed.
  1076.  
  1077. - The LOAD and SAVE commands
  1078.  
  1079. LOAD  and  SAVE are used to load and save phone number    and  key
  1080. string files.  Both commands take a filename argument.    Examples:
  1081.  
  1082.      LOAD A5:CBBSPHON.PHN      <<== loads a phone # file
  1083.      LOAD ARPA.KEY          <<== loads a keystring file
  1084.      SAVE C:NEWPHONE.PHN      <<== saves phone # file
  1085.      SAVE 9:COMPUSRV.KEY      <<== saves keystring file
  1086.  
  1087. Note  that  the  filetype determines what type of file    is  being
  1088. saved  (.PHN for phone number files,  .KEY for keystring  files).
  1089. Any other filetype will generate an argument error.
  1090.  
  1091. - The LOG command
  1092.  
  1093. The  LOG  command allows you to reset the  drive  (for    switching
  1094. disks) and,  optionally,  simultaneously change drive and/or user
  1095. area. The command syntax is
  1096.  
  1097.         LOG <DU-SPEC>
  1098.  
  1099. where  DU-SPEC is either or both of the new drive to log into and
  1100. the  new user area.   An optional colon may follow  the  DU-SPEC.
  1101. Examples:
  1102.  
  1103.         LOG B7:        <<= reset, log in drive B user 7
  1104.         LOG 7:        <<= reset, log user 7 current drive
  1105.         LOG B:        <<= reset, log drive B current user
  1106.         LOG         <<= reset, retain current user/drive
  1107.  
  1108. If either a terminal file or a READ file is open,  the disk-reset
  1109. will be denied and the LOG command will display an error message.
  1110.  
  1111. If you want to change drive and/or user without a disk reset, you
  1112. can do so without the LOG command:  just enter the DU spec at the
  1113. MEX command prompt.
  1114.  
  1115.  
  1116.  
  1117.                    17
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123. MEX User's Guide                 Command Descriptions
  1124.  
  1125.  
  1126. - The PHONE command
  1127.  
  1128. The  PHONE command may be used to query the phone number library,
  1129. as well as for adding and deleting numbers.  To add a number, use
  1130. this form:
  1131.  
  1132.         PHONE <id>=<number> [baud-rate]
  1133.  
  1134. Where ID is a string (up to 8 characters) that you want to use to
  1135. call  out the number and <number> is the  telephone  number.   If
  1136. <id>  already  exists,    it will be replaced.   <Baud-rate> is  an
  1137. optional rate to be associated with the number,  used by the CALL
  1138. command.  To remove a number, do
  1139.  
  1140.         PHONE <ID>=
  1141.  
  1142. To see the entire library, do
  1143.  
  1144.         PHONE
  1145.  
  1146. To see a single entry, do
  1147.  
  1148.         PHONE <ID>
  1149.  
  1150. Examples:
  1151.  
  1152. PHONE FONE=1-414-563-4013 1200 <<--- associates number w/FONE
  1153. PHONE FONE=1-414-563-4013      <<--- same but no baudrate chg
  1154. PHONE                   <<--- lists the phone number lib
  1155. PHONE FONE=               <<--- removes FORTFONE from lib
  1156. PHONE FONE               <<--- prints entry for FORTFONE
  1157.  
  1158. - The PREFIX and SUFFIX commands
  1159.  
  1160.  
  1161. PREFIX    and SUFFIX are used with the SENDOUT  command  (described
  1162. later). PREFIX is used to manipulate a special PREFIX string, and
  1163. SUFFIX is used to manipulate a SUFFIX string.
  1164.  
  1165. The  PREFIX  string is transmitted ahead of any  SENDOUT  string,
  1166. when the SENDOUT command is used, and the SUFFIX string is trans-
  1167. mitted    after.     This  simplifies  the construction  of  complex,
  1168. repetitive command lines to be sent to the remote.
  1169.  
  1170. Either command without arguments prints the current value of  the
  1171. string.  To  change the string,  enter the string on the  command
  1172. line after the command.
  1173.  
  1174. Examples:
  1175.  
  1176.       PREFIX ""           <<== sets null prefix string
  1177.       PREFIX "XMODEM S "      <<== sets a prefix
  1178.       SUFFIX "^M"          <<== set carriage-return as suffix
  1179.  
  1180.  
  1181.  
  1182.  
  1183.                    18
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189. MEX User's Guide                 Command Descriptions
  1190.  
  1191.  
  1192. In  the second and third examples above,  the subsequent  SENDOUT
  1193. would work like this:
  1194.  
  1195.         SENDOUT FOO.BAR
  1196.  
  1197. which would actually send out "XMODEM S FOO.BAR" <CR>
  1198.  
  1199.  
  1200. - The READ command
  1201.  
  1202. The  READ  command causes MEX to take command lines from  a  disk
  1203. file.  This  can be handy for such things as controlling a set of
  1204. file  transfers  (especially when you can't be    present  for  the
  1205. entire    session) and executing complicated login sequences  auto-
  1206. matically.  READ, used with the EXTEND function (see the descrip-
  1207. tion  of  the EXTEND variable in section 8) provides a    means  of
  1208. extending MEX's command set.
  1209.  
  1210. The syntax for READ is:
  1211.  
  1212.     READ <filename> [<parm1>] [<parm2>] ...
  1213.                 \           \
  1214.                   \ ________\_____>> optional!
  1215.  
  1216.  
  1217. The  READ file may contain any valid command EXCEPT another  READ
  1218. command.   These  commands may freely move among drives and  user
  1219. areas; MEX will remember where the READ file is located.
  1220.  
  1221. Typically,  READ  files are created with a text editor,  and  may
  1222. contain STAT commands to set MEX for a particular type of connec-
  1223. tion,  DIAL commands to actually make the connection, and SENDOUT
  1224. commands  to  log in at the destination.   It's possible  for  an
  1225. entire session to take place under a READ command.
  1226.  
  1227. A READ file will terminate when the file ends, or when a CONTROL-
  1228. C  is  seen at the console (aborting any command  with    CONTROL-C
  1229. will abort the READ file).
  1230.  
  1231. It's  important  to note that,    while you can use a READ file  to
  1232. enter  the  terminal mode,  the READ file is not used  while  the
  1233. terminal mode is active.   When you exit terminal mode,  the READ
  1234. file starts again.
  1235.  
  1236. Normally, READ commands echo on the screen when they execute. You
  1237. can inhibit this,  however,  by manipulating the SILENT  variable
  1238. (do STAT SILENT ON to inhibit the command echo).
  1239.  
  1240. READ parameters are very similar to CPM's SUBMIT parameters; they
  1241. are called ACTUAL parameters.  If they are present in the command
  1242. line,  they  will  be plugged into the FORMAL parameters  in  the
  1243. submit file.  This substitution facility provides a powerful tool
  1244. for generating multiple-purpose command files.
  1245.  
  1246.  
  1247.  
  1248.  
  1249.                    19
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255. MEX User's Guide                 Command Descriptions
  1256.  
  1257.  
  1258.  
  1259. Formal parameters occur in the READ file,  and take the form {n},
  1260. where n is the parameter number; these numbers correspond sequen-
  1261. tially    with  the ACTUAL parameters entered on the command  line.
  1262. The ACTUAL parameters in the command line are substituted for the
  1263. FORMAL parameters in the READ file when the file is executed.    A
  1264. special  form  of FORMAL parameter allows a default value  to  be
  1265. used if an ACTUAL parameter is not specified on the command line;
  1266. this  form  is {n:<text>} where n is the  parameter  number,  and
  1267. <text> is any arbitrary text to be used as the default.
  1268.  
  1269. If the default form of the formal parameter is not used,  and  no
  1270. actual parameter is specified in the command line, execution will
  1271. continue, but the parameter will be blank.
  1272.  
  1273. Normally,  the parameters in the READ command line are terminated
  1274. by the space between parameters (or the end-of-line);  spaces can
  1275. be imbedded in the ACTUAL parameter by enclosing it in braces.
  1276.  
  1277. I  know  this  all sounds quite complex,  but it's  really  quite
  1278. simple, as the following example will show.
  1279.  
  1280. Assume a file named FILEGET.MEX contains the following lines:
  1281.  
  1282. SENDOUT XMODEM S{2} {1:SENACA.DQR}
  1283. R{2} {1:SENECA.DQR}
  1284.  
  1285. ( {2} and {1:SENACA.DQR} are FORMAL parameters). This file can be
  1286. used in several ways:
  1287.  
  1288. READ FILEGET        will transfer SENACA.DQR to your system
  1289. READ FILEGET MEX.UPD    will transfer MEX.UPD to your system
  1290. READ FILEGET *.NEW B    will transfer all NEW files in batch mode
  1291. READ FILEGET USQ.DOC VT will transfer FILEGET, viewed,then T mode
  1292.  
  1293. The following line illustrates how to expand a    parameter,  using
  1294. the  above  file,  and    is useful only if MEX is running  on  the
  1295. remote end:
  1296.  
  1297.     READ FILEGET {*.BOO NEWSTUFF.DOC} BX
  1298.  
  1299. (Transfers all .BOO files and NEWSTUFF.DOC) in batch  mode,  then
  1300. disconnects)
  1301.  
  1302. If you turn the command extender on (STAT EXTEND ON), the READ in
  1303. the above lines can be omitted,  making the READ file look like a
  1304. built-in  command.  This affects single-character commands  some-
  1305. what:  the disk is searched before the the command is checked for
  1306. a  single;  you can avoid this by prefixing single character com-
  1307. mand lines with a '*'  (eg, *RQ FILE.FOO).
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.                    20
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321. MEX User's Guide                 Command Descriptions
  1322.  
  1323.  
  1324. - The REN command
  1325.  
  1326. The REN command  syntax is similar to the CP/M's REN, except that
  1327. DU  specifications may be employed in either the new OR  the  old
  1328. filename (but not in both).
  1329.  
  1330. In general the syntax is
  1331.  
  1332.         REN <newfilename>=<oldfilename>
  1333.  Examples:
  1334.          [MEX] A0>> REN NEWFILE=OLDFILE         (uses A0)
  1335.          [MEX] C9>> REN B6:REPORT.OLD=REPORT.DOC (uses B6)
  1336.          [MEX] B4>> REN 6:MYFILE=B:YOURFILE      (uses B6)
  1337.          [MEX] D4>> REN ERROR=C9:BLUNDER         (uses C9)
  1338.  
  1339. Note that the following REN commands will produce errors:
  1340.  
  1341.       [MEX] A0>> REN B3:SOMETHING=C:ELSE      (ambig drives)
  1342.       [MEX] A0>> REN 6:ME=7:YOU           (ambig user #'s)
  1343.  
  1344. Also, ERA will prompt for erasure if the new name already exists.
  1345. Before doing this,  it checks for the existence of the old  file-
  1346. name,  and, if not found, aborts before checking for the presence
  1347. of the new name.
  1348.  
  1349.  
  1350. - The SENDOUT command
  1351.  
  1352. SENDOUT  allows you to send an arbitrary string out to the  modem
  1353. (see  STRINGS).   This is most useful in READ command files,  but
  1354. can often be useful in normal interactive mode.
  1355.  
  1356. The syntax for SENDOUT is
  1357.  
  1358.         SENDOUT <string>
  1359.  
  1360. Before the specified string is transmitted,  a PREFIX string,  if
  1361. any, is transmitted, followed by the string specified to SENDOUT,
  1362. and  terminated by a SUFFIX string  (if any;  the default  suffix
  1363. string    is a return-code,  normally terminating the line  to  the
  1364. remote). After transmitting the string, MEX will wait for a reply
  1365. from  the remote,  up to a pre-set number of seconds;  any  reply
  1366. will printed on your screen.
  1367.  
  1368. Following  are    settings and variables which affect  the  SENDOUT
  1369. command:
  1370.  
  1371. SUFFIX: \  Described previously
  1372. PREFIX: /
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.                    21
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387. MEX User's Guide                 Command Descriptions
  1388.  
  1389.  
  1390.  
  1391. WTECHO:  Manipulated  by the STAT command,  this  switch-variable
  1392. determines  whether or not SENDOUT validates its transmission  by
  1393. waiting  for characters to be echoed from the remote.    If set to
  1394. ON, then SENDOUT checks each printing character it transmits with
  1395. the  character as echoed by the remote.   If a    mismatch  occurs,
  1396. SENDOUT  marks an error,  sends a CANCEL character,  and awaits a
  1397. TRIGGER  character from the remote.   It then begins  again,  and
  1398. repeats  this cycle until either the transmission occurs  without
  1399. error, or the error count is exceeded (which aborts SENDOUT).
  1400.  
  1401. If you use SENDOUT with WTECHO off, you'll also likely want to
  1402. set TRIGGER to null (STAT TRIGGER ""), to avoid trigger-wait.
  1403.  
  1404. More factors affecting SENDOUT:
  1405.  
  1406. RETRY:     Manipulated  by the STAT  command,  this  value-variable
  1407. specifies the error-retry count for SENDOUT before aborting.
  1408.  
  1409. CANCHR:  Manipulated  by the STAT command,  this  string-variable
  1410. (single  character) specifies the character to be transmitted  to
  1411. the remote to cancel the transmitted line after an error.
  1412.  
  1413. SODELAY:  Manipulated by the STAT command,  this  switch-variable
  1414. ties  SENDOUT strings (and terminal-mode keystrings) to the WCHAR
  1415. and WLINE time-delay values,  as long as WTECHO is off (if WTECHO
  1416. is on, it takes precedence, and delays are not used).
  1417.  
  1418. TRIGGER:  Manipulated by the STAT command,  this  string-variable
  1419. (single character) is the character the SENDOUT command waits for
  1420. after an error-cancel,    before proceeding with the retry.  If the
  1421. other end doesn't echo, set TRIGGER to 0 (and WTECHO to OFF), and
  1422. MEX will simply send its arguments and not worry about validating
  1423. the  echoed string (this is the technique you should use to  send
  1424. Smartmodem command strings, for example).
  1425.  
  1426.  
  1427. - The SET command
  1428.  
  1429. SET is a command defined entirely by the overlay; if your overlay
  1430. doesn't  implement the SET command,  MEX will print the  "invalid
  1431. command" message when you try to invoke SET.
  1432.  
  1433.  
  1434. - The SSET command
  1435.  
  1436. SSET is similar to SET, but is included for use of the Smartmodem
  1437. logical overlay.   Not all Smartmodem overlays implement set, but
  1438. those that do aren't guaranteed to use identical syntax.
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.                    22
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453. MEX User's Guide                 Command Descriptions
  1454.  
  1455.  
  1456.  
  1457. - The SLEEP command
  1458.  
  1459. SLEEP is used to invoke a delay (handy sometimes in READ files).
  1460. Syntax is:
  1461.  
  1462.             SLEEP n
  1463.  
  1464. where n is the number of seconds to wait (a ^C from the console
  1465. will abort the SLEEP command, as well as any active READ file).
  1466.  
  1467. SLEEP,    used with the STAT CLOCK function, can be used to "tweak"
  1468. the  timing constants in MEX (by timing the actual SLEEP  period,
  1469. and  adjusting    the CLOCK value until the SLEEP  argument  agrees
  1470. with the actual measured time).   This is especially useful  with
  1471. multi-tasking operating systems, such as MP/M and TurboDOS, where
  1472. background  processing wreaks havoc with the internal MEX  timing
  1473. constants.
  1474. - The STAT command
  1475.  
  1476. The  STAT command lets you examine certain system variables,  and
  1477. change certain others.    In general, the syntax is as follows:
  1478.  
  1479.     STAT <KEYWORD>            <<== to examine a variable
  1480.     STAT <KEYWORD> <NEW-VALUE>  <<== to change a variable
  1481.  
  1482. The NEW-VALUE will depend on the context of the keyword in  ques-
  1483. tion.  For example,  most of the switch-type variables are either
  1484. ON or OFF, hence,
  1485.  
  1486.     STAT BAKFIL            <<== prints out ON or OFF
  1487.     STAT BAKFIL ON            <<== turns on BAKFIL
  1488.     STAT BAKFIL OFF         <<== turns off BAKFIL
  1489.  
  1490. The  value-type  variables,  on the other hand,  will  print  the
  1491. number or text associated with that variable.    Setting the value
  1492. requires  the  entry in units associated with  that  value.   For
  1493. example,
  1494.  
  1495.  STAT REPLY 5      <== sets 5 seconds as SENDOUT reply time
  1496.  STAT WCHAR 4      <== set 40 ms as transmit-character delay time
  1497.                during a terminal-mode file send
  1498.  
  1499. Some  variables  are read-only,  most notably STAT BUFFER  (which
  1500. prints out the save-buffer and printer-buffer statistics).
  1501.  
  1502. To  obtain  a list of all of the options that can  be  viewed  or
  1503. changed with the STAT command, do
  1504.  
  1505.     STAT ?
  1506.  
  1507. Most of the STAT keywords are documented in section 8.
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.                    23
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519. MEX User's Guide                 Command Descriptions
  1520.  
  1521.  
  1522. - The TERM command
  1523.  
  1524. The TERM command is used to activate a terminal-mode file, and is
  1525. generally of use within READ files.   TERM works exactly like the
  1526. single-character T command,  but does not actually enter terminal
  1527. mode.  TERM takes a filename as an argument.
  1528.  
  1529. Some examples:
  1530.  
  1531. TERM SESSION.LOG
  1532. TERM ROYALOAK.DIR
  1533.  
  1534. - The TERMA command
  1535.  
  1536. TERMA works exactly like TERM, but opens the file in append mode.
  1537. Thus it is similar to the single-character T command,  with the A
  1538. secondary option ("TA").
  1539.  
  1540. - The TYPE command
  1541.  
  1542. The  TYPE command prints files on the console,    similarly to  the
  1543. CP/M TYPE command, but with pagination:  The syntax is:
  1544.  
  1545.         TYPE <filename> <'P'>
  1546.  
  1547. The optional 'P' will affect pagination at screen boundaries:  if
  1548. pagination  is OFF ("STAT PAGE OFF") then 'P' will cause the file
  1549. to be paged.  If pagination is ON ("STAT PAGE ON"), then 'P' will
  1550. inhibit pagination.
  1551.  
  1552.  
  1553. Examples:
  1554.  
  1555.     A2>>COMMAND: TYPE REPORT.DOC    (paged output if PAGE ON)
  1556.     A2>>COMMAND: TYPE REPORT.DOC P  (inhibits paging if PAGE ON)
  1557.  
  1558.  
  1559. - The SYSTEM command
  1560.  
  1561. SYSTEM is a synonym for BYE, and returns control to the operating
  1562. system without disconnecting the modem.
  1563.  
  1564. - The WRT command
  1565.  
  1566. WRT is used to close and save an open terminal file. An automatic
  1567. WRT  if  performed for you if you use any of  the  exit  commands
  1568. (BYE, EXIT,CPM, or SYSTEM) while a terminal-mode file is open.
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.                    24
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585. MEX User's Guide                   STAT variables
  1586.  
  1587.  
  1588. 8) STAT variables
  1589.  
  1590. This  section  describes  the variables that may be  examined  or
  1591. changed with the STAT command.
  1592.  
  1593.  
  1594. - The ALERT variable
  1595.  
  1596.  
  1597. ALERT is a STAT value variable; it determines the number of times
  1598. the console bell will ring when a remote computer is reached with
  1599. the CALL and DIAL commands.   ALERT works only on calls that have
  1600. taken more than one dialing attempt to reach.
  1601.  
  1602. ALERT  is  handy  for dialing with the repeat  option  (see  CALL
  1603. command  in section 7 for more information about the  repeat  op-
  1604. tion): you can enter a number (or group of numbers) to be dialed;
  1605. with  ALERT  set non-zero,  you'll have an audible signal that    a
  1606. call has been completed.
  1607.  
  1608.  
  1609. - The BAKFILE variable
  1610.  
  1611. BAKFILE  is  a STAT  Switch variable:  if ON,  any  command  that
  1612. creates  a  file when one of the same name already  exists  will,
  1613. instead  of erasing the old (or prompting for an erasure)  rename
  1614. the  old  with the same primary name,  and a  secondary  name  of
  1615. "BAK".
  1616.  
  1617.  
  1618. - The BELL variable
  1619.  
  1620. BELL enables or disables the console bell throughout MEX (ie,  in
  1621. terminal mode, command mode, and during file transfers).
  1622.  
  1623.  
  1624. - The BUFFER variable
  1625.  
  1626. BUFFER is not really a variable; use STAT BUFFER to print out the
  1627. ASCII capture buffer statistics (size, amount used, amount avail-
  1628. able).     In  addition,    STAT BUFFER displays the  batch-filenames
  1629. buffer size  (which  determines the  largest number of files that
  1630. may be transferred in one batch file transfer command).
  1631.  
  1632.  
  1633. - The CAPTURE variable
  1634.  
  1635. CAPTURE  is  a    switch variable that may be  used  to  enable  or
  1636. disable  save-in-memory when a term file is open (it will  refuse
  1637. to  change  if no term file is open).    CAPTURE  is  most  useful
  1638. within    a  READ file to allow SENDOUT replies to be saved to  the
  1639. capture buffer.
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.                    25
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651. MEX User's Guide                   STAT variables
  1652.  
  1653.  
  1654.  
  1655. - The TRIGGER and CANCEL variables
  1656.  
  1657. TRIGGER is a STAT CHARacter variable, and specifies the character
  1658. the SENDOUT command will look for before sending out its argument
  1659. (a  single-character  prompt from the remote).     To  disable  the
  1660. trigger-wait function altogether, do
  1661.  
  1662.         STAT TRIGGER ""
  1663.  
  1664. CANCEL is anoter CHAR variable,  and specifies the character  the
  1665. SENDOUT  command will send to the remote to cancel the line after
  1666. an error.
  1667.  
  1668.  
  1669. - The CHAR variable
  1670.  
  1671.  
  1672. CHAR is not really a varible,  but a command option to STAT  that
  1673. prints a list of all of the CHAR variables.
  1674.  
  1675.  
  1676. - The CHECKSUM and CRC variables
  1677.  
  1678. CRC  and  CHECKSUM  are switch variables;  the two  are  mutually
  1679. exclusive (that is,  turning one on turns the other off) and  set
  1680. the   preferred  type  of  error  checking  in    Christensen  file
  1681. transfers.
  1682.  
  1683. CHECKSUM is a simple sum of the outgoing record;  CRC uses a more
  1684. sophisticated technique employing polynomial arithmetic,  and  is
  1685. thus  a better method (more errors are detected,  thus,  there is
  1686. less  chance of an incorrect record being received as if it  were
  1687. valid).
  1688.  
  1689. The  original MODEM2 protocol employed only  CHECKSUM  detection;
  1690. however,  in  the  past few years,  most versions of  Christensen
  1691. exchange programs have been rewritten to accept the CRC technique
  1692. as  well.   MEX will adapt to transmitting programs using  either
  1693. type of validation.
  1694.  
  1695. If  MEX is the transmitter,  it will switch modes  after  several
  1696. failed    attempts to transmit a file,  thus allowing full compati-
  1697. bility with older modem programs.
  1698.  
  1699.  
  1700. - The CIS variable
  1701.  
  1702. CIS  is  a STAT switch:  when ON,  then Compuserve  protcol  file
  1703. transfers are allowed while in terminal mode.  If OFF, Compuserve
  1704. transfer  sequences  from the remote end are  ignored  altogether
  1705. (although  they are printed on the screen as  "normal"    terminal-
  1706. mode characters).
  1707.  
  1708.  
  1709.  
  1710.  
  1711.                    26
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717. MEX User's Guide                   STAT variables
  1718.  
  1719.  
  1720.  
  1721. CIS transfers always take place while in terminal mode;  there is
  1722. no  command to send or receive a file using CIS  protocol,  since
  1723. the remote Compuserve end must initiate the transfer.
  1724.  
  1725. Note  that  if you use the COLD command to restart MEX while  the
  1726. CIS  switch  is set to OFF,  then the  Compuserve  file  transfer
  1727. module    will be removed altogether from the running copy of  MEX.
  1728. If  you  subsequently use the CLONE command to create a new  exe-
  1729. cutable  MEX.COM,  the additional space formerly used by the  CIS
  1730. module    (about    1000 bytes) will be available  instead    for  your
  1731. buffers.  You will not be able to use STAT to turn the CIS switch
  1732. back  on  (since there is no longer a CIS module in the  system).
  1733. This  feature  is intended for those users who do  not    need  the
  1734. ability to do Compuserve-protocol transfers, and would rather not
  1735. waste space on an unneeded feature.
  1736.  
  1737.  
  1738. - The CLOCK variable
  1739.  
  1740. CLOCK is a STAT value variable;  you may set this variable to any
  1741. value  between    1 and 255.   The value is the CPU clock speed  in
  1742. tens of Megahertz (hence,  the speed may vary between .1 and 25.5
  1743. Mhz).    You  can then use the CLONE command to make  this  change
  1744. permanent.
  1745.  
  1746. CLOCK  is  useful for "tweaking" MEX under varying conditions  of
  1747. load when running under multi-tasking operating systems,  such as
  1748. MP/M and TurboDOS.   When system load is heavy,  you can decrease
  1749. the CLOCK value,  causing MEX to spend less time in its  internal
  1750. timing loops.
  1751.  
  1752.  
  1753. - The DEBUG variable
  1754.  
  1755. DEBUG is a STAT switch that affects the Terminal mode in MEX.  If
  1756. DEBUG  is ON,  then characters received in Terminal mode are dis-
  1757. played    in  a form similar to CP/M's DDT dump  (D)  command:  hex
  1758. values on the left side of the screen and the ASCII block (as the
  1759. output progresses) on the right.
  1760.  
  1761. You'll note that the ASCII right-side display is "buffered" until
  1762. 16  characters have been received.   After the    16th,  the  ASCII
  1763. right-side is printed.    Therefore, if the remote's output pauses,
  1764. you'll    see only the hex values until the remote sends more  out-
  1765. put.   Also,  exiting  Terminal  mode will display  any  buffered
  1766. ASCII.
  1767.  
  1768. DEBUG  is useful whenever it's necessary to know exactly what the
  1769. remote    is sending (for example,  if you're connected to a  time-
  1770. share  network,  and can't transfer files,  a DEBUG  session  can
  1771. prove illuminating in determining just what is happening).
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.                    27
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783. MEX User's Guide                   STAT variables
  1784.  
  1785.  
  1786.  
  1787. In DEBUG mode,    the FILTER flag is ignored,  allowing all charac-
  1788. ters  to  reach the screen.   Additionally,  the CIS protocol  is
  1789. disabled while DEBUG is ON.
  1790.  
  1791.  
  1792. - The HEX and DECIMAL variables
  1793.  
  1794.  
  1795. HEX  and  DECIMAL are STAT switch variables;  they  are  mutually
  1796. exclusive (ie, turning one ON turns the other OFF.  These variab-
  1797. les specify the default input radix of commands that take numeric
  1798. arguments (e.g.,  SLEEP,  STAT VAL <#>, the '#' spec in CALL com-
  1799. mands,    etc).    If HEX mode is ON, then these numbers are consid-
  1800. ered Hexadecimal;  if DECIMAL mode is on (MEX is distributed with
  1801. DECIMAL ON), then they are considered decimal values.
  1802.  
  1803. You can force a decimal number,  regardless of the HEX or DECIMAL
  1804. mode,  by preceeding the number with a '$' character;  similarly,
  1805. the '#' character implies a decimal number.
  1806.  
  1807. HEX mode has a side effect:  it turns on HEX record count report
  1808. ing in file transfers.
  1809.  
  1810.  
  1811. - The ERRID variable
  1812.  
  1813. ERRID is a STAT switch that enables and disables the printing  of
  1814. the MEX ID string in error messages.
  1815.  
  1816. The  ID string is useful in applications where you're  communica-
  1817. ting  with a remote computer running MEX (if each end has a  dif-
  1818. ferent    ID code,  there is no problem confusing error  messages),
  1819. but  if you typically use MEX only with RCPM systems or timeshar-
  1820. ing  systems that don't run MEX,  you'll likely want to turn  off
  1821. the ERRID switch, and shorten the error messages.
  1822.  
  1823.  
  1824. - The EXCLUDE variable
  1825.  
  1826. EXCLUDE is a STAT switch-type variable.   It modifies the  action
  1827. of  commands  that take multiple-filename arguments (such as  DIR
  1828. and the batch-transmit SB).
  1829.  
  1830. If  EXCLUDE  is  ON,  then SYS files are skipped  over    by  these
  1831. commands.
  1832.  
  1833.  
  1834. If EXCLUDE is OFF, then SYS files are included.
  1835.  
  1836. Thus,  you can exclude SYS files from a batchfile transmission by
  1837. STATting the EXCLUDE switch ON.  These files will also be exclude
  1838. from DIR listings while EXCLUDE is ON.
  1839.  
  1840.  
  1841.  
  1842.  
  1843.                    28
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849. MEX User's Guide                   STAT variables
  1850.  
  1851.  
  1852. - The EXTEND variable
  1853.  
  1854. EXTEND is a STAT switch variable.   When turned on,  it  modifies
  1855. the  way MEX's command decoding works:    if a command is not found
  1856. in MEX's command table,  MEX will pass the entire command line on
  1857. to READ, causing the command to look like a READ command (without
  1858. READ being present on the command line).
  1859.  
  1860. When  using  EXTEND,  you  may notice that  the  single-character
  1861. commands  are  searched  as disk files before  being  checked  as
  1862. built-in commands;  this is due to parsing constraints.  To avoid
  1863. the disk search when using single-character commands with  EXTEND
  1864. active, prefix the command withe a '*' (eg, *RQ FILE.FOO).
  1865.  
  1866.  
  1867. - The ESC variable
  1868.  
  1869. ESC  is  a STAT CHAR variable,    and specifies your  terminal-mode
  1870. escape character,  used to activate terminal-mode functions (such
  1871. as  capture and printer buffer on/off,    etc).  The argument is    a
  1872. single character string.  Example:
  1873.  
  1874.             STAT ESC "^I"
  1875.  
  1876.      changes your escape character to the TAB key.
  1877.  
  1878.  
  1879. - The FILTER variable
  1880.  
  1881. FILTER is a STAT switch variable;  when ON, then abnormal control
  1882. characters are ignored when in terminal mode (with the    exception
  1883. of carriage-return,  linefeed,    backspace and tab).  If OFF, then
  1884. all  characters  from the remote will be displayed on the  screen
  1885. (and included in the ASCII-capture file,  if active). FILTER also
  1886. screens nulls and characters with the high-bit set.
  1887.  
  1888. FILTER    ON  is useful if you're working with a noisy  connection,
  1889. and random garbage characters on the line are erasing or mangling
  1890. your screen display.
  1891.  
  1892. If  you're  using  a video-oriented text editor  at  the  remote,
  1893. you'll    want to be sure FILTER is set to OFF,  in order to  allow
  1894. the video-control characters to be accepted by MEX.
  1895.  
  1896. Note that the CP/M end-of-file mark is specifically excluded from
  1897. ASCII-capture files regardless of the setting of FILTER (although
  1898. FILTER ON allows this character to go to the screen).
  1899.  
  1900.  
  1901. - The INITFILE variable
  1902.  
  1903. INITFILE is a STAT switch variable.  It determines whether or not
  1904. MEX  will  look  for the start-up file INI.MEX when it    is  first
  1905. started.
  1906.  
  1907.  
  1908.  
  1909.                    29
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915. MEX User's Guide                   STAT variables
  1916.  
  1917.  
  1918. INITFILE is intended to be used prior to running CLONE,  to  pre-
  1919. vent the cloned MEX from looking for INI.MEX.
  1920.  
  1921. For  more  information about the CLONE command,  see its  command
  1922. description in section 7.
  1923.  
  1924.  
  1925.  
  1926. - The LF variable
  1927.  
  1928. LF  is a switch variable:  if ON,  it affects terminal-mode  file
  1929. transmission by adding a linefeed after every carriage return.
  1930.  
  1931.  
  1932. - The LIST variable
  1933.  
  1934. LIST  is  a Switch variable,  and enables or  disables    the  LIST
  1935. device.
  1936.  
  1937. - The PAGE variable
  1938.  
  1939. PAGE is a STAT value variable, and sets the number of lines to be
  1940. displayed on the screen, for commands like TYPE, HELP and STATUS,
  1941. which  paginate  their output.     Setting the PAGE variable  to    0
  1942. disables pagination by these commands.
  1943.  
  1944. - The PRECHO variable
  1945.  
  1946. PRECHO    is  a STAT switch variable that enables and disables  the
  1947. logging of incoming characters to the printer.     It is similar to
  1948. the <ESCAPE>-P printer toggle command used in terminal mode,  and
  1949. is intended for use in READ files.
  1950.  
  1951. - The REPLY variable
  1952.  
  1953. REPLY is a STAT value variable,  and specifies the amount of time
  1954. (in seconds) that the SENDOUT command will wait,  after sending a
  1955. string,  for the remote end to send a reply.  Any such reply will
  1956. be  displayed  on your terminal screen;  if  a    terminal-file  is
  1957. active    and CAPTURE is on,  then the reply also goes to the term-
  1958. file.    If PRECHO is active, the reply will go the list device as
  1959. well.
  1960.  
  1961. To query the REPLY constant, do: STAT REPLY
  1962.  
  1963. To set the REPLY time, do:     STAT REPLY <value>
  1964.  
  1965. where  <value> is the number of seconds to wait,  between  0  and
  1966. 255.
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.                    30
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981. MEX User's Guide                   STAT variables
  1982.  
  1983.  
  1984. - The RETRY variable
  1985.  
  1986. RETRY is a STAT value variable, and specifies the number of times
  1987. the  SENDOUT command will attempt to send a string before  abort-
  1988. ing.   Note  that  if the Wait-For-Echo switch (WTECHO)  is  off,
  1989. RETRY will have no effect, since no error can occur.
  1990.  
  1991. To query the RETRY constant, do: STAT RETRY
  1992.  
  1993. To set the RETRY constant, do:     STAT RETRY <value>
  1994.  
  1995. where <value> is the number of retries, between 1 and 255.
  1996.  
  1997.  
  1998. - The RTIME varible
  1999.  
  2000. RTIME is a STAT value variable,  and affects Christensen-protocol
  2001. file transfers.
  2002.  
  2003. RTIME is the amount of time (in seconds) that MEX will wait for a
  2004. character  from the remote end before declaring  a  timeout,  and
  2005. initiating a record-retransmission sequence.
  2006.  
  2007. RTIME  is  set for one second in the standard  distribution  MEX;
  2008. this  is  more than adequate for RCPM work,  and MEX-to-MEX  file
  2009. transfers where each end is running under a single user operating
  2010. system.   But when working with a mainframe-type connection  (and
  2011. sometimes  when a remote MEX is running under  MP/M),  especially
  2012. when a packet-switched network is part of the connection, charac-
  2013. ter delays can easily exceed one second.   In these environments,
  2014. you'll    want to set RTIME to a higher value (16 seconds is recom-
  2015. mended; the maximum is 255).
  2016.  
  2017. - The RUB variable
  2018.  
  2019. RUB is a STAT switch variable and affects terminal mode:  if  ON,
  2020. then the local backspace key is converted to RUB when the charac-
  2021. ter is transmitted to the remote.
  2022.  
  2023. - The SEARCH varible
  2024.  
  2025. SEARCH is a STAT variable that may take on the values 0,  1, 2 or
  2026. 3.   SEARCH specifies a search path for READ files, phone librar-
  2027. ies, keystring files, and (if the append secondary option, 'A' is
  2028. specified)  terminal-mode ASCII capture files.     These files nor-
  2029. mally are taken only from the currently logged DU;  by    modifying
  2030. SEARCH, you can change the way MEX finds these files.
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.                    31
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047. MEX User's Guide                   STAT variables
  2048.  
  2049.  
  2050. Two  drive/user (DU) areas are possible:  the currently logged DU
  2051. and  the Alternate DU (see section 7 for information on  changing
  2052. the alternate DU).
  2053.  
  2054. If SEARCH=0, then only the currently logged DU is searched.
  2055. If SEARCH=1, then only the ALT DU is searched.
  2056. If SEARCH=2, then the currently logged is searched;  if the file
  2057.          is not found, then the ALT DU is searched.
  2058. If SEARCH=3, then the ALT DU is searched;  if the file    is  not
  2059.          found, then the currently logged DU is searched.
  2060.  
  2061.  
  2062. - The SODELAY variable
  2063.  
  2064. SODELAY  is a switch variable;    when ON,  SENDOUT  arguments  and
  2065. keystrings  sent  from    terminal mode are tied to the  WCHAR  and
  2066. WLINE  delay  variables  normally  used to  transmit  a  file  in
  2067. terminal mode.    This provides a conventient means of transmitting
  2068. passwords,  etc. to the remote from within a READ file (you don't
  2069. have  to force MEX to wait for an echo that never comes,  yet you
  2070. don't run the risk of overrunning the remote input buffer).
  2071.  
  2072. Note  that,  for SODELAY to have any effect,  the  WTECHO  switch
  2073. variable  must be OFF (WTECHO takes preference if both are active
  2074. at the same time).
  2075.  
  2076. - The SPLIT variable
  2077.  
  2078. SPLIT  is a STAT switch variable that affects the screen  display
  2079. of  the  phone library (done from the PHONE command or    the  CALL
  2080. command).
  2081.  
  2082. This variable is set ON in the distribution version of    MEX,  but
  2083. may  be turned OFF if you're using a terminal with an  extra-wide
  2084. display, to effect a more compact phone library display using two
  2085. entries per screen line.  This compact display does not, however,
  2086. provide  a number's optional baud-rate (as does the display  when
  2087. SPLIT set to ON).
  2088.  
  2089. - The SILENT variable
  2090.  
  2091. SILENT is a STAT switch variable, and, when ON, inhibits the echo
  2092. of command lines in READ files.
  2093.  
  2094.  
  2095. - The SWITCH variable
  2096.  
  2097. SWITCH    is not really a varible;  it requests the STAT command to
  2098. list out all of the switch-type variable.
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.                    32
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113. MEX User's Guide                   STAT variables
  2114.  
  2115.  
  2116. - The TAB variable
  2117.  
  2118. TAB  is a switch variable that can be used to enable  or  disable
  2119. the internal tab expander within MEX; this is sometimes necessary
  2120. when using certain terminals with remote screen editors.
  2121.  
  2122. Note that TAB is set to ON in the distribution version of MEX.
  2123.  
  2124. - The VAL variable
  2125.  
  2126. VAL  in not really a variable;    it requests the STAT  command  to
  2127. list out all of the value-type variables.
  2128.  
  2129. - The WCHAR and WLINE variables
  2130.  
  2131. WCHAR and WLINE  are value variables; they specify delay times in
  2132. simple    file  transmissions done within terminal mode  (with  the
  2133. <ESC>- T  command).  When you transfer a file,    MEX will ask  you
  2134. whether you want to use these delays.
  2135.  
  2136.        WCHAR is the delay to use between characters.
  2137.          (0-9, in 10's of milliseconds)
  2138.        WLINE is the delay to use between lines
  2139.          (0-9, in 100's of milliseconds)
  2140.  
  2141. WCHAR  and  WLINE delays are often needed for  timesharing  main
  2142. frames and BBS's written in BASIC, to allow the slower remote end
  2143. to  catch  the entire file.   These variables are also    using  in
  2144. keystrings and SENDOUT arguments when SODELAY is ON and WTECHO is
  2145. OFF.
  2146.  
  2147. - The WECHO variable
  2148.  
  2149. WECHO  is  a value variable that affects the use of  the  SENDOUT
  2150. command.   WECHO is the time,  in seconds, that SENDOUT will wait
  2151. between  characters  during  a    reply  from  the  remote,  before
  2152. considering  the reply ended.    This should not be confused  with
  2153. the REPLY variable,  which is the maximum amount of time to wait,
  2154. after  sending    a  string,  before considering that no    reply  is
  2155. forthcoming.
  2156.  
  2157. - The WTECHO variable
  2158.  
  2159. WTECHO is a STAT switch variable,  and determines whether or  not
  2160. keystrings  and  SENDOUT command lines transmitted to the  remote
  2161. are validated by comparison with their echoed characters.
  2162.  
  2163. When  WTECHO is ON,  all printing characters transmitted  to  the
  2164. remote    must echo correctly back from the host;  this effectively
  2165. halves the transmission rate,  but provides error detection feed-
  2166. back  for the SENDOUT command,    allowing it to cancel a line  and
  2167. retry.
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.                    33
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179. MEX User's Guide                   STAT variables
  2180.  
  2181.  
  2182. If you're sending command strings out to a line that doesn't echo
  2183. the characters,  you'll want to set WTECHO off.  Additionally, if
  2184. you're using the SENDOUT facility, you'll want to also remove the
  2185. trigger  string  (you  can do this with STAT  TRIGGER  "",  which
  2186. effectively removes the trigger character.
  2187.  
  2188.  
  2189. - The SEP variable
  2190.  
  2191. SEP  is a STAT character variable,  and allows you to change  the
  2192. character  used to separate commands when using multiple commands
  2193. on a line.  The argument is a single character string. Example:
  2194.  
  2195.             STAT SEP "$"
  2196.  
  2197. changes your command separator to the "$" character.
  2198.  
  2199.  
  2200. - The XLINE variable
  2201.  
  2202. XLINE is a STAT switch that affects terminal-mode file transfers.
  2203. If  XLINE is set to ON,  then the file will be    transmitted,  one
  2204. line  at  a time;  each succeeding line will not  be  transmitted
  2205. until an X-ON character is received from the remote.
  2206.  
  2207. XLINE  is used with a very fewe timeshare and network  computers,
  2208. almost never with RCPM and BBS systems.
  2209.  
  2210.  
  2211. - The XON variable
  2212.  
  2213. XON is a STAT switch variable that affects the terminal-mode file
  2214. send  (see TERMINAL MODE for a full description of  terminal-mode
  2215. file send).
  2216.  
  2217. When XON is set to ON, MEX will send all characters to the remote
  2218. at  full speed,  but will monitor for an X-OFF character from the
  2219. remote.   When MEX sees the X-OFF,  it will pause,  allowing  the
  2220. remote    to read all of the input MEX has transmitted.    When  MEX
  2221. sees  an X-ON character from the remote,  it will resume the file
  2222. transmission.
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.                    34
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245. MEX User's Guide                About the Source Code
  2246.  
  2247.  
  2248.  
  2249. 9) About the source code (and other stuff).
  2250.  
  2251. Some users will note that MEX is distributed without source code;
  2252. this  is not an oversight.   MEX has required a very  substantial
  2253. investment in development time,  and I've become very  possessive
  2254. of  the  program (especially in light of what's happened with  so
  2255. many  other programs appearing in source form on  various  RCPM's
  2256. and  through user groups -- they tend to get modified to death by
  2257. people    who  do  not  properly    consider  the  effects    of  their
  2258. changes).   For this reason,  I will not be releasing source code
  2259. for MEX in any form, beyond the source for the overlay files.
  2260.  
  2261. I do intend to maintain the program as responsibly as is possible
  2262. for any non-funded project.   In addition,  a number of  enhance-
  2263. ments  are planned for this fall,  to culminate in a 2.0  release
  2264. that  will  offer significant enhancements (including  a  simpler
  2265. overlay  structure,  a far-more powerful READ command  processor,
  2266. including nested reads and conditional execution,  smart-terminal
  2267. emulation,  and the capability of MEX to act as a remote terminal
  2268. server,  similar  to  the public domain BYE program).    It's  not
  2269. likely    that MEX 2.0 will be distributed without charge  (as  MEX
  2270. 1.0 is);  you can, however, be assured that it will be one of the
  2271. cheapest terminal programs available for CP/M and as well suppor-
  2272. ted as any commercial product available.
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.                    35
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311. MEX User's Guide                      Support
  2312.  
  2313.  
  2314. 10) Support
  2315.  
  2316. MEX  has  been beta-tested among a small group over the last  few
  2317. months;  however,  the nature of software development implies the
  2318. existance  of  a microscopic fissure through which  program  bugs
  2319. will invariably ooze,  escaping detection by all but the  omnipo-
  2320. tent (I am, sadly, not among that group).
  2321.  
  2322. So  if    you detect errors or bugs in MEX,  I would like  to  know
  2323. about it. You can reach me through the following avenues:
  2324.  
  2325.   Arpanet:  Send mail to RFOWLER@SIMTEL20.ARPA
  2326.   RCPM:     Fort  Fone File Folder,  Fort Atkinson, WI (owned and
  2327.         operated  by Al Jewer).   (414) 563-9932,  running    a
  2328.         Compupro  40  MB hard disk and Frank  Wancho's  RBBS4
  2329.         message system.
  2330.   US Mail:  My mailing address is Route 1,  Box 7, Fort Atkinson,
  2331.         Wi.; be aware that I am very slothful about answering
  2332.         non-electronic mail (ie, you may never get an answer).
  2333.   Phone:    None.   Please do  not  call me at home; this  raises
  2334.         hell with my family, and I'm not normally able to re-
  2335.         spond in "real-time" in any case.
  2336. If you report a bug, please be as explicit as possible, detailing
  2337. any unusual overlay configurations, STAT variables, and any other
  2338. conditions you feel are pertinent.  Bug reports like
  2339.  
  2340.         "Terminal mode doesn't work right"
  2341.  
  2342. are totally useless; all I can do is ignore such reports.
  2343.  
  2344. Feature requests for future releases of MEX are welcomed.
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.                    36
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377. MEX User's Guide                      Credits
  2378.  
  2379.  
  2380.  
  2381. 11) Credits
  2382.  
  2383. I'd like to thank the following individuals for their  participa-
  2384. tion  in the development of MEX,  which included many suggestions
  2385. for features, beta site testing and helpful feedback (and, in the
  2386. cases  of Bob Plouff and Frank Wancho,    code examples from  their
  2387. own communicatons programs):
  2388.  
  2389. Bob Plouffe    Dick Mead     Keith Petersen     Al Jewer
  2390. Frank Wancho    Sigi Kluger   David Sternlight     Shawn Everson
  2391. Dave Kozinn    Charlie Strom Eric Stork
  2392.  
  2393. Special thanks must go here also to Ward Christensen,  who  wrote
  2394. the  original MODEM program from which all others have descended,
  2395. Mark Zeiger,  who developed the batch-file transfer protocol  ex-
  2396. tension to Ward's original MODEM2 protocol,  Irv Hoff, whose work
  2397. with  MDM7  provided  a foundation for a  common  overlay  format
  2398. between  MEX and MDM7,    and the dozens of others who have contri-
  2399. buted to the development of the many versions of  MODEM2,  MODEM7
  2400. and  MDM  (from which MEX began with a healthy advance along  the
  2401. learning curve).
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.                    37
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443. MEX User's Guide                     Distribution
  2444.  
  2445.  
  2446.  
  2447. 11) Distribution and a warning to illicit profit-takers
  2448.  
  2449. MEX  and  its documentation are Copyright (C) 1984 by  Ronald  G.
  2450. Fowler.   A license is extended to users to copy and exchange the
  2451. program  and  documentation with the sole restriction  that  such
  2452. distribution  must  be non-commerical in nature (this is  not  to
  2453. imply that charges for such things as diskettes and modest  copy-
  2454. ing  and  mailing fees are of themselves commercial  in  nature).
  2455. Resale    for  profit  may be done only with  the  express  written
  2456. consent of the author, Ronald G. Fowler.
  2457.  
  2458. The  US  Copyright Act of 1978 provides for severe penalties  for
  2459. infringement,  including  actual and punitive damages on  a  per-
  2460. occurance basis.
  2461.  
  2462. Legitimate  commercial interests interested in custom versions of
  2463. MEX, for distribution as a for-profit product, should contact the
  2464. author for rates, royalty information and sample contracts.
  2465.  
  2466.  
  2467.                 Ronald G. Fowler
  2468.                 Fort Atkinson, WI   53538
  2469.                 August 20, 1984
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.                    38
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509. MEX User's Guide                       Appendix 1
  2510.  
  2511.  
  2512.  
  2513.  
  2514.          Appendix 1: Buffer Modification
  2515.  
  2516. This  section explains the buffering scheme used in MEX,  and how
  2517. you can change it using the MEXPAT overlay file.
  2518.  
  2519. MEX  employs  a number of dynamically-allocated buffers for  such
  2520. things    as terminal-file  storage,  printer  buffer,  keystrings,
  2521. modem pre-read queue,  and the phone library.    The size of these
  2522. buffers are defined in a fixed area of MEX;  you can change their
  2523. values    by editing and assembling MEXPATxx.ASM,  then using MLOAD
  2524. to bind in the new values:
  2525.  
  2526.         ASM MEXPAT11
  2527.           MLOAD MEXNEW.COM=MEX.COM,MEXPAT10
  2528.  
  2529. The variable labeled PSIZE in the MEXPAT file defines the  number
  2530. of Kbytes to use for the printer buffer.   This can be set as low
  2531. as  0,    or as arbitrarily large as you'd like.     The variable la-
  2532. beled  ASIZE  performs a similar function for  the  terminal-mode
  2533. file capture buffer,  but must be set to 2 or greater, to reserve
  2534. the minimum 2K space for file transfers.
  2535.  
  2536. One  of  the two (and only one) must have the value  255  (0FFH);
  2537. this defines a particular buffer as the "top" buffer ...  ie, the
  2538. buffer    allocated after all other space has been  allocated,  and
  2539. extends  to  the top of the TPA.   This is  usually  the  largest
  2540. buffer,  and  I recommend that this be the terminal-mode  capture
  2541. buffer, since that is the most frequently used buffer.
  2542.  
  2543. The  PHSIZE label defines the maximum size of the phone  library,
  2544. in entries.   Currently an entry is 43 bytes long,  so the "stan-
  2545. dard" value for PHSIZE of 30 results in a phone library consuming
  2546. almost 1300 bytes.
  2547.  
  2548. Similarly,  the  KYSIZE variable defines the amount of space  (in
  2549. bytes)    reserved for terminal-modem keystrings.   The  "standard"
  2550. value is 400 bytes.
  2551.  
  2552. If  you don't use phone libraries or keystrings,  either variable
  2553. may  be set to zero,  and the resulting space reclaimed  for  the
  2554. "top" buffer.
  2555.  
  2556. Another buffer variable is the NSIZE label: this defines the size
  2557. of  the  file-transfer batch filenames buffer (in  Kbytes).   For
  2558. each 1K allocated to this buffer,  you can transmit 85 files at a
  2559. time.    Hence, if 85 files are not enough, you can set NSIZE to 2
  2560. and  transmit 170 files at a time.   If you don't use batch  file
  2561. transfers,  you can set this variable to 0, and reclaim the space
  2562. for the "top" buffer.
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.                    39
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575. MEX User's Guide                       Appendix 1
  2576.  
  2577.  
  2578. The XSIZE label defines the number of Kbytes for the file  trans-
  2579. fer disk buffer;   note that this is not an allocated buffer, but
  2580. resides  within the terminal-mode file buffer.     XSIZE is used to
  2581. restrict the actual size of the buffer,  and should be less  than
  2582. or equal to ASIZE.  This restriction is necessary in systems with
  2583. extremely slow floppy disks, since there is the possiblity of the
  2584. remote end timing out while MEX flushes its disk buffer.
  2585.  
  2586. PQSIZE defines the size of the queue used to service the modem at
  2587. certain  times (such as after sending an X-OFF to the remote when
  2588. the terminal-file buffer fills up,  during the overflow wait time
  2589. SENDOUT strings,  and within certain long loops,  when there is a
  2590. possibility of losing characters).  This buffer must be a minimum
  2591. of 2 bytes, and may be as arbitrarily large as you'd like.  There
  2592. is  little to gain in increasing the size,  however,  unless  you
  2593. consistently run at speeds greater than 1200 baud.
  2594.  
  2595. You may at some time see the message "Not enough memory for MEX!"
  2596. minimum buffer requirements.   Normally, this will only happen in
  2597. small  memory segments (when you're running a small CP/M  system,
  2598. for example, or running in a small MP/M segment), but you'll also
  2599. see it if you've increased MEX's buffers too much.
  2600.  
  2601. The  only recovery possible is to reduce some of the buffers  (or
  2602. obtain more memory).
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.                    40
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641. MEX User's Guide                       Appendix 2
  2642.  
  2643.  
  2644.  
  2645.  
  2646.    Appendix 2: Alternate Long Distance Service numbers (ALDS):
  2647.  
  2648. This  appendix details the use of Alternate Long Distance Service
  2649. (ALDS) numbers with MEX.
  2650.  
  2651. You may have two ALDS numbers defined;    simply enter them as  you
  2652. would  any  other  number,  but give them a name of  '>'  or  '<'
  2653. (normal delay characters, passwords, etc may be included).  Then,
  2654. if  you have a number you'd like to route through your ALDS  ser-
  2655. vice,  simply prefix it with the associated '>' or '<'.  An exam-
  2656. ple should clarify this:
  2657.  
  2658. You  have MCI service,    your password is 98765,  and it takes 2-4
  2659. seconds  to connect after the number is dialed.   You  also  have
  2660. Sprint    (you cover all your bases,  don't you?),  the password is
  2661. 12345, and it sometimes takes 6 seconds to reach the number after
  2662. it is dialed.    Finally,  you have a Hayes Smartmodem; a comma in
  2663. the  dialing string is a 2-second pause (is it    really?  I  don't
  2664. have a Hayes, so let's pretend).
  2665.  
  2666. In order to use both services, we'll put one number on the > key:
  2667.  
  2668.     [MEX] A0>>PHONE >=555-9122,,98765      <<--- MCI
  2669.  
  2670. note  the  four  second  delay with  the  two  commas,    then  the
  2671. password.
  2672.  
  2673. Now Sprint:
  2674.  
  2675.     [MEX] A0>>PHONE <=555-8144,,,12345
  2676.  
  2677. <longer delay, different password>.
  2678.  
  2679. Now RBBS Rockhead is a long,  long distance call;  it's available
  2680. only through Sprint (and,  of course, Ma Bell). We decide that if
  2681. we  can't  make  it through Sprint,  we don't want to  call  RBBS
  2682. Rockhead.  Here's how we enter the number:
  2683.  
  2684.     [MEX] A0>>PHONE ROCKHEAD=<202-555-1414
  2685.  
  2686. Now RBBS Aristocrat is our favorite BBS;  if Sprint is jammed up,
  2687. we'd like the option of dialing it over (ugh) Ma Bell lines.   So
  2688. we define it without an ALDS marker, like this:
  2689.  
  2690.     [MEX] A0>>PHONE ARISTOCRAT=202-555-2222
  2691.  
  2692. Now  notice that we can still call Aristocrat through  Sprint  or
  2693. MCI with:
  2694.  
  2695.     [MEX] A0>>CALL <ARISTOCRAT        <<--- Sprint
  2696.     [MEX] A0>>CALL >ARISTOCRAT        <<--- MCI
  2697.  
  2698. But we must explicitly enter the ALDS symbol in the CALL command.
  2699.  
  2700.  
  2701.                    41
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707. MEX User's Guide                       Appendix 2
  2708.  
  2709.  
  2710.  
  2711. Since  Rockhead is defined with a leading '<',    it will always go
  2712. through MCI;  we don't have to supply an ALDS symbol in the  CALL
  2713. command  (we  can switch to the other ALDS  number,  however,  by
  2714. specifying  the other ALDS symbol in the CALL  command;  eg,"CALL
  2715. >ROCKHEAD"   will switch to MCI even though we've defined  Sprint
  2716. as Rockhead's ALDS number).
  2717.  
  2718. In short,  the left or right arrow specification is treated as if
  2719. its ALDS number were part of the number being dialed.
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.                    42
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773. MEX User's Guide                       Appendix 3
  2774.  
  2775.  
  2776.  
  2777.     Appendix 3: Hints on using SENDOUT and keystrings
  2778.  
  2779. There  have  been some queries    regarding  keystrings,    and  some
  2780. problems  reported  in using them on RCPM systems.   I'd like  to
  2781. clarify their use a little.
  2782.  
  2783. First,    there  is  a variable that may be changed with    the  STAT
  2784. command that directly affects keystrings: this varible is WTECHO.
  2785. When this switch-variable is turned ON,  MEX will send each char-
  2786. acter,    then wait for it to echo from the remote end.    If you're
  2787. sending  into  a system that allows type-ahead    (most  time-share
  2788. computers,  Compuserve,  Arpanet, some MP/M and TurboDOS systems,
  2789. etc), it is best to turn this variable OFF; the keystring will be
  2790. transmitted a lot faster.  If you're dealing with an RCPM system,
  2791. however,  you might well overrun the receiving end with the  key-
  2792. string    (especially if you're transmitting into a BASIC  program,
  2793. such as RBBS).    For such systems,  you should turn WTECHO ON; MEX
  2794. will then wait for each character to be echoed from the remote.
  2795.  
  2796. The rest of this discussion addresses the same topic with respect
  2797. to the SENDOUT command.
  2798.  
  2799. WTECHO also affects the SENDOUT command in the same way; there is
  2800. a  difference between SENDOUT and keystrings,  however,  that you
  2801. must  be  aware of:   SENDOUT tries its best to send  the  string
  2802. correctly when WTECHO is on;  if an echoed character is different
  2803. than the transmitted character,  SENDOUT will send a cancel char-
  2804. acter and try again (up to a retry-limit).
  2805.  
  2806. The  retry-limit and  the trigger and cancel characters  are  all
  2807. STAT  variables,  allowing them to be changed with the STAT  com-
  2808. mand.  The trigger-character in the distributed MEX is the right-
  2809. arrow  ('>');  this is most handy for RCPM systems (which  prompt
  2810. each  command  with a right-arrow).   If you want to use  SENDOUT
  2811. with non-CP/M systems (or with RCPM programs that use a different
  2812. prompt),  you'll need to change the trigger character.    For exam-
  2813. ple,  if you're sending commands to a remote PIP,  you'd want  to
  2814. use  PIP's  asterisk  ('*') as the trigger,  so  you'd    do:
  2815.  
  2816.             STAT TRIGGER "*"
  2817.  
  2818.   For  sending    commands to a Smartmodem (with the modem  set  to
  2819. non-echo,  which is the default for US Robotics),  you'll want to
  2820. set WTECHO to OFF and TRIGGER to 0.
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.                    43
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839. MEX User's Guide                       Appendix 4
  2840.  
  2841.  
  2842.  
  2843.  
  2844.         Appendix 4: High-speed transfers:
  2845.  
  2846. I've  been using MEX locally for transfers between two    computers
  2847. connected  through an RS-232 link.   File transfers at speeds  of
  2848. 9600 and 19200 are possible, with the following guidelines noted:
  2849.  
  2850. 1)  If one computer has a faster CPU clock speed than the  other,
  2851. it  can  receive at 9600 or 19200 without problems  (assuming  no
  2852. extraordinary delay in the overlay modem I/O routines).
  2853. 2)  The  receiver  should use the 'Q' mode  ('quiet':  no  status
  2854. messages, but more relevantly, no console-status checking) if the
  2855. transmitter is at an equal or greater clock speed.
  2856.  
  2857. 3)  It's  not generally a good idea to view  either  received  or
  2858. transmitted characters at the receiving end,  regardless of clock
  2859. speed  (i.e.,  avoid use of the V,  S and R secondary commands at
  2860. the receiving end).
  2861.  
  2862. 4)  Batch  file transfers will work much better  with  the  above
  2863. speed patch.
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.                    44
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905. MEX User's Guide                       Appendix 5
  2906.  
  2907.  
  2908.         Appendix 5: What's new in MEX114:
  2909.  
  2910. Release  1.14 of the MEX Modem EXecutive  communications  program
  2911. adds support for 1k XMODEM file transfer packets.
  2912.  
  2913. Why 1k packets?
  2914.  
  2915. With the current proliferation of 2400 baud modems, it has become
  2916. obvious  that  throughput (i.e.,  efficiency) of  file    transfers
  2917. could  be higher if more data could be added to  the  fundamental
  2918. unit  of exchange (i.e.,  the "packet").   The reason for this is
  2919. essentially the "stop and wait" nature of the Christensen  proto-
  2920. col:  send a packet,  wait for an acknowledgement, send a packet,
  2921. wait,  etc.   When the packet size is relatively small, as it has
  2922. always    been with Christensen protocol,  this "turn-around"  time
  2923. becomes  a  significant  portion of the total time  necessary  to
  2924. transfer  a file.   If the medium through which the  transfer  is
  2925. taking    place exhibits its own delay,  the problem is  compounded
  2926. (all  transfer media -- even hardwired RS232 connections  -- have
  2927. some media delay; this delay is much more pronounced in satellite
  2928. telephone  connections    and  packet-switched  networks,  such  as
  2929. Arpanet and Compuserve).
  2930.  
  2931. Conversely,  using  a large packet size with an inherently  noisy
  2932. medium    can  not only destroy any gains realized by using  a  the
  2933. larger    packet,  but  can actually increase file  transfer  time,
  2934. because  retransmission  of  a    large packet  takes  longer  than
  2935. retransmission of a small packet.
  2936.  
  2937. So it seems logical that any large-packet protocol must also have
  2938. the  ability to "fall back",  in the face of line noise,  to  the
  2939. small  packets    that  are so much more    efficient  in  the  noisy
  2940. environment.
  2941.  
  2942. MEX  1.14  implements this fallback feature;  it uses nearly  the
  2943. same algorthm employed by Paul Homchick in his 1k-packet  modifi-
  2944. cations  to the public domain XMODEM program (version 10.8 at the
  2945. time of this writing).    Further, the 1K packet option is entirely
  2946. user-selectable;  if you don't want to use large packets,  simply
  2947. continue using MEX as you've always used it;  there's no  penalty
  2948. for not using large packets.
  2949.  
  2950. If  you  prefer the higher efficiency (and noisy lines are not    a
  2951. problem for you), simply append a "K" to the the "T" command when
  2952. you're SENDING a file with MEX 1.14.   In fact, you can make this
  2953. change permanent by entering the command "GLOBAL K",  then  using
  2954. the  CLONE  command  to save your modified MEX 1.14 to    disk  (be
  2955. advised,  however,  that if you do this,  you run the risk of not
  2956. being able to exchange files with versions of XMODEM or MEX  that
  2957. do  not have the 1k packet capability,    without expressly turning
  2958. off the GLOBAL K).
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.                    45
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971. MEX User's Guide                       Appendix 5
  2972.  
  2973.  
  2974. MEX  1.14,  when  receiving,  is always prepared  to  receive  1k
  2975. packets, in any mixture with 128-byte packets.    Thus, when you're
  2976. preparing  MEX 1.14 to receive a file,    you need take no  special
  2977. action (in fact,  the 'K' option, while accepted, is ignored in a
  2978. file receive).
  2979.  
  2980. MEX,  when  transmitting,  will adjust for line noise;    after the
  2981. third (not necessarily consecutive) error has occurred,  MEX will
  2982. calculate the ratio of errors to "virtual" 128-byte packets.   If
  2983. this  ratio  exceeds  1 error per  each  six  128-byte    "virtual"
  2984. packets,  MEX  will switch to 128-byte mode.   Note that MEX will
  2985. NOT  switch  to 128-byte mode until the next  successive  packet,
  2986. however.  Thus, once a packet has started as a 1k packet, it must
  2987. finish as a 1k packet (otherwise,  certain combinations of  noise
  2988. could  cause  the  transfer to appear correct,    but  be  received
  2989. incorrectly).    If you're using the batch option, MEX will always
  2990. switch back to 1k packets at the beginning of the next file.
  2991.  
  2992. Note  that MEX 1.14 is fully compatible with the emerging  YMODEM
  2993. specification  authored  by Chuck Forsberg  of    Omen  Technology,
  2994. insofar  as  1K blocks are conerned (MEX does not "round  up"  an
  2995. outgoing file to 1K, however -- it switches to 128-byte mode when
  2996. the remaining outstanding byte count is less than 1024.   This is
  2997. permitted by the YMODEM specification).
  2998.  
  2999. Progress reporting
  3000.  
  3001. You'll notice that while transferring files in 1k mode,  MEX will
  3002. print  "logical"  record  numbers  on the  screen  (actually  the
  3003. starting and ending record numbers of the 1k packet being sent or
  3004. received).   Note  that this is the 128-byte record  number,  and
  3005. bears  to  relation to the packet number,  which is part  of  the
  3006. packet "envelope",  t increments by 1 for each 1k packet,  and is
  3007. of no consequence to the user.
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.                    46
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.