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