home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / modem / txzm225.zip / TXZM.DOC next >
Text File  |  1993-09-15  |  26KB  |  503 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                             TXZM -- ZMODEM PROTOCOL DRIVER
  7.  
  8.                (c) 1991,92 Mike Dumdei, 6 Holly Lane, Texarkana Texas
  9.                         North East Texas DataLink  1:3819/128
  10.                         BBS (903)838-6713, Voice (903)838-8307
  11.  
  12.               TXZM (Texas Zmodem :) is a zmodem protocol that was developed
  13.           to demonstrate the speed and capabilities of the MCOMM C serial
  14.           communications library.  The latest version of TXZM or MCOMM may
  15.           be obtained from N.E.T. DataLink by either logging in and
  16.           downloading or by file request of "MCOMM" or "TXZM".  The
  17.           shareware version of MCOMM contains the TXZM shell in source form
  18.           and the low level Zmodem driver in library form.  The complete
  19.           source code comes with the "Libs & Source" registered version of
  20.           MCOMM.  Libraries for all memory models except for the BCC/TC
  21.           huge model come with the "Libs Only" registered version of MCOMM.
  22.           See the MCOMM order form for specifics on various options.
  23.  
  24.                                   TXZM RESTRICTIONS
  25.  
  26.               TXZM IS NOT PUBLIC DOMAIN however the executable version may
  27.           be distributed and used free of charge for non-commercial
  28.           purposes.  If you intend to use TXZM commercially or in a
  29.           commercial environment and the program will be loaded or operated
  30.           on more than 3 systems ANYWHERE within the organization, you must
  31.           obtain a license.
  32.  
  33.               The complete TXZM source code is provided as part of the
  34.           "Libs & Source" registered version of the MCOMM software package.
  35.           Linkable libraries are provided with the "Libs Only" registered
  36.           version of MCOMM.  None of the source code or libraries that are
  37.           part of the registered version of MCOMM may be distributed,
  38.           neither may they be incorporated in whole or in part into a
  39.           competing software product without a written license agreement.
  40.           Competing software products are products that are not end user
  41.           programs themselves, such as "Your Serial Library", and products
  42.           that directly compete with TXZM (fully developed terminal
  43.           programs, BBS systems, and similar products are FUNCTIONALLY
  44.           DIFFERENT than TXZM and NOT considered competing products).
  45.  
  46.               The license agreement requirement for commercial use of the
  47.           EXECUTABLE VERSION ONLY (TXZM.EXE) does not apply to
  48.           governmental, educational, church, civic, or non-profit
  49.           organizations.  This does not waive restrictions that apply to
  50.           the source code for those organizations.
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.                          MCOMM ASYNC LIBRARY (Advertisement)
  58.  
  59.               MCOMM  is a  serial communications  library for  Microsoft C,
  60.           Turbo C/C++, Borland C/C++, and Zortech C/C++.  It also will work
  61.           with any other C  compiler or language that supports  Microsoft C
  62.           calling conventions.  Some of the features of MCOMM are:
  63.  
  64.                -  Fully interrupt driven
  65.                -  16550 FIFO mode support
  66.                -  Baud rates up to 115200 baud
  67.                -  Supports definitions  for any comm port  that operates on
  68.                   IRQs 2 through 7 at any address
  69.                -  Supports simultaneous operation of 2 ports
  70.                -  Written in  assembler for maximum speed  and minimum code
  71.                   size
  72.                -  Advanced  features such  as  block transmit  and receive,
  73.                   XON/XOFF and  hardware flow control, receive  buffer look
  74.                   ahead, definable ring buffer sizes and location, ...
  75.  
  76.               Also  included  with MCOMM  is a  set  of ANSI  capable video
  77.           functions  that  support  windowed  output,  save/restore  screen
  78.           functions, timer  functions, and  miscellaneous other code.   The
  79.           current shareware version of MCOMM is MCOMM557.ZIP.   It includes
  80.           a  complete small model LIB, TXZM (partial source, rest as libs),
  81.           and  both a  C and  C++ demo  terminal program.    The registered
  82.           version  is available as either  "Libs only" or  "Libs & Source".
  83.           The "Libs Only"  version is  $25 and includes  libraries for  all
  84.           memory models.  The "Libs & Source" version is $45 and comes with
  85.           both libraries and all source code.  See the MCOMM order form.
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.                                     TXZM OPERATION
  93.  
  94.               TXZM has 3 modes  of operation.  These are command line send,
  95.           command  line receive, and terminal  mode.  Running  TXZM with no
  96.           command line parameters will list available TXZM options.
  97.  
  98.           Specifying the serial port:
  99.  
  100.               TXZM directly  supports COM1  through COM4, however  COM3 and
  101.           COM4   on  older  hardware  may  not  match  what  is  considered
  102.           standard.  The -c switch (described  below) may be  used for non-
  103.           standard  configurations of  COM3 and  COM4 or  to force  TXZM to
  104.           recognize  a custom port.   For standard versions  of COM1-4, use
  105.           "txzm com#" where '#' is 1-4.
  106.  
  107.           TXZM switches:
  108.  
  109.               -u  Start  in terminal mode.   Terminal  mode may  be started
  110.                   either before  or after  a CONNECT  is made.    It has  a
  111.                   limited set of functions (dial, upload, download).
  112.  
  113.               -r  Start in receive mode.  This switch must come last on the
  114.                   command line  if it is  used.  It  may be followed  by an
  115.                   optional subdirectory if the files are to downloaded to a
  116.                   specific  location.    The  -r  switch  may  be  used  in
  117.                   conjunction  with the  -u  switch to  specify a  download
  118.                   directory.   When used with the -u switch, TXZM starts in
  119.                   mini-terminal mode.
  120.  
  121.               -s  Start up in send mode.   This must be the last  switch on
  122.                   the command line and be followed by the filename(s) to be
  123.                   sent. The filename list may contain wild cards.  The send
  124.                   function  will  recurs  subdirectories  if  the  filename
  125.                   specifications   are  placed  in  parenthesis.    Placing
  126.                   filenames  in parenthesis  to recurs  subdirectories also
  127.                   works in mini-terminal mode.
  128.  
  129.               -p  Send or accept complete pathnames.  This option, used in
  130.                   conjunction with the -r option, will cause TXZM to accept
  131.                   complete pathname information  in the received  filename.
  132.                   Without  it, only  the  root name  and  extension of  the
  133.                   filename  are used.  If the received filename specifies a
  134.                   directory that does not exist, it will  be created.  If a
  135.                   download  directory   was  specified  (-r   dlpath),  the
  136.                   subdirectories will be created under "dlpath".
  137.  
  138.                   When  used with the -s  switch, the -p  switch will cause
  139.                   filenames to be sent with complete path information.  Per
  140.                   zmodem specifications,  only the  path is sent  (no drive
  141.                   identifiers).  Without the -p switch only the file's root
  142.                   name  and  extension are  sent.    This  applies even  if
  143.                   recursing subdirectories.
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.               -b####  Specify the CONNECT baud rate.  The CONNECT baud rate
  151.                   is used to determine estimated file transfer times.  TXZM
  152.                   currently  will  not  adjust   to  a  CONNECT  rate  when
  153.                   initially making  the connection.   Unless a  locked baud
  154.                   rate is used (-l), you must dial using  the baud rate you
  155.                   will  CONNECT   at.     If  the  connection   is  already
  156.                   established, and  neither -l  or -b  is given, TXZM  will
  157.                   open  the  port  using  the baud  rate  it  is  currently
  158.                   operating at.
  159.  
  160.               -l####  Set a  locked baud rate.   Use this  option to set  a
  161.                   fixed computer to modem  baud rate. The -b option  may be
  162.                   used with the -l  option to specify both the  computer to
  163.                   modem rate and the modem to line rate.
  164.  
  165.               -chhh,#   Specify  a non-standard  port configuration.   TXZM
  166.                   will  work with any port addresfrom 000h to 3f8h and IRQs
  167.                   2-7.   Replace  'hhh' with  the port  address in  hex and
  168.                   '#'ith the IRQ to be used.  For example, to use a port at
  169.                   I/O  address 2E8h that uses IRQ 5, use "txzm -c2E8,5".
  170.  
  171.               -h  Use hardware  flow control  (RTS/CTS).  This  is required
  172.                   for modems that use a locked baud rate.
  173.  
  174.               -i  Ignore absence of carrier detect signal.  Use this switch
  175.                   when  using  TXZM  to  transfer   files  between  systems
  176.                   connected   with a null modem cable.  (TXZM only requires
  177.                   the Rx, Tx, and Gnd wires to be connected).
  178.  
  179.               -v  Disable serial I/O  during disk writes.   Use this option
  180.                   if  errors  occur when  the received data  is written  to
  181.                   disk.   This should only  be necessary when  operating at
  182.                   high  baud rates with no 16550  UART or the file is being
  183.                   downloaded to a floppy.   The -v option also  expands the
  184.                   disk  buffer to 20K bytes  to maintain a  higher level of
  185.                   efficiency.
  186.  
  187.  
  188.               -e# Set  duplicate  file   handling  option.     This  option
  189.                   determines what happens if an attempt is made to download
  190.                   a file  that already exists.   The following  choices are
  191.                   available:
  192.                     -e0  Skip the file -- do not download.
  193.                     -e1  Resume the transfer at the end of current file.
  194.                          This is the default.
  195.                     -e2  Create a duplicate file name and download the file
  196.                          as a separate file.
  197.                     -e3  Overwrite the existing file.
  198.  
  199.               -w####  Sets the maximum bytes  that may be in transit at any
  200.                   one time (transmit window size).  This must be a multiple
  201.                   of 128.
  202.  
  203.  
  204.  
  205.  
  206.  
  207.               -x  Escape all  control characters.   This option  causes the
  208.                   characters between 00h and  20h, 80h and A0h, 7Fh,  & FFh
  209.                   to  be  ZDLE escaped.  Zmodem  automatically escapes XON,
  210.                   XOFF, ZDLE (CAN), DLE, and "<CR>@<CR>" sequences.  The -x
  211.                   option   is for networks  that do not  pass other control
  212.                   characters.
  213.  
  214.               -x# As an  option, a specific  list of control  characters to
  215.                   escape may be given.  For example to only ZDLE escape the
  216.                   ESC character (27 decimal or 1B hex) and ESC+parity  (145
  217.                   decimal or 9B hex)  and let all other control  characters
  218.                   pass unaltered, use:  -x27,145.
  219.  
  220.               -6  Force use of 16 bit CRC.  The default is 32 bit CRC. This
  221.                   option does  not show up on  the help screen (ran  out of
  222.                   room).
  223.  
  224.               -7  Strip high bit from received characters in terminal mode.
  225.  
  226.               -0  Use  BIOS screen writes.  This only works in command line
  227.                   mode.  Mini-terminal still does direct writes.
  228.  
  229.               -q  Run in  DesqView mode.   This option makes  TXZM DesqView
  230.                   aware meaning it writes to DesqView's video buffer rather
  231.                   straight  into video  memory.   It  also  causes TXZM  to
  232.                   release its time slice when it is idle.
  233.  
  234.               -y  Added in version  2.25.   Allows overriding  the received
  235.                   filename on Zmodem receives.  Ex:
  236.                     txzm -y THISNAME.ZIP -r
  237.                   The above line would cause the received file to be called
  238.                   "THISNAME.ZIP"  rather than  the name sent by the sender.
  239.                   This option does not show  on the help screen.
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.           16550 related switches:
  247.  
  248.               -d  Do   not  enable   16550  FIFO   mode.     Normally  TXZM
  249.                   automatically enables  FIFO mode.   If  you  are using  a
  250.                   Western Digital  16550 UART at  lower baud rates  you may
  251.                   need  to use this option.  The WDC16550 UART doesn't work
  252.                   in FIFO mode  at low baud rates.  If you have a 16550 and
  253.                   don't know if  it is  a Western Digital  but get  Garbled
  254.                   Packet errors  when attempting  to start a  transfer, try
  255.                   this option.  The National Semiconductor 16550 (NS16550A)
  256.                   works at all baud rates in FIFO mode.
  257.  
  258.               -t# Maximum characters to send  to 16550 FIFOs per interrupt.
  259.                   This may be between 1 and 16.  The default is 8.  A lower
  260.                   value  may be required for modems that used a locked baud
  261.                   rate, hardware  flow control,  and have a  small internal
  262.                   buffer.  8 works fine with USRs.
  263.  
  264.               -m  Disable modem status register interrupts.  This option is
  265.                   another patch to accommodate Western Digital's version of
  266.                   the  16550.  Some WDC16550s  lock up if  the modem status
  267.                   lines (CTS,  CD, etc.)  are not  connected  to a  driving
  268.                   signal.   This could happen  if the serial  or null modem
  269.                   cable being used does not have all signal lines connected
  270.                   (very possible  with  a  null  modem cable).    Using  -m
  271.                   prevents this  problem.   It also disables  hardware flow
  272.                   control and  carrier detect,  however, so if  you require
  273.                   either of these and have a  WDC16550 you must use a cable
  274.                   with all appropriate lines connected.
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.         Examples:
  282.  
  283.             txzm -p -s (c:\)   // send all files on drive C -- include
  284.                                // complete path information
  285.  
  286.             txzm -p -r         // accept complete pathnames -- if path
  287.                                // does not exist, create it
  288.  
  289.             txzm -p -r d:\temp // accept complete pathnames but put files
  290.                                // and created directories under D:\TEMP
  291.  
  292.             txzm -r            // receive to current directory, if path
  293.                                // information is received it is ignored
  294.  
  295.             txzm -s (\project\*.c) (\project\*.h)  // Sends all .c and .h
  296.                                // files in the subdir PROJECT and all subs
  297.                                // under project.  Does not send pathnames.
  298.  
  299.             txzm -u -r \dnlds  // start in mini-terminal mode, received
  300.                                // files are placed in "\dnlds" directory
  301.  
  302.             txzm com2 -u       // mini-terminal mode, use COM2
  303.  
  304.             txzm -l38400 -b9600 -h -s file1.zip file2.zip
  305.                                // 38400 baud locked rate, 9600 CONNECT,
  306.                                // hardware handshake, send file list
  307.  
  308.             txzm -b2400 -u     // 2400 baud, mini-terminal mode
  309.  
  310.             txzm -c2e0,7 -r    // custom serial port at 2E0h on IRQ7,
  311.                                // use current baud rate, receive
  312.  
  313.             txzm com2 -b115200 i u  // 115200 baud, ignore carrier detect,
  314.                                // mini-terminal mode
  315.  
  316.             txzm -e2 -r        // COM1, current baud rate, receive, create
  317.                                // duplicate name if file exists
  318.  
  319.             txzm -s @filelist  // send all files listed in "filelist"
  320.                                // the name "filelist" is an example only
  321.  
  322.  
  323.             Other than  the -r and -s  switches that must appear  last on the
  324.         command  line if used, neither case nor switch order are significant.
  325.         Also you may  use a '/' instead  of a '-' or no  switch identifier at
  326.         all.  Ex: "txzm i E2 -u /b2400 r" is legal syntax.
  327.  
  328.  
  329.  
  330.  
  331.  
  332.                                     GENERAL NOTES
  333.  
  334.             TXZM  is faster than any other zmodem  protocol driver I am aware
  335.         of.  It will run at 95% efficiency in both send  and receive modes at
  336.         115200 baud on an 8 MHz 286 with a 16550 UART.  This translates to an
  337.         effective throughput  of 110 Kbps.  In a PC Magazine (Apr 91) article
  338.         reviewing  various communications software  packages, the BEST zmodem
  339.         operated at less than 50 Kbps when tested at 115200 baud on the  same
  340.         type of equipment (8 Mhz 286's with 16550 UARTs).  TXZM is over twice
  341.         as  fast.    The review  covered  several  well  known shareware  and
  342.         commercial packages.
  343.  
  344.             TXZM was also tested on a 4.77 MHz 8088 laptop that contained the
  345.         functional equivalent of  a 16450 UART (no FIFOs) and  a 4.77 MHz IBM
  346.         XT  (true blue IBM)  that had 16550  UARTs installed.   On the laptop
  347.         system TXZM could  send most  efficiently at 23040  baud and  receive
  348.         most  efficiently at  28800 baud.   The XT,  with 16550  UARTs, could
  349.         receive  at a  full 38400 baud  but with  the baud rate  set to 38400
  350.         could only achieve an effective throughput rate of around 35000 baud.
  351.         The  tests were  performed using  the systems' hard  drives (original
  352.         slow hard  drives), not a  RAM disk,  which also had  some impact  on
  353.         speed.   With 16550 UART's,  TXZM could very effectively  work a high
  354.         speed modem (HST, V.32, or V.32bis) even on a slow 4.77 MHz computer.
  355.  
  356.             If you compare the  CPS rating stated by TXZM and other programs,
  357.         you may  find TXZM reporting slightly lower rates.   This is due to a
  358.         difference  in the  calculation method  TXZM uses  only.   Many other
  359.         progams  appear to fudge a little bit  on their statistics.  At lower
  360.         speeds or  on fast CPUs all  Zmodem drivers will run  about the same.
  361.         The speed difference shows up when the system is under a load such as
  362.         with extremely high baud rates or  moderately high baud rates on slow
  363.         CPUs.
  364.  
  365.  
  366.                                      BBS SUPPORT
  367.  
  368.             TXZM  now recognizes  the TXZMLOG  environment variable  and will
  369.         create a log file  with the same format as the one  created by DSZ if
  370.         DSZLOG is set.  This was added primarily to support BBS software that
  371.         uses DSZLOG format log files to track downloads, efficiency, etc.  If
  372.         all you  want is a  log file you  can set TXZMLOG  only.  If  you are
  373.         using BBS software that looks for a DSZLOG variable, you will have to
  374.         also set DSZLOG to the same value as TXZMLOG.  Ex:
  375.  
  376.               set TXZMLOG=C:\BBS\ZMODEM.LOG
  377.               set DSZLOG=C:\BBS\ZMODEM.LOG
  378.  
  379.             I did not use DSZLOG to avoid infringing on any non-public domain
  380.         features of DSZ.  If you want to patch  your personal copy of TXZM to
  381.         use DSZLOG  directly rather than TXZMLOG, you  can use a utility such
  382.         as Norton  Utilities or  PC Tools  to  scan TXZM.EXE  for the  string
  383.         "TXZMLOG" and  change it  to "DSZLOG".  This is  only  patch you  are
  384.         authorized to  make. DO  NOT under  ANY circumstances  distribute ANY
  385.         modified version.
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.             It is also now possible to specify a file that contains a list of
  393.         the files to  be sent.  This is  also primarily for BBS support.   To
  394.         use this option precede the file containing the list of files with an
  395.         '@'  sign.   The  files  may be  separated  by  any valid  whitespace
  396.         characters including spaces, tabs, carriage returns, line feeds, etc.
  397.  
  398.             The -q option has been added as of version 2.10 for BBS operators
  399.         who run under DesqView.  It causes TXZM to not mess up the  video and
  400.         also to release CPU time when it is waiting for characters or for the
  401.         transmit buffer to empty.
  402.  
  403.             The -0 option will disable direct screen writes if you are  using
  404.         command line send or command line receive options.  All screen writes
  405.         will  be done  through BIOS  calls.   Mini-terminal mode  does direct
  406.         writes even with the -0 option specified.  -0  does not appear on the
  407.         help screen.
  408.  
  409.             BBS sysops  may also use TXZM free (even if you charge for access
  410.         to your system).
  411.  
  412.                                    REVISION HISTORY
  413.  
  414.           2.25  Fixed the "-c" (custom comport switch).  Added -y (override
  415.                 received filename) switch.
  416.  
  417.           2.24  Fixed a problem with the "recurse subdirectories" option and
  418.                 also corrected a problem that caused TXZM to not work right
  419.                 when running it in a DOS box under OS/2.
  420.  
  421.           2.22  Recompiled using a different version of the MCOMM communica-
  422.                 tions driver.
  423.  
  424.           2.21  Fixed a divide by zero error that occasionally occurred on
  425.                 restarted file transfers.
  426.  
  427.           2.20  Added support for Doorway mode (ALT = toggles it on and off).
  428.                 Added support for BBSs that autodetect ANSI capable programs.
  429.                 Added -7 switch to enable stripping high bit when in terminal
  430.                 mode.
  431.  
  432.           2.14  Minor  changes so  code will  compile without  warnings using
  433.                 BC++ 3.0  and  so that  TXZM  would automatically  trigger  a
  434.                 Qmodem download  (Qmodem requires  an "rz\r"  as well as  the
  435.                 INIT  packet -- most programs trip on the INIT packet alone).
  436.                 Also modified the -n (BBS support option) so that it took the
  437.                 name of a Maximus or Opus style LASTUSER.BBS filename  rather
  438.                 than a  node number.   Modified FIFO usage  so that TXZM  set
  439.                 FIFO buffers to 1 in terminal  mode and 8 when sending  files
  440.                 (corrects jerky display at low baud rates).
  441.  
  442.  
  443.  
  444.  
  445.  
  446.           2.10  Changed  name  to TXZM  from  ZMP.    The ZMPLOG  envrionment
  447.                 variable is now  TXZMLOG. Found out somebody else already had
  448.                 a ZMP in CP/M days.  Added DesqView aware option.  Fixed Dial
  449.                 Command  so that  it  looked at  the  connect baud  rate  and
  450.                 adjusted accordingly.   Fixed Redial  Command to  continually
  451.                 dial until a  connect was made or ESC pressed.   Added F1 for
  452.                 help  key.   Added  ALT-P so  the  modem parameters  could be
  453.                 changed manually, ALT-C so  the screen could be  cleared, and
  454.                 ALT-= for Doorway mode operation.
  455.  
  456.           2.00  First non-beta version.  Added a capture file.  Fixed a minor
  457.                 problem with the -0 option.
  458.  
  459.           1.21  Added support for  specifying files  to send in  a file  that
  460.                 contains a list of  the filenames.  Added -0  option (disable
  461.                 direct screen writes in command mode).
  462.  
  463.           1.20  Fixed  bug introduced in version 1.19 that caused a divide by
  464.                 zero error  if the total bytes  to be sent was  between 1 and
  465.                 18.  Added ZMPLOG environment variable.
  466.  
  467.           1.19  Corrected bugs in the -w and -x  options.  Fixed problem with
  468.                 negative  CPS rates  showing up  when more than  11 megabytes
  469.                 were sent.  Added the -6 switch.
  470.  
  471.           1.17  Fixed double backslash in pathnames when downloading while in
  472.                 the root directory (couldn't DL to root).
  473.  
  474.           1.16  Added support for send and  receive of complete pathnames and
  475.                 creation of  subdirectories.    This  allows  duplication  of
  476.                 entire drives or subdirectories through the serial port.
  477.  
  478.           1.10  16 bit CRC mode  now really does work.  TXZM102  was supposed
  479.                 to have fixed it but didn't.
  480.  
  481.           1.02  Fixed bug  in 16 bit CRC mode (I thought).  Fixed minor error
  482.                 in ZRPOS handler. The sender now sends a ZCRCW packet when an
  483.                 error occurs  rather than a  ZCRCG. This conforms  with Chuck
  484.                 Forsberg's Zmodem specification.
  485.  
  486.           1.01  Fixed  bug in  ZRPOS handler.   This bug  occasionally caused
  487.                 TXZM  to  trash the  screen  and  lock up  when  a ZRPOS  was
  488.                 received.
  489.                   Optimized the code. TXZM will now operate at 115200 baud at
  490.                 95% efficiency on an 8MHz 286 (approx 11100 cps -- 2 meg in 3
  491.                 mins).  A  16550  UART  is  required  to  obtain  high  speed
  492.                 operation.
  493.                   In mini-term mode, PGDN  puts  TXZM in receive mode in case
  494.                 the sender's ZRQINIT was missed.  Previously it relied on the
  495.                 incoming  ZRQINIT  to trigger  receive  mode.   It  now works
  496.                 either way.
  497.                   Added a '-v'  switch.  This switch disables overlaying disk
  498.                 and  serial I/O.  It also  expands the receive file buffer to
  499.                 20K bytes.  The result is 20K of data is received, serial I/O
  500.                 pauses,  the 20K is written to disk,  a ZACK is sent, and the
  501.                 sender resumes sending.
  502.  
  503.