home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / SYSOP / NMODM218.ZIP / NMODEM.DOC < prev    next >
Text File  |  1992-01-05  |  17KB  |  391 lines

  1.                          NMODEM 2.18 DOCUMENTATION
  2.                          -------------------------
  3.  
  4.   NMODEM is a file transfer protocol written in BORLAND C++ 3.0 for the
  5.   "IBM" family of computers.
  6.  
  7.   This protocol sends data in 2048k blocks.  The last block will be the size
  8.   of the final bytes in the file, thus the original file size will be
  9.   retained. Each block has an overhead of 6 bytes.
  10.  
  11.   2048 bytes was chosen for block size as it seems to be the optimum size for
  12.   CPS and minimal impact on efficiency if an error should occur. It also
  13.   happens to be the normal size of a Hard Drive sector, 2 times a Floppy
  14.   sector and 1/2 of a oversize Hard drive sector thus improving disk
  15.   read/write efficiency.
  16.  
  17.   NMODEM uses 16-bit CRC error checking for a very high reliability of
  18.   successful transfer in rough conditions with minimal transfer overhead.
  19.  
  20.                             LEGAL STUFF
  21.                             -----------
  22.  
  23.   NMODEM is Copyright (c)1992 by L.B. Neal. All Rights Reserved.
  24.  
  25.   Anyone may distribute the NMODEM cheapware version as long it is unmodified,
  26.   complete and any distribution fee is less than $5.00.
  27.  
  28.   -----------------------------------------------------------------------
  29.   NOTE: The registered version of NMODEM may NOT be distributed excepting
  30.         to SYSOPs of "NOT-for-Profit" BBS systems.  See Caution.TXT.
  31.   -----------------------------------------------------------------------
  32.  
  33.   NMODEM is distributed as "cheapware".  You may try this program to see
  34.   if it is of value to you before registering.  If you find the product
  35.   to be of value you MUST pay the registration fee or stop using the program.
  36.   SYSOPS of non-profit BBS's may use NMODEM without registration.
  37.  
  38.   If you paid a fee for NMODEM to anyone but L. B. Neal you did NOT register
  39.   NMODEM you paid for media and handling costs.
  40.  
  41.   Registration schedule is as follows:
  42.  
  43.    1. Register NMODEM but w/o disk                            $ 5.00
  44.  
  45.    2. Register NMODEM w/returned registered version -         $10.00
  46.       * Has DirectVideo/FIFO/Sound/No Log options enabled.
  47.       * Latest Version plus latest NMTERM program.
  48.       * Misc items that will also fit on disk.
  49.  
  50.    3. Update registered version by mail.                      $ 2.00
  51.  
  52.    4. Update registered source by mail.                       $ 5.00
  53.      
  54.    --------------------------------------------------------------------
  55.    NOTICE: Registered users will be able to download the latest registered
  56.            version from PYSMATIC or THE COMM CENTER for free!!
  57.      
  58.            I will need your user#, Password and which BBS you use
  59.            to set up access!
  60.    --------------------------------------------------------------------
  61.  
  62.    NOTE: Items 2,3 & 4 include media, handling, postage and Tax!
  63.  
  64.   My mailing address is currently:
  65.  
  66.               L.B. Neal
  67.               415-112 N. Mary Ave #111
  68.               Sunnyvale, CA 94086
  69.  
  70.   --------------------------------------------------------------------------
  71.                 NMODEM is provided AS-IS without warranty!
  72.  
  73.   I am NOT and will NOT be responsible for the use or misuse of this program.
  74.  
  75.   It is my belief that this program will function essentially as described
  76.   in this document but I cannot test for every possible software/hardware
  77.   configuration.
  78.  
  79.   If you use this program then you have agreed to the previous statements.
  80.   --------------------------------------------------------------------------
  81.  
  82.   The source code for NMODEM is available for $30.  If you purchase the
  83.   source you will be required to sign a Non-Disclosure agreement and will
  84.   NOT be allowed to distribute any modified form of NMODEM or the source
  85.   code.  You will be able to utilize modified versions for your own use.
  86.   This provision is for the protection of myself and other users and is NOT
  87.   intended to prohibit individuals or organizations from adjusting the program
  88.   for specific needs.  Individuals or organizations wishing to incorporate
  89.   NMODEM into a communications program should contact me directly for very
  90.   nominal licensing fees.
  91.  
  92.   NOTE: Due to the low registration cost of NMODEM - Registration or
  93.         purchase of the source does NOT in anyway require any support for
  94.         the program by L.B. Neal. However, I will address problems reported
  95.         in a prompt manner.
  96.  
  97.  
  98.                             USAGE NOTES
  99.                             -----------
  100.  
  101.   1. NMODEM assumes the comport called for is already initialized.
  102.      Therefore using NMODEM directly from DOS will probably NOT work!
  103.  
  104.   2. A minimum of 45k of free memory is needed to sucessfully operate.
  105.  
  106.   3. COM1 thru COM4 are supported with 3 & 4 setup for the "unofficial"
  107.      standard as used by Everex and other manufactures.
  108.  
  109.   4. NMODEM will exit with a DOS error level of 1 if anything goes wrong.
  110.      Otherwise the value will be 0.
  111.  
  112.   5. Please report "in detail" any problems experienced in using the program.
  113.  
  114.   6. Call NMODEM w/o parameters ie C:\>NMODEM<cr> or such to see the needed
  115.      info for using.
  116.  
  117.      NMODEM needs:
  118.  
  119.        a. S for Send or R for Receive.
  120.  
  121.        b. port# (COM1 thru COM4)
  122.  
  123.        c. FileName to transfer.
  124.            optional drive and/or directory.
  125.  
  126.        d. If you add the /D behind the filename Directvideo will be used.
  127.           * [registered versions] 
  128.  
  129.        e. If you have a 16550 UART a /F behind the file name will enable
  130.           the UART FIFO Buffer.
  131.           * [registered versions]
  132.  
  133.        f. NMODEM.LOG is disabled with /L - NMODEM will NOT write to
  134.           nmodem.log.
  135.           *[registered versions]
  136.  
  137.        g. Short beeps at the end of transfer is enabled with /S.
  138.           * [registered versions]
  139.  
  140.  
  141.        Examples:
  142.  
  143.         "cheapware" version:
  144.  
  145.         NMODEM S2 Myfile.zip              { Send via COM2: myfile.zip }
  146.         NMODEM S1 c:\uploads\Myfile.zip   { Send via COM1: myfile.zip }
  147.         NMODEM R2 c:\download\Hisfile.zip { Recv via COM2: hisfile.zip }
  148.         NMODEM R1 Hisfile.zip             { Recv via COM1: hisfile.zip }
  149.  
  150.         Registered version:
  151.        
  152.         NMODEM S2 C:\UPLOADS\Myfile.zip /D   { Send via COM2: myfile.zip }
  153.         NMODEM S1 C:\UPLOADS\Myfile.zip /DF  { Send via COM1: myfile.zip }
  154.         NMODEM R2 C:\DOWNLOAD\Hisfile.zip /D { Recv via COM2: hisfile.zip }
  155.         NMODEM R1 C:\DOWNLOAD\Hisfile.zip /F { Recv via COM1: hisfile.zip }
  156.  
  157.  
  158.      NOTE: I have set up NMODEM to use the same basic parameter string as
  159.            JMODEM to make it easier to install.  If you have a JMODEM batch
  160.            file just rename it and change JMODEM to NMODEM inside the batch
  161.            file.
  162.  
  163.            Combined switches are just added behind a single '/'!
  164.  
  165.  
  166.   7. I have taken great care to try to make sure the CPS rate reported is
  167.      accurate (Unlike many other protocol drivers!).  Please advise if you
  168.      find my efforts in vain.  I recently performed stopwatch tests with
  169.      large file transfers and the indicated CPS did infact match the size
  170.      vs time.
  171.  
  172.      NOTE: The CPS calculation does NOT include receive file I/O time. It
  173.            does include resend times if necessary.  It is not unusual to see
  174.            a low CPS for the first block depending on the interface timing.
  175.            The receive IO is in the background and thus does NOT normally
  176.            effect the actual CPS.
  177.  
  178.   8. NMODEM will resend a block 6 times before aborting the effort.
  179.  
  180.   9. This program plays no tricks and assumes the calling program is nice
  181.      as well.  Tricky programs will probably cause NMODEM to fail. 
  182.  
  183.  10. NMODEM in Turbo Pascal would allow writing Runtime errors to the
  184.      Nmodem.err file, however Turbo C++ presents a very complicated
  185.      method for trying to determine Runtime problems.  Therefore the "C"
  186.      version (2.00 and higher) will NOT attempt to write Runtime errors
  187.      to the file.
  188.  
  189.  11. NMODEM uses BIOS screenwrites for maximum compatability with DesqView
  190.      and other Multi-Tasking situations.  The registered version has an option
  191.      for enabling DirectVideo. IF you must use the BIOS method I suggest you
  192.      investigate QCRT11.ZIP for much faster screenwrites!
  193.  
  194.  12. I have provided NMR.BAT and NMS.BAT as sample batch files which are setup
  195.      for parameters as passed by TELIX.
  196.  
  197.  12. If you attempt to receive an existing file NMODEM will abort!
  198.  
  199.  14. If NMODEM aborts during a receive operation the file will be deleted.
  200.  
  201.  15. NMODEM has been tested with TELIX 3.15 and QMODEM 4.2 they seem to work
  202.      fine.  I also tested with GT-1550 and was unable to duplicate problems
  203.      reported by some GT users.
  204.  
  205.  16. Remember TSR's can have strange side effects.  If NMODEM fails please
  206.      address any TSR's in your system as a possible cause of the problem.
  207.  
  208.  17. NMODEM has been tested with MS-DOS 4.01 (later version or w/patch),
  209.      OS/2, DR-DOS 5.0, PC-MOS 4.1, DOS-XM 6.2, Concurrent DOS-386 3.0 and
  210.      MS-DOS 5.0.
  211.  
  212.  18. NMODEM will NOT work below 1200 Baud!
  213.  
  214.  19. Computers which do NOT have DMA such as PCJr and some versions of the
  215.      TANDY 1000 will NOT work with NMODEM.
  216.  
  217.  20. Special thanks to Ted Chan, Dennis King, Ron Pierce and 
  218.      Dave Halliday for their help with BETA testing of NMODEM.
  219.  
  220.  21. A user recently reported that NMODEM would NOT work due to a problem
  221.      with his floppy controller card.  "Anything can cause problems".
  222.  
  223.  22. Starting with version 2.09, I am providing NMODM286.EXE which will
  224.      run only on 80186/80286/80386/80486 computers.  This version takes
  225.      advantage of special instructions available only on these CPUs.
  226.  
  227.  23. I am happy to report that several users of NMODEM who regularly
  228.      frequent PYSMATIC BBS have advised me that NMODEM is the fastest
  229.      protocol they have used.  BTW: PYSMATIC runs a 10Mhz XT-clone and
  230.      thus is NOT dependent on super CPU thruput.
  231.  
  232.  24. I can be contacted at:
  233.  
  234.                               THE COMM CENTER
  235.                               (415)967-3802
  236.  
  237.                               PYSMATIC BBS
  238.                               (415)969-4159
  239.  
  240.                               Both in Sunnyvale, CA
  241.  
  242.  
  243.                        TECHNICAL NOTES
  244.                        ---------------
  245.  
  246.   1. NMODEM does NOT use assembly language to improve transfer speed.
  247.      Standard Turbo C++ library routines are used for IO. Also, I do
  248.      NOT use the several "COMM libraries" that I own since they use
  249.      specialized assembly routines for speed.
  250.  
  251.   2. The port initialization routines use some assembly features as
  252.      provided by Turbo C++ since the nature of the beast requires some
  253.      of these methods.
  254.  
  255.   3. An interrupt driven receive buffer is utilized to allow high speed
  256.      transfer without dropping bytes. The buffer is NOT written in 
  257.      assembly language or inline.  Specific items are called in psuedo
  258.      assembly, but are NOT related to the buffer efficiency but just
  259.      the need to enter and exit the interrupt properly.
  260.  
  261.   4. Output is directly via the port and a buffer is not used.
  262.  
  263.   5. The program is constructed to avoid Procedure and Function calls
  264.      in the transfer routines for efficiency.  All transfer variables are
  265.      global to avoid stack manipulation overhead.
  266.   
  267.   6. Great care has been taken to use only standard DOS and BIOS interface
  268.      calls to avoid wierd side effects in using NMODEM.  The program is
  269.      being used under FALCON BBS, WILDCAT! BBS, FEATHERNET BBS, TMODEM,
  270.      TELIX 3.15 and QMODEM 4.2 on XT, AT & 386 class machines of various
  271.      manufacture and working well.  Some users have experienced problems
  272.      with lockups, inability to synchup, etc.  At this point I must suspect
  273.      TSR type interference though it is possible I have overlooked a step in
  274.      the interrupt interface. This aspect is under constant review to attempt
  275.      to uncover any oversights on my part.
  276.  
  277.      NOTE: Version 2.01+ has a completely rewritten modem interface which
  278.            should resolve most problems!
  279.  
  280.   7. As of version 1.20 the file lookahead scheme was removed since it was
  281.      faulty and did NOT work when an error was encountered.  I will try to
  282.      come up with a new scheme that will work.
  283.  
  284.   8. Version 1.30 fixes a bug introduced by me and considerable change in
  285.      the main Send and Receive procedures.
  286.  
  287.   9. Version 1.31 uses a new status screen scheme and improves on handling
  288.      of NMODEM.ERR and NMODEM.LOG files.
  289.  
  290.  10. Version 1.32 eliminates redundant ClearScreen.
  291.  
  292.  11. Version 1.40 changes the modem interface hopefully for the better!
  293.      NMODEM now uses Turbo Pascal 5.5, TPCRT from Turbo Power Software,
  294.      and SYST55C2 from Eagle Performance Software!  Each of these items
  295.      increase the speed of NMODEM!
  296.  
  297.  12. Version 1.41 introduces a 1 sec delay after setting up the UART to
  298.      allow slow UARTS to process the information.
  299.  
  300.  13. Version 1.50 introduces yet another major revision of the modem
  301.      interface to try to improve reliabilty with various modems.
  302.  
  303.  14. Version 1.60 eliminates the restiction on path names in the shareware
  304.      package.  I also optimized send and receive loops.  NMODEM will now
  305.      inform DOS of COM3: and COM4: while operating and restore the initial
  306.      status on exit.
  307.  
  308.  16. Version 1.61 introduces an option to disable the generation of the
  309.      Nmodem.log file.  This option works on registered versions only!
  310.  
  311.  17. Version 1.62 adds these features:
  312.  
  313.      A. Added statusline that shows the various options.
  314.  
  315.      B. Optimized the status screen.
  316.  
  317.      C. Cleared full status screen on exit.
  318.  
  319.  18. Version 1.63 addresses some code typo errors on my part and adds
  320.      some code to handle interrupts better.
  321.  
  322.  19. Version 1.64 tweaks the interrupt interface and reduces memory needs
  323.      by 4k.
  324.  
  325.  20. Version 1.65 will place date and time stamp in all NMODEM.LOG and
  326.      NMODEM.ERR entries.  Also reduced lines entered into NMODEM.LOG.
  327.  
  328.  21. Version 1.66 corrects a goof in the new status window drawing
  329.      scheme.
  330.  
  331.  22. Version 2.00 is now compiled with Turbo C++ 1.01. It will soon be
  332.      compiled with TopSpeed C++ 3.01 or Zortech C++ 3.0.
  333.  
  334.  23. Version 2.01 uses a totally new modem interface scheme!
  335.  
  336.  24. Version 2.02 corrects clearing status screen, adds beep option at
  337.      end of transfer and improves CPS calculation.  MNP "support" was
  338.      removed since the scheme was basically faulty and did NOT really
  339.      improve transfer speed, the CRC check will be made at all times.
  340.  
  341.  25. Version 2.03 eliminates echo of keys hit to screen.
  342.  
  343.  26. Version 2.04 will now delete aborted receive files.
  344.  
  345.  27. Version 2.05 corrects flaw in the syncup routine to force
  346.      a 60 second delay.  Corrects exit flag routine and changes some
  347.      #define statements to typedef.
  348.  
  349.  28. Version 2.06 speeds up status window display.
  350.  
  351.  29. Version 2.07 addresses an "ambiguous" return from fread()
  352.      at END-OF-FILE with TC++.
  353.  
  354.  30. Version 2.08 speeds up CRC calc routine.  The code is NOT the best
  355.      but I have yet to a figure a way to trick the compiler into making
  356.      it faster.  The tricks that cause Turbo Pascal to generate the good
  357.      code are not recognized by TC++.
  358.  
  359.      The CRC calc is faster by using doubles for all floating point calcs.
  360.      Seems TC++ does multiple conversions from float to double when
  361.      using floats.
  362.  
  363.      NOTE: The large size of NMODEM.EXE is a result of TLINK NOT being
  364.            very "smart" with C code!  Adding floating point to get
  365.            accurate CPS calculations brought in the whole world!  In
  366.            Turbo Pascal the penalty is about 2k.  In TC++ the penalty
  367.            is about 12K!
  368.        
  369.            Using NMODEM 2.0+ with a floppy drive will result in very
  370.            poor transfer rates.  This is because the fread() and fwrite()
  371.            functions are very slow when addressing non-HD media.
  372.  
  373.  31. Version 2.09 solves the display problem for the final short block in
  374.      a transfer.  A 80286 version is now supplied as NMODM286.EXE.  This
  375.      version will take advantage of improved CPU instructions.
  376.  
  377.  32. Version 2.10 uses some TC++ features to improve speed one more
  378.      time.  Specific efforts are in the modem interrupt handler and
  379.      the keyboard monitor.
  380.  
  381.  33. Version 2.11 tuned the buffer interrupt one more time.
  382.  
  383.  34. Version 2.12 restores the old mode of looking for keys pressed
  384.      by the user. The BIOS system introduced in 2.10 may be causing
  385.      some problems.
  386.  
  387.  35. Version 2.14 addresses use with 9600 bps modems.
  388.  
  389.  36. version 2.16 and 2.17 were skipped. See readme.2.18.
  390.  
  391.