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