home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSFOSSI / ADF_144.ZIP / ADF.TXT < prev    next >
Encoding:
Text File  |  1998-01-12  |  47.9 KB  |  1,249 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                   AnDan Software FOSSIL Version 1.44
  25.  
  26.                   Users Manual
  27.  
  28.                   Scandinavian Digital Systems           AnDan Software FOSSIL Version 1.44                   Users Manual
  29.           ─────────────────────────────────────────────────────────────────
  30.  
  31.  
  32.           Table of contents
  33.  
  34.            1  Overview ...............................................    3
  35.               1.1  Features of ADF ...................................    3
  36.            2  Shareware ..............................................    3
  37.               2.1  Use as shareware ..................................    4
  38.               2.2  How to register ...................................    4
  39.            3  Support and new versions ...............................    5
  40.               3.1  ADF doesn't work ..................................    5
  41.            4  Included files .........................................    5
  42.            5  Installation ...........................................    6
  43.               5.1  Installing on Windows 3.1, 3.11, and WfWG 3.1 .....    6
  44.               5.2  Installing on Windows for Workgroups 3.11 .........    7
  45.               5.3  Installing on Windows 95 ..........................    7
  46.            6  Command line arguments .................................    8
  47.               6.1  port ..............................................    8
  48.               6.2  addr ..............................................    9
  49.               6.2  irq ...............................................    9
  50.               6.4  baud ..............................................    9
  51.               6.5  recbuf,hold,cont ..................................    9
  52.               6.6  trabuf ............................................   10
  53.               6.7  fifo ..............................................   10
  54.               6.8  line ..............................................   10
  55.               6.9  modem .............................................   11
  56.            7  Execution examples .....................................   11
  57.            8  Baud rate calculation ..................................   12
  58.            9  16550, 16650 and 16750 FIFO UARTs ......................   13
  59.               9.1  Receiver 16550-FIFO trigger level .................   14
  60.               9.2  Receiver 16650-FIFO trigger level .................   14
  61.               9.3  Transmitter 16650-FIFO trigger level ..............   15
  62.               9.4  Receiver 16750-FIFO trigger level .................   15
  63.            10 Error messages .........................................   15
  64.            11 The ADFComCh program ...................................   17
  65.            12 The ADFDebug program ...................................   17
  66.               12.1 Using ADFDebug ....................................   18
  67.            13 The ADFTerm program ....................................   19
  68.            14 The ADFTest program ....................................   19
  69.            15 Version history ........................................   19
  70.            16 Future versions ........................................   21
  71.  
  72.  
  73.           Copyright (c) 1994-1998 Scandinavian Digital Systems AB
  74.  
  75.           This product, including the manual and the software, is provided
  76.           as is. Scandinavian Digital Systems AB and Anders Danielsson
  77.           disclaims all warranties of any kind, whether expressed or
  78.           implied, and are not liable to you or anyone else for any damages
  79.           or costs due to the use or inability to use this product.
  80.  
  81.           Acknowledgments:
  82.  
  83.           AnDan Software is a trademark of Scandinavian Digital Systems AB.
  84.           FidoNet is a trademark of Tom Jennings.
  85.           Windows is a trademark of Microsoft Corporation.
  86.  
  87.  
  88.           ─────────────────────────────────────────────────────────────────
  89.           Scandinavian Digital Systems                               Page 2           AnDan Software FOSSIL Version 1.44                   Users Manual
  90.           ─────────────────────────────────────────────────────────────────
  91.  
  92.  
  93.           X00 is a program made by Raymond L. Gwinn.
  94.           BNU is a program made by David Nugent, Unique Computing Pty
  95.           Limited.
  96.           16550 is a device made by National Semiconductor Corporation.
  97.           16650 is a device made by Startech Semiconductor Incorporated.
  98.           16750 is a device made by Texas Instrument Incorporated.
  99.  
  100.  
  101.  
  102.  
  103.           1  Overview
  104.  
  105.           ADF is a FOSSIL revision level 5 driver, including the additional
  106.           functions defined by Raymond L. Gwinn in X00 v1.50.
  107.  
  108.           ADF is specially designed for users of high speed modems with or
  109.           without the 16550, 16650 or the 16750 UART, using DOS or a
  110.           multitasking environment.
  111.  
  112.           ADF was initially written some years ago because other FOSSIL
  113.           drivers did not always work properly in protected mode
  114.           multitasking environments, where the UART is emulated.
  115.  
  116.           ADF is designed to work well with both emulated UARTs and real
  117.           UARTs, without any drawbacks.
  118.  
  119.  
  120.           1.1  Features of ADF
  121.  
  122.           * Always a locked baud-rate.
  123.           * Locked baud-rate of any speed (2 bps - 115200 bps).
  124.           * Defaults to 8 databits, no parity, and 1 stop bit (8N1).
  125.           * Always CTS/RTS handshake. Never DSR/DTR or XON/XOFF handshake.
  126.           * One port per ADF (load ADF in different tasks for many ports).
  127.           * COM-port address configurable (0H-FFFFH).
  128.           * COM-port IRQ configurable (0-15).
  129.           * Full support of the 16550, 16650 and 16750 UARTs.
  130.           * Fills transmit 16550-FIFO buffer with all 16 bytes.
  131.           * Fills transmit 16650-FIFO buffer with all 32 bytes.
  132.           * Fills transmit 16750-FIFO buffer with all 64 bytes.
  133.           * Receiver 16550-FIFO configurable (1, 4, 8 or 14 bytes).
  134.           * Receiver and transmitter 16650-FIFO configurable.
  135.           * Receiver 16750-FIFO configurable.
  136.           * Only 8088/8086 compatible code used.
  137.  
  138.  
  139.           2  Shareware
  140.  
  141.           The files in this package may be copied and distributed if no fee
  142.           is charged, if no changes are done and as no part of other
  143.           products, in purpose to test and evaluate this product for a
  144.           period of 30 days.
  145.  
  146.  
  147.  
  148.  
  149.           ─────────────────────────────────────────────────────────────────
  150.           Scandinavian Digital Systems                               Page 3           AnDan Software FOSSIL Version 1.44                   Users Manual
  151.           ─────────────────────────────────────────────────────────────────
  152.  
  153.  
  154.           2.1  Use as shareware
  155.  
  156.           To use ADF.EXE as shareware, you must first execute the supplied
  157.           REGISTER.EXE and register ADF.EXE as shareware.
  158.  
  159.           Run REGISTER.EXE, specify ADF.EXE as file to register and do not
  160.           enter any user name. ADF.EXE may then be used as shareware.
  161.  
  162.           When ADF.EXE is executed it will display the number of used days
  163.           since it was registered as shareware.
  164.  
  165.  
  166.           2.2  How to register
  167.  
  168.           To register ADF and use it for more than 30 days, you should pay
  169.           an even amount equal to the sum of USD 10 in a currency of your
  170.           own choice. Examples of common currencies (January 8, 1998):
  171.  
  172.               American Dollars        USD    10
  173.               Australian Dollars      AUD    15
  174.               Austrian Schillings     ATS   150
  175.               Belgian Francs          BEF   400
  176.               British Pounds          GBP    10
  177.               Canadian Dollars        CAD    15
  178.               Dutch Guilders          NLG    20
  179.               French Francs           FRF    60
  180.               German Marks            DEM    20
  181.               Italian Lira            ITL 20000
  182.               Swedish Krona           SEK    80
  183.  
  184.           Please send cash (bills, paper money) in a letter to:
  185.  
  186.               Scandinavian Digital Systems AB
  187.               Billerudsgatan 20
  188.               S-661 30  Saffle
  189.               SWEDEN
  190.  
  191.           Please include a note, a postcard or the printed REGISTER.TXT,
  192.           with your Internet e-mail address, and you will receive an e-mail
  193.           receipt of your payment.
  194.  
  195.           No other methods of payments are accepted. Do not send checks,
  196.           cheques or money orders. Only use paper money, not coins.
  197.  
  198.           After you have sent the money, send an electronic mail through
  199.           Internet to reg@digsys.se. The mail should contain the following
  200.           lines:
  201.  
  202.               Prod: ADF
  203.               User: <Your name and your e-mail address, BBS or location>
  204.  
  205.           You will then receive an automatic reply with your private
  206.           registration code, to the address you mailed your registration.
  207.  
  208.  
  209.  
  210.           ─────────────────────────────────────────────────────────────────
  211.           Scandinavian Digital Systems                               Page 4           AnDan Software FOSSIL Version 1.44                   Users Manual
  212.           ─────────────────────────────────────────────────────────────────
  213.  
  214.  
  215.           When you specify your user registration name after the "User:",
  216.           you should use your name together with some kind of address or
  217.           location information. Examples:
  218.  
  219.               User: Anders Danielsson, AnDan BBS, 2:203/620
  220.               User: Charles Smith, cs@someplace.com
  221.               User: Hans Schultz, Dernauer Str., Hamburg, Germany
  222.  
  223.           Use at least 16 characters, but not more than 63 characters.
  224.  
  225.           Registration forms are available at http://www.digsys.se.
  226.  
  227.           Note, Reg is a program, and it will reply to your origin (from or
  228.           reply-to) address. Please make sure that your e-mail has a valid
  229.           origin address.
  230.  
  231.  
  232.           3  Support and new versions
  233.  
  234.           If you have questions, comments or find bugs in the program,
  235.           please send electronic mail to the author, Anders Danielsson on
  236.           ad@digsys.se.
  237.  
  238.           Well documented reports of new bugs and suggestions are honored
  239.           with a free registration.
  240.  
  241.           The latest version can be downloaded from http://www.digsys.se.
  242.  
  243.           At http://www.digsys.se you find news, programs and support from
  244.           AnDan Software.
  245.  
  246.  
  247.           3.1  ADF doesn't work
  248.  
  249.           ADF is tested to work with many programs, also in different
  250.           environments, that use FOSSIL drivers.
  251.  
  252.           The author is convinced that ADF will work together with all well
  253.           behaved programs, and if not, it is our intention to make it work
  254.           with those programs as quickly as possible.
  255.  
  256.           However, it is not our policy to make memory or time consuming
  257.           changes in ADF to make it work with badly behaved programs that
  258.           do not use a FOSSIL correctly.
  259.  
  260.  
  261.           4  Included files
  262.  
  263.           You should have received the following files:
  264.  
  265.           File name:    Description:
  266.  
  267.           ADF.TXT       This file
  268.           ADF.EXE       The FOSSIL driver
  269.  
  270.  
  271.           ─────────────────────────────────────────────────────────────────
  272.           Scandinavian Digital Systems                               Page 5           AnDan Software FOSSIL Version 1.44                   Users Manual
  273.           ─────────────────────────────────────────────────────────────────
  274.  
  275.  
  276.           ADFCOMCH.EXE  Checks COM-ports
  277.           ADFDEBUG.EXE  FOSSIL debugger
  278.           ADFTERM.EXE   Very small and simple communication program
  279.           ADFTEST.EXE   FOSSIL tester
  280.           ADFCOM1.BAT   Example of use of ADF with COM1
  281.           ADFCOM2.BAT   Example of use of ADF with COM2
  282.           FILE_ID.DIZ   File description
  283.           REGISTER.TXT  Registration form
  284.           REGISTER.EXE  Registration program
  285.  
  286.  
  287.           5  Installation
  288.  
  289.           Just copy ADF.EXE to a directory included in your PATH.
  290.  
  291.           If you are only running DOS, edit your AUTOEXEC.BAT and insert a
  292.           line that loads ADF.
  293.  
  294.           You may insert (or call) one of the files ADFCOM1.BAT or
  295.           ADFCOM2.BAT for quick and easy editing.
  296.  
  297.           If you are using a protected mode multitasking environment, such
  298.           as Windows, load one copy of ADF in each wanted DOS session using
  299.           different ports.
  300.  
  301.           Do not load ADF in AUTOEXEC.BAT. In fact, this applies for all
  302.           FOSSIL drivers, and this is the reason why ADF only uses one port
  303.           per load.
  304.  
  305.           Instead, execute for example MAINBBS.BAT that will call
  306.           RUNBBS.BAT (or whatever filenames you are using). Such a
  307.           MAINBBS.BAT may look like:
  308.  
  309.               @echo off
  310.               prompt $e[0;40;1;31mBBS$e[0;37m $p$g
  311.               path c:\bbs;%path%
  312.               rem do other SET here, like SET FDOPT=NORES or
  313.               rem SET MCM=C:\MCMAIL
  314.               call adfcom1
  315.               call runbbs
  316.               adf unload
  317.  
  318.           If you are using Windows 3, you may need to set an environment
  319.           size in SYSTEM.INI, example:
  320.  
  321.               [NonWindowsApp]
  322.               CommandEnvSize=1024
  323.  
  324.  
  325.           5.1  Installing on Windows 3.1, 3.11, and WfWG 3.1
  326.  
  327.           To let ADF (and other DOS application) take advantage of the
  328.           FIFO's of the 16550 UART, you need to install a third-party
  329.           communications drivers (such as Turbocom by Pacific Commware and
  330.  
  331.  
  332.           ─────────────────────────────────────────────────────────────────
  333.           Scandinavian Digital Systems                               Page 6           AnDan Software FOSSIL Version 1.44                   Users Manual
  334.           ─────────────────────────────────────────────────────────────────
  335.  
  336.  
  337.           KingComm by OTC Corporation), or upgrade to Windows for
  338.           Workgroups 3.11.
  339.  
  340.  
  341.           5.2  Installing on Windows for Workgroups 3.11
  342.  
  343.           Windows for Workgroups 3.11 is the first version of Windows with
  344.           16550 FIFO support for DOS applications. You do not need any
  345.           third-party communications drivers.
  346.  
  347.           Make sure you got a SERIAL.386 dated Feb 17, 1994, or later.
  348.           (Available at http://www.microsoft.com).
  349.  
  350.           Examples of settings in SYSTEM.INI:
  351.  
  352.               [386Enh]
  353.               COM1BASE=03F8
  354.               COM1IRQ=4
  355.               COM1Fifo=1
  356.               COM1TxFifo=1
  357.               COM1RxTrigger=4
  358.               COM2BASE=02F8
  359.               COM2IRQ=3
  360.               COM2Fifo=1
  361.               COM2TxFifo=1
  362.               COM2RxTrigger=4
  363.  
  364.           Set the COM?RxTrigger to the same value as the receiver trigger
  365.           level of ADF (see below).
  366.  
  367.  
  368.           5.3  Installing on Windows 95
  369.  
  370.           If you have an 16550, 16650 or 16750 UART, you need to enable the
  371.           16550 support and configure it in Windows 95.
  372.  
  373.           In the port settings of the modem configuration, enable the
  374.           FIFOs, set the FIFO receiver buffer (1, 4, 8 or 14) to the same
  375.           value as the receiver trigger level of ADF (see below), and set
  376.           the FIFO transmit buffer to the maximum.
  377.  
  378.           A FIFO receiver trigger level of 4 (the second position in
  379.           Windows 95) is a good choice for most users using 38400 bps or
  380.           higher.
  381.  
  382.           In the SYSTEM.INI file, set the Com?Buffer equal to the size of
  383.           the receive buffer of ADF. Example:
  384.  
  385.               [386Enh]
  386.               Com1Buffer=4096
  387.               Com2Buffer=4096
  388.  
  389.  
  390.  
  391.  
  392.  
  393.           ─────────────────────────────────────────────────────────────────
  394.           Scandinavian Digital Systems                               Page 7           AnDan Software FOSSIL Version 1.44                   Users Manual
  395.           ─────────────────────────────────────────────────────────────────
  396.  
  397.  
  398.           6  Command line arguments
  399.  
  400.           When you run ADF without any arguments, it will display the
  401.           following help text (use ADF|MORE for more prompt):
  402.  
  403.           adf port addr irq baud recbuf[,hold[,cont]] trabuf [fifo] [line]
  404.             [modem]
  405.  
  406.           port    FOSSIL port number, 0-126, or COM-port, COM1-COM127.
  407.                   Example: 0 or COM1
  408.           addr    Address in hex of COM-port, 0-FFFF. Example: 3F8
  409.           irq     IRQ number of COM-port, 0-15. Example: 4
  410.           baud    Locked baud-rate, 1-115200. Example: 38400
  411.           recbuf  Size of receive buffer, 256-16384. Example: 4096
  412.           hold    Flow control hold or stop, default 7/8 of recbuf.
  413.                   Example: 3584
  414.           cont    Flow control continue or restart, default 6/8 of recbuf.
  415.                   Example: 3072
  416.           trabuf  Size of transmit buffer, 256-16384. Example: 4096
  417.           fifo    Receiver 16550-FIFO trigger level, 1, 4, 8 or 14.
  418.                   Default: 8
  419.                   Or 16650,rec,tra for setting receiver trigger level 8,
  420.                   16, 24 or 28, and transmitter trigger level 8, 16, 24 or
  421.                   30 on 16650. Example: 16650,16,8
  422.                   Or 16750,rec for setting receiver trigger level 1, 16, 32
  423.                   or 56 on 16750. Example: 16750,32
  424.           line    Line control register. Default: 3
  425.           modem   Modem control register. Default: 11
  426.  
  427.           ADF will stay resident when using the above command line.
  428.  
  429.           adf UNLOAD
  430.  
  431.           ADF will remove itself from memory when using the above command
  432.           line.
  433.  
  434.           adf watch ON|OFF|time
  435.  
  436.           ADF will turn carrier watchdog on or off when using the above
  437.           command line. If a numeric value is used, the time out in seconds
  438.           (10-3600) will be set, this will not turn the watchdog on or off
  439.           (default is 60 seconds).
  440.  
  441.  
  442.           6.1  port
  443.  
  444.           You may specify the FOSSIL port number starting with 0 by using a
  445.           number only, or you may specify the port number starting with 1
  446.           by putting COM before the number, that is 0 = COM1, 1 = COM2 and
  447.           so on. In practice, ADF sets no limits, but your environment may
  448.           limit the number of COM ports.
  449.  
  450.           The FOSSIL port number is only used to check for correct calls by
  451.           application programs. ADF doesn't use this number to access the
  452.  
  453.  
  454.           ─────────────────────────────────────────────────────────────────
  455.           Scandinavian Digital Systems                               Page 8           AnDan Software FOSSIL Version 1.44                   Users Manual
  456.           ─────────────────────────────────────────────────────────────────
  457.  
  458.  
  459.           port or anything like that. You always need to specify the
  460.           address and IRQ of the port.
  461.  
  462.  
  463.           6.2  addr
  464.  
  465.           Address in hexadecimal notation of the COM port, see irq.
  466.  
  467.  
  468.           6.3  irq
  469.  
  470.           IRQ of the COM port. The most common addresses and IRQs are:
  471.  
  472.               COM1    3F8    4
  473.               COM2    2F8    3
  474.               COM3    3E8    4
  475.               COM4    2E8    3
  476.  
  477.           Note that you cannot use two COM ports having the same IRQ. If
  478.           you configure your hardware using the same IRQ of two COM ports,
  479.           you must be very sure that they are not used at the same time and
  480.           that programs using them turns them of when finished. Otherwise
  481.           you will get a true electrical short-circuit.
  482.  
  483.  
  484.           6.4  baud
  485.  
  486.           The baud rate to use (lock). Common values are 9600, 19200,
  487.           38400, 57600 and 115200. See chapter 8 for details.
  488.  
  489.           These are the PC standard baud rates. Some communication adapters
  490.           uses a baud rate multiplication, meaning that when ADF sets a PC
  491.           standard baud rate, the true baud rate will be (for example) four
  492.           times higher. ADF fully supports such adapters, you simply
  493.           specify the (false) PC standard baud rate on the ADF command
  494.           line.
  495.  
  496.           With some application programs, many modems need to be
  497.           initialized and programmed (e.g. AT&W) using the wanted baud
  498.           rate. The supplied ADFTERM.EXE is useful for one-time
  499.           initialization and programming of modems.
  500.  
  501.           The baud rate should be at least as high as 10 times your cps
  502.           rate. It should not need to be much larger than this.
  503.  
  504.           Be aware of that the RS-232 standard specifies a maximum baud
  505.           rate of 20000 bps. Most of todays computers and modems allows
  506.           higher baud rates, but some don't, please see your hardware
  507.           manuals.
  508.  
  509.  
  510.           6.5  recbuf,hold,cont
  511.  
  512.  
  513.  
  514.  
  515.           ─────────────────────────────────────────────────────────────────
  516.           Scandinavian Digital Systems                               Page 9           AnDan Software FOSSIL Version 1.44                   Users Manual
  517.           ─────────────────────────────────────────────────────────────────
  518.  
  519.  
  520.           The receive buffer size in bytes. Use at least 1024, but it
  521.           should not need to be much larger than your maximum cps rate.
  522.           4096 is a good value for high speed modems.
  523.  
  524.           Optionally, you may use commas and specify the receive flow
  525.           control trigger levels. When the number of bytes in the receive
  526.           buffer is more than the "hold" value, RTS will be lowered. Then
  527.           when the number of bytes has gone below the "cont" value, RTS
  528.           will be raised again.
  529.  
  530.           Note that some modems ignores the RTS signal, in practice it will
  531.           work anyway, at least with large enough receive buffer.
  532.  
  533.  
  534.           6.6  trabuf
  535.  
  536.           The transmit buffer size in bytes. Use at least 1024, but it
  537.           should not need to be much larger than your maximum cps rate.
  538.           4096 is a good value for high speed modems.
  539.  
  540.  
  541.           6.7  fifo
  542.  
  543.           The 16550 FIFO receiver trigger level. A value of 1, 4, 8 or 14
  544.           bytes. Please see chapter 9 for details. If you don't specify
  545.           this on the command line, a trigger level of 8 bytes will be used
  546.           by default. If you don't have a 16550 or compatible, ADF will
  547.           still set the trigger level, but it will have no effect.
  548.  
  549.           When running ADF under Windows, set the receiver trigger level of
  550.           the Windows communication driver to the same value as ADF.
  551.  
  552.           Instead of the 16550 FIFO receiver trigger level, you may specify
  553.           the number 16650 or 16750, meaning you got a 16650 or a 16750
  554.           UART respectively.
  555.  
  556.           When you use 16650 you must also specify the 16650 FIFO receiver
  557.           and transmitter trigger levels separated with commas.
  558.  
  559.           When you use 16750 you must also specify the 16750 FIFO receiver
  560.           trigger level separated with a comma.
  561.  
  562.           Please note, you may need or want to use your 16650 or 16750 in
  563.           16550 compatible mode. In such cases, you should not tell ADF to
  564.           use 16650 or 16750.
  565.  
  566.  
  567.           6.8  line
  568.  
  569.           The value to put in the UART's Line Control Register. This is an
  570.           advanced option. If you want 8N1 (like most users) you don't need
  571.           to worry about this option. The Line Control Register is a bit
  572.           register, you need to add the values wanted.
  573.  
  574.  
  575.  
  576.           ─────────────────────────────────────────────────────────────────
  577.           Scandinavian Digital Systems                              Page 10           AnDan Software FOSSIL Version 1.44                   Users Manual
  578.           ─────────────────────────────────────────────────────────────────
  579.  
  580.  
  581.           Value:  Meaning:
  582.  
  583.              0    5 data bits
  584.              1    6 data bits
  585.              2    7 data bits
  586.              3    8 data bits
  587.              4    2 stop bits
  588.              8    Parity Enable
  589.             16    Even Parity
  590.             32    Stick Parity
  591.  
  592.           Common combinations:
  593.  
  594.             8N1   3
  595.             7O1   10 (2+8)
  596.             7E1   26 (2+8+16)
  597.  
  598.  
  599.           6.9  modem
  600.  
  601.           The value to put in the UART's Modem Control Register. This is an
  602.           advanced option. If you have a 100% PC compatible you should not
  603.           use this option. The Modem Control Register is a bit register,
  604.           you need to add the values wanted. This value is loaded into the
  605.           register when application programs calls for a FOSSIL
  606.           initialization. Some bits (like DTR, RTS and Out2) are modified
  607.           by ADF during execution.
  608.  
  609.           Value:  Meaning:
  610.  
  611.             1     Data Terminal Ready, DTR
  612.             2     Request to Send, RTS
  613.             4     Out1
  614.             8     Out2, On PC compatibles, the Out2 signal is used to mask
  615.                   the IRQ signal. IRQ must not be masked for ADF to work.
  616.            16     Loopback
  617.            32     16650 only: Open source (emitter) interrupt output, for
  618.                   shared interrupts. (ADF has no special shared interrupt
  619.                   capabilities).
  620.            64     16650 only: Infrared RXD/TXD
  621.           128     16650 only using 7.372 MHz clock: Divided by four baud
  622.                   clock
  623.  
  624.  
  625.           7  Execution examples
  626.  
  627.           Example of loading ADF using COM1 (see ADFCOM1.BAT):
  628.  
  629.           adf COM1 3F8 4 38400 4096 4096 8
  630.  
  631.  
  632.           Example of loading ADF using COM2 (see ADFCOM2.BAT):
  633.  
  634.  
  635.  
  636.  
  637.           ─────────────────────────────────────────────────────────────────
  638.           Scandinavian Digital Systems                              Page 11           AnDan Software FOSSIL Version 1.44                   Users Manual
  639.           ─────────────────────────────────────────────────────────────────
  640.  
  641.  
  642.           adf COM2 2F8 3 38400 4096 4096 8
  643.  
  644.  
  645.           Example of loading ADF with 16650:
  646.  
  647.           adf COM1 3F8 4 38400 4096 4096 16650,16,8
  648.  
  649.  
  650.           Example of loading ADF with 16750:
  651.  
  652.           adf COM1 3F8 4 38400 4096 4096 16750,32
  653.  
  654.  
  655.           Example of loading ADF with 7E1:
  656.  
  657.           adf COM1 3F8 4 38400 4096 4096 8 26
  658.  
  659.  
  660.           Example of unloading ADF:
  661.  
  662.           adf unload
  663.  
  664.  
  665.           Example of setting the watchdog time out to 2 minutes:
  666.  
  667.           adf watch 120
  668.  
  669.  
  670.           Example of REMOTE.BAT, to execute on DOS-Shell in a BBS:
  671.  
  672.           @echo off
  673.           rem %1 = Baud rate (used to detect local call)
  674.           if not %1@==0@ ctty COM%2
  675.           if not %1@==0@ adf watch on
  676.           command
  677.           adf watch off
  678.           ctty CON
  679.  
  680.           The carrier watchdog will try to reboot the computer after about
  681.           60 seconds (if not changed) from the carrier drops. This may be
  682.           dangerous, especially in a multitasking environment (such as
  683.           Windows).
  684.  
  685.  
  686.           8  Baud rate calculation
  687.  
  688.           A PC compatible serial port uses the following formula to
  689.           calculate the baud rate:
  690.  
  691.           Baud = 115200 / Divisor
  692.  
  693.           The Divisor is an integer number (whole number), 1 to 65535, used
  694.           to program the serial port (the UART chip). This means that only
  695.           certain baud rates are allowed.
  696.  
  697.  
  698.           ─────────────────────────────────────────────────────────────────
  699.           Scandinavian Digital Systems                              Page 12           AnDan Software FOSSIL Version 1.44                   Users Manual
  700.           ─────────────────────────────────────────────────────────────────
  701.  
  702.  
  703.           Divisor:  Baud rate:    True baud rate on a 4x adapter:
  704.  
  705.              1      115200 bps            460800 bps
  706.              2       57600 bps            230400 bps
  707.              3       38400 bps            153600 bps
  708.              4       28800 bps            115200 bps
  709.              5       23040 bps             92160 bps
  710.              6       19200 bps             76800 bps
  711.              7       16457 bps             65829 bps
  712.              8       14400 bps             57600 bps
  713.              9       12800 bps             51200 bps
  714.             10       11520 bps             46080 bps
  715.             11       10473 bps             41891 bps
  716.             12        9600 bps             38400 bps
  717.              .         .                     .
  718.              .         .                     .
  719.              X       115200/X             460800/X
  720.              .         .                     .
  721.              .         .                     .
  722.  
  723.  
  724.           When you specify a baud rate on the command line to ADF, ADF
  725.           calculates the Divisor and checks that the baud-rate is valid
  726.           (realizable).
  727.  
  728.           If you for example use 76800 bps as a baud rate to ADF, the
  729.           Divisor will be 115200/76800 = 1.5, but this is not an integer
  730.           (whole number) and cannot be set. ADF will in this case display
  731.           an error message.
  732.  
  733.  
  734.           9  16550, 16650 and 16750 FIFO UARTs
  735.  
  736.           ADF has full support of the 16550, the 16650 and the 16750 UART.
  737.           These UARTs are enhanced replacements of the standard 8250 and
  738.           16450 UARTs, using hardware buffers to get higher performance.
  739.  
  740.           These buffers are called FIFO (First In First Out) buffers.
  741.  
  742.           The 16550 has one 16 byte large receiver FIFO buffer, and one 16
  743.           bytes large transmitter FIFO buffer.
  744.  
  745.           The 16650 has one 32 byte large receiver FIFO buffer, and one 32
  746.           bytes large transmitter FIFO buffer.
  747.  
  748.           The 16750 has one 64 byte large receiver FIFO buffer, and one 64
  749.           bytes large transmitter FIFO buffer.
  750.  
  751.           On the 16550 and on the 16750, you may set the trigger level of
  752.           the receiver FIFO buffer. On the 16650, you may set the trigger
  753.           level of both the receiver and transmitter FIFOs.
  754.  
  755.  
  756.  
  757.  
  758.  
  759.           ─────────────────────────────────────────────────────────────────
  760.           Scandinavian Digital Systems                              Page 13           AnDan Software FOSSIL Version 1.44                   Users Manual
  761.           ─────────────────────────────────────────────────────────────────
  762.  
  763.  
  764.           9.1  Receiver 16550-FIFO trigger level
  765.  
  766.           The receiver 16550-FIFO trigger level can be set to 1, 4, 8 or 14
  767.           bytes of it's total 16 bytes buffer size.
  768.  
  769.           The value is the number of bytes in the receiver FIFO buffer that
  770.           will generate an interrupt from the UART to the CPU.
  771.  
  772.           The receiver FIFO buffer and it's trigger level, is the main
  773.           reason why many people replaces their old 8250 and 16450 UARTs
  774.           with 16550.
  775.  
  776.           If you for example use a baud rate of 38400 bps (8N1), there will
  777.           be a new byte received each 260 us (microseconds). With an
  778.           ordinary UART, the CPU must answer to an interrupt from the UART
  779.           each 260 us, and read the byte and store it in memory.
  780.  
  781.           If the CPU is unable to answer an interrupt at this rate, or if
  782.           some program has disable interrupts longer than 260 us, received
  783.           bytes will be lost. If you are downloading a file, you will get a
  784.           lot of resends.
  785.  
  786.           The 16550 UART has a 16 byte receiver FIFO buffer (and also a 16
  787.           byte transmitter FIFO) so it can store up to 16 bytes until the
  788.           CPU must read and empty the buffer.
  789.  
  790.           The receiver FIFO trigger level specifies when an interrupt
  791.           should be generated by the UART to the CPU.
  792.  
  793.           If the trigger level is set to 4, the UART will generate an
  794.           interrupt after 4 bytes have been received, but will still fill
  795.           the buffer up to 16 bytes if the CPU doesn't answer the
  796.           interrupt. The rate of interrupts at 38400 bps will be
  797.           4*260 = 1040 us, and the tolerance to no answer from the CPU will
  798.           be (16-4)*260 = 3120 us.
  799.  
  800.           The most common problem with high baud rates, is that programs
  801.           turns off interrupts during too long time. A trigger level of 14
  802.           would in most cases not be a good solution, normally a trigger
  803.           level of 8 is good enough, in some cases you may lower it to 4.
  804.           You should not choose a lower trigger level then necessary,
  805.           because it would load the CPU without giving any benefits.
  806.  
  807.  
  808.           9.2  Receiver 16650-FIFO trigger level
  809.  
  810.           The receiver 16650-FIFO trigger level can be set to 8, 16, 24 or
  811.           28 bytes of it's total 32 bytes buffer size.
  812.  
  813.           It's similar to the 16550-FIFO, see section 9.1 above, but it
  814.           will have higher tolerance against CPU response time and it will
  815.           load the CPU even less.
  816.  
  817.  
  818.  
  819.  
  820.           ─────────────────────────────────────────────────────────────────
  821.           Scandinavian Digital Systems                              Page 14           AnDan Software FOSSIL Version 1.44                   Users Manual
  822.           ─────────────────────────────────────────────────────────────────
  823.  
  824.  
  825.           9.3  Transmitter 16650-FIFO trigger level
  826.  
  827.           The transmitter 16650-FIFO trigger level can be set to 8, 16, 24
  828.           or 30 bytes of it's total 32 bytes buffer size.
  829.  
  830.           This setting cannot be done on the 16550 or 16750. The 16550 and
  831.           16750 always have theirs transmitter FIFO trigger levels set to 1
  832.           by hardware.
  833.  
  834.           When the number of not yet transmitted bytes in the FIFO goes
  835.           below the trigger level, the UART will generate an interrupt to
  836.           the CPU, so the interrupt service program can fill up the FIFO
  837.           with more characters to transmit.
  838.  
  839.           The setting of the transmitter FIFO trigger level will affect how
  840.           much the transmission will load the CPU, and how fast the
  841.           transmission may be.
  842.  
  843.           A lower trigger level means less CPU load, but maybe lower
  844.           transfer rates if long interrupt response times.
  845.  
  846.           A higher trigger level means higher transfer rates on systems
  847.           with long interrupt response times, but it will load the CPU
  848.           more.
  849.  
  850.  
  851.           9.4  Receiver 16750-FIFO trigger level
  852.  
  853.           The receiver 16750-FIFO trigger level can be set to 1, 16, 32 or
  854.           56 bytes of it's total 64 bytes buffer size.
  855.  
  856.           It's similar to the 16550-FIFO, see section 9.1 above, but it
  857.           will have higher tolerance against CPU response time and it will
  858.           load the CPU even less.
  859.  
  860.  
  861.           10 Error messages
  862.  
  863.           When ADF displays an error message, it will wait a moment before
  864.           continuing, so you are able to read the message when ADF is
  865.           executed among other programs in batch files (such as
  866.           AUTOEXEC.BAT).
  867.  
  868.           All error messages with explanations:
  869.  
  870.  
  871.           "Argument error (command line error)."
  872.  
  873.           ADF was unable to understand the command line arguments, please
  874.           see section 6 above. This error message will also be displayed if
  875.           numerical values on the command line are out of range.
  876.  
  877.  
  878.  
  879.  
  880.  
  881.           ─────────────────────────────────────────────────────────────────
  882.           Scandinavian Digital Systems                              Page 15           AnDan Software FOSSIL Version 1.44                   Users Manual
  883.           ─────────────────────────────────────────────────────────────────
  884.  
  885.  
  886.           "DOS v3.1 or newer required."
  887.  
  888.           Your DOS is too old, you need to upgrade to a newer DOS version.
  889.  
  890.  
  891.           "Unable to handle TSRs in this environment."
  892.  
  893.           ADF does a check that it can search and find it self in the DOS
  894.           memory (lower or upper). If this fails it will display this
  895.           message. Try using plain DOS without special memory managers or
  896.           program loaders.
  897.  
  898.  
  899.           "Error when releasing memory."
  900.  
  901.           DOS reports error when freeing memory. This can occur during both
  902.           load and unload of ADF. Probably is the DOS memory allocation
  903.           blocks damaged (by some program).
  904.  
  905.  
  906.           "Invalid (not realizable) baud-rate."
  907.  
  908.           The specified baud-rate cannot be used. Please see section 8
  909.           above.
  910.  
  911.  
  912.           "Not enough memory for buffers."
  913.  
  914.           The memory given to ADF by DOS at load time is not enough to
  915.           satisfy the wanted size of the receive and transmit buffers.
  916.           Decrease the sizes or load ADF in low memory or in a larger high
  917.           memory block.
  918.  
  919.  
  920.           "Error when restoring interrupts."
  921.  
  922.           This may occur when unloading ADF. Most common cause is that some
  923.           other programs also are using the same interrupts. Try to unload
  924.           all TSRs in the reverse order of how they where loaded.
  925.  
  926.  
  927.           "ADF already loaded."
  928.  
  929.           This message will be displayed if you try to load ADF a second
  930.           time.
  931.  
  932.  
  933.           "ADF not loaded."
  934.  
  935.           This message will be displayd if you use some of the ADF command
  936.           lines that requires ADF to be loaded as a TSR first (e.g. unload
  937.           and watch).
  938.  
  939.  
  940.  
  941.  
  942.           ─────────────────────────────────────────────────────────────────
  943.           Scandinavian Digital Systems                              Page 16           AnDan Software FOSSIL Version 1.44                   Users Manual
  944.           ─────────────────────────────────────────────────────────────────
  945.  
  946.  
  947.           "Please run "REGISTER" first to use this program."
  948.  
  949.           You must run REGISTER.EXE to use ADF.EXE, see section 2 above. If
  950.           you get a new version of ADF.EXE you need to run REGISTER.EXE
  951.           once again.
  952.  
  953.  
  954.           "You have used this program for more than 30 days. If you want to
  955.           use it more, you must register it. Please wait a moment."
  956.  
  957.           Please read section 2 above. ADF will wait a moment (from 5
  958.           seconds up to 60 seconds) when displaying this message, you
  959.           cannot terminate this waiting.
  960.  
  961.  
  962.           11 The ADFComCh program
  963.  
  964.           When you run ADFComCh without any arguments, it will display the
  965.           following help text:
  966.  
  967.           adfcomch addr
  968.  
  969.           addr    Address in hex of COM port, 0-FFFF. Example: 3F8
  970.  
  971.           ADFComCh checks if there is an UART at the specified port
  972.           address. The most common port addresses are:
  973.  
  974.               COM1    3F8
  975.               COM2    2F8
  976.               COM3    3E8
  977.               COM4    2E8
  978.  
  979.           The current UART settings will be cleared or modified. Please run
  980.           from plain DOS only, and reboot or load ADF after usage. Sets
  981.           ERRORLEVEL to:
  982.  
  983.           255  Error
  984.             5  No UART
  985.             4  16450
  986.             3  16550
  987.             2  16650
  988.             1  16750
  989.  
  990.  
  991.           12 The ADFDebug program
  992.  
  993.           When you run ADFDebug without any arguments, it will display the
  994.           following help text:
  995.  
  996.           adfdebug command
  997.  
  998.           'command' is one of the following commands:
  999.  
  1000.  
  1001.  
  1002.  
  1003.           ─────────────────────────────────────────────────────────────────
  1004.           Scandinavian Digital Systems                              Page 17           AnDan Software FOSSIL Version 1.44                   Users Manual
  1005.           ─────────────────────────────────────────────────────────────────
  1006.  
  1007.  
  1008.           L [opt] Load TSR, should be done after the FOSSIL load. Options:
  1009.                   /t    Use time measurement.
  1010.                   /sNN  Use ASCII NN as separator, default is 13 and 10 (CR
  1011.                         and LF).
  1012.           U       Unload TSR, should be done before the FOSSIL unload.
  1013.           N       No output (default at load time).
  1014.           S       Screen output.
  1015.           F file  File output to the specified file.
  1016.  
  1017.  
  1018.           12.1 Using ADFDebug
  1019.  
  1020.           ADFDebug is a FOSSIL debugger. It is loaded as a TSR after the
  1021.           FOSSIL has been loaded, and may write debug (trace) information
  1022.           to the screen or to a file.
  1023.  
  1024.           It is included for application programmers, and for advanced
  1025.           users.
  1026.  
  1027.           ADFDebug is loaded using the command L with or without the
  1028.           options /t or /s. If /t is used, it will do time measurements of
  1029.           the FOSSIL driver functions using timer ticks with the unit
  1030.           0.838095 us (microseconds). The time will always include a small
  1031.           offset error, independent of the FOSSIL driver used. Execution
  1032.           time of interrupts that occurs during FOSSIL execution will be
  1033.           included in the time measurement.
  1034.  
  1035.           When loading with the option /t, ADFDebug may cause the internal
  1036.           DOS clock (BIOS Timer Tick) to be incorrectly updated. Do only
  1037.           use /t in plain DOS without any timer depending TSRs, including
  1038.           hard disk caches (e.g. smartdrv), and reboot when done with
  1039.           testing. During testing, do not hold down keys or move the mouse.
  1040.  
  1041.           After loading ADFDebug, the command S or F is used to start debug
  1042.           output, and the command N is used to stop the output.
  1043.  
  1044.           When using the command F, you must also specify a file name. The
  1045.           file is opened, written to and closed at each FOSSIL call, so
  1046.           most programs using the FOSSIL will run very slow. The file may
  1047.           also get very large.
  1048.  
  1049.           ADFDebug uses DOS to write to the file, which may cause a system
  1050.           crash when the FOSSIL is used by some programs (programs that
  1051.           calls the FOSSIL from interrupt routines).
  1052.  
  1053.           For testing purposes the program ADFTest (see below) is included.
  1054.           It calls a lot of FOSSIL functions, and the calls are done
  1055.           immediate after a BIOS Timer Tick count, to minimize time
  1056.           measurement errors.
  1057.  
  1058.           Example of usage of ADFDebug and ADFTest:
  1059.  
  1060.           @echo off
  1061.           del adf.lst
  1062.  
  1063.  
  1064.           ─────────────────────────────────────────────────────────────────
  1065.           Scandinavian Digital Systems                              Page 18           AnDan Software FOSSIL Version 1.44                   Users Manual
  1066.           ─────────────────────────────────────────────────────────────────
  1067.  
  1068.  
  1069.           adf COM1 3F8 4 38400 2048 1024 8
  1070.           adfdebug L /t /s9
  1071.           adfdebug F adf.lst
  1072.           adftest COM1
  1073.           adfdebug U
  1074.           adf unload
  1075.  
  1076.  
  1077.           13 The ADFTerm program
  1078.  
  1079.           When you run ADFTerm without any arguments, it will display the
  1080.           following help text:
  1081.  
  1082.           adfterm port
  1083.  
  1084.           port    FOSSIL port number, 0-126, or COM-port, COM1-COM127.
  1085.                   Example: 0 or COM1
  1086.  
  1087.           ADFTerm is a very small and simple communication program, that
  1088.           uses the ADF or any FOSSIL driver. It will set 2400 bps and 8N1
  1089.           if FOSSIL is not locked.
  1090.  
  1091.           You may call BBSes and use ANSI-BBS if you have ANSI.SYS loaded.
  1092.  
  1093.  
  1094.           14 The ADFTest program
  1095.  
  1096.           When you run ADFTest without any arguments, it will display the
  1097.           following help text:
  1098.  
  1099.           adftest port
  1100.  
  1101.           port    FOSSIL port number, 0-126, or COM-port, COM1-COM127.
  1102.                   Example: 0 or COM1
  1103.  
  1104.           ADFTest is a FOSSIL test program.
  1105.  
  1106.           ADFTest will send "ATE1<cr>" to the port and expect at least one
  1107.           character as reply. A modem connected to the port will in most
  1108.           cases do the job.
  1109.  
  1110.           ADFTest is intended to be used with ADFDebug for testing and
  1111.           verifying FOSSIL drivers.
  1112.  
  1113.  
  1114.           15 Version history
  1115.  
  1116.           v1.10 November 22, 1995
  1117.  
  1118.           This is the first non-BETA version. The setting of the receiver
  1119.           FIFO trigger level on the command line has been added since the
  1120.           v1.00 BETAs from 1994.
  1121.  
  1122.  
  1123.  
  1124.  
  1125.           ─────────────────────────────────────────────────────────────────
  1126.           Scandinavian Digital Systems                              Page 19           AnDan Software FOSSIL Version 1.44                   Users Manual
  1127.           ─────────────────────────────────────────────────────────────────
  1128.  
  1129.  
  1130.           v1.20 December 9, 1995
  1131.  
  1132.           Many improvements and bug fixes has been done. ADF now includes
  1133.           all FOSSIL functions 01H to 21H as X00 v1.50 does. It also
  1134.           includes function 7EH and 7FH for "external application". ADF
  1135.           will now display an error message if the baud-rate is not
  1136.           realizable. Some more utility programs have been included, the
  1137.           debug function has been moved into a separate program (option /d
  1138.           is no longer valid).
  1139.  
  1140.  
  1141.           v1.30 January 20, 1996
  1142.  
  1143.           Bugfix of External Application. Added output of flag register in
  1144.           ADFDebug. Bugfix of function 1E "Extended line control
  1145.           initialization". Bugfix of function 04, 05, 1C, 14 when used on
  1146.           illegal port number. Only check DL for port number (due to bugs
  1147.           in other programs), valid port range is now 0-126. COM-port
  1148.           number may be used instead of FOSSIL port number.
  1149.  
  1150.  
  1151.           v1.31 January 22, 1996
  1152.  
  1153.           The time limit of 30 days after installation has been removed.
  1154.           ADF will not stop executing after 30 days as before, it will run
  1155.           for ever, even if it is never registered.
  1156.  
  1157.  
  1158.           v1.32 February 9, 1996
  1159.  
  1160.           Bugfix of External Application, such as Video FOSSIL.
  1161.  
  1162.  
  1163.           v1.40 March 23, 1996
  1164.  
  1165.           Bugfix when input buffer was purged the RTS signal was not
  1166.           restored (activated, made high) if it had been lowered due to
  1167.           flow control. Receiver flow control hold and continue levels may
  1168.           now be specified on the command line. Improved block read and
  1169.           write (function 18H and 19H) for higher speed. ADFTest uses ATE1
  1170.           to test block read/write with more characters. User settings of
  1171.           line and modem control registers. Included support for 16650.
  1172.           REGISTER.EXE v1.20 needed to register. Documentation improved.
  1173.  
  1174.  
  1175.           v1.41 July 17, 1996
  1176.  
  1177.           Changed the reboot method. User may specify watchdog time out,
  1178.           default changed to 60 seconds. Documentation improved.
  1179.  
  1180.  
  1181.           v1.42 November 3, 1996
  1182.  
  1183.  
  1184.  
  1185.  
  1186.           ─────────────────────────────────────────────────────────────────
  1187.           Scandinavian Digital Systems                              Page 20           AnDan Software FOSSIL Version 1.44                   Users Manual
  1188.           ─────────────────────────────────────────────────────────────────
  1189.  
  1190.  
  1191.           The FOSSIL is now always kept alive, it is never actually closed,
  1192.           until ADF is unloaded. Applications, including the DOS devices
  1193.           COM1: and COM2:, that uses the BIOS serial communication
  1194.           functions, will because of this now use the FOSSIL functions when
  1195.           ADF is loaded. AnDan Software is now on the WWW at
  1196.           http://www.digsys.se. The chapter about benchmarks has been
  1197.           removed, because some users misunderstand its purpose. Does not
  1198.           touch 16650 register if not 16650 has been set on command line,
  1199.           else Windows may crash. The internal size of receive and transmit
  1200.           buffers adjusted so the reported sizes will be equal to the sizes
  1201.           on the command line. Due to behavior in Windows 95 when ADF is
  1202.           loaded in AUTOEXEC.BAT (not recommended), the Priority Interrupt
  1203.           Controller enable bits are toggled on initialization calls to the
  1204.           FOSSIL. Included support for 16750. ADFComCh has new ERRORLEVELs.
  1205.  
  1206.  
  1207.           v1.43 March 9, 1997
  1208.  
  1209.           reg@digsys.se has replaced reg@andan.edv.se as the registration
  1210.           e-mail address.
  1211.  
  1212.  
  1213.           v1.44 January 12, 1998
  1214.  
  1215.           The FidoNet address 2:203/620 is no longer valid, and has been
  1216.           removed from the programs and documentation. REGISTER.EXE v1.30
  1217.           needed to register.
  1218.  
  1219.  
  1220.           16 Future versions
  1221.  
  1222.           As long as people keep registering and using ADF, we will
  1223.           continue to make new versions, to improve ADF and to support
  1224.           future UARTs and environments to come.
  1225.  
  1226.           On demand from many users, enhanced and fast communication
  1227.           drivers for Windows 95 and OS/2, with support of DOS FOSSIL
  1228.           applications, will probably be developed in the near future.
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.           ─────────────────────────────────────────────────────────────────
  1248.           Scandinavian Digital Systems                              Page 21
  1249.