home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / BASIC / QBSER21.ZIP / QBSERIAL.DOC < prev    next >
Encoding:
Text File  |  1992-02-09  |  30.8 KB  |  673 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                                  QBserial version 2.10
  7.  
  8.                   Serial I/O Routines for use with QuickBASIC & BC6/7
  9.  
  10.           This library will provide you with serial I/O communications
  11.           routines for use in QuickBASIC 4.x (with or without PDQ), and the
  12.           Microsoft Basic Compiler 7.x Professional Development System. No
  13.           longer are you forced to use the poor communications support
  14.           provided by QB.  This program will allow you to control 8250
  15.           (includes 16450) type communications ports at speeds of up to
  16.           115200 baud. Communication ports 1 - 4, and non-standard addresses
  17.           are supported. You will no longer have problems with the DTR
  18.           signal. DTR is left in the same state it was in when before you
  19.           called this driver, or it can be controlled by your program. The
  20.           serial driver includes XON/XOFF and CTS/RTS handshaking. Serial
  21.           input is interrupt driven, using any IRQ you specify (1 - 7), with
  22.           incoming XOFF flow control (if enabled), or RTS flow control (if
  23.           enabled) to prevent overrunning the input buffer. These are the
  24.           same serial I/O routines used in Sparkware's Qmail door, and the
  25.           User Database System Doors "Query Door" and "Upload Door".
  26.  
  27.           The driver was written with Microsoft's C, and compiled with
  28.           version 6.0a of that compiler. This driver is useable with
  29.           QuickBASIC version 4.x, and Basic Compiler 6.x & 7.x PDS. (With or
  30.           without PDQ). BC 1.x, QuickBASIC 2.x, and 3.x are not supported by
  31.           this driver. The reason is that versions of QuickBASIC prior to 4.0
  32.           do not support the extensive multi-language interface that QB4.x
  33.           has (via the DECLARE statement and Microsoft language extensions).
  34.           Throughout this manual QB will be used to refer to both QuickBASIC
  35.           and the Basic Compilers (6.x & 7.x PDS).
  36.  
  37.           Before the driver can be used, the following DECLARE statements
  38.           must be added to the beginning of your QB program:
  39.  
  40.           DECLARE SUB OpenComm CDECL ALIAS "_open_comm" (BYVAL Port%, BYVAL_
  41.                                IRQ%, BYVAL Wlen%, BYVAL Parity%, BYVAL Baud&,
  42.                                BYVAL HS%) 
  43.           DECLARE SUB CloseComm CDECL ALIAS "_close_comm" () 
  44.           DECLARE FUNCTION WriteChar% CDECL (BYVAL Ascii%) 
  45.           DECLARE FUNCTION ReadChar% CDECL () 
  46.           DECLARE SUB Transmit CDECL ALIAS "_transmit_string" (addr$) 
  47.           DECLARE FUNCTION DataWaiting% CDECL ALIAS "_data_waiting" () 
  48.           DECLARE SUB ClearInputBuffer CDECL ALIAS "_clear_input_buffer" () 
  49.           DECLARE SUB CarrierDetect CDECL ALIAS "_carrier_detect_flag"_
  50.                                     (BYVAL OnOff%) 
  51.           DECLARE FUNCTION CarrierLost% CDECL ALIAS "_carrier_state" ()
  52.           DECLARE SUB DTRcontrol CDECL ALIAS "_dtr" (BYVAL OnOff%)
  53.           DECLARE SUB RTScontrol CDECL ALIAS "_rts" (BYVAL OnOff%)
  54.           DECLARE FUNCTION DriverCopyright% CDECL ()
  55.  
  56.  
  57.  
  58.         QBSERIAL User Manual - V 2.10                              Page 1
  59.  
  60.  
  61.  
  62.           These declarations specify all the entry points into the serial
  63.           driver, They are in the include file QBSERIAL.DEC. DO NOT change
  64.           them or the driver may not function.
  65.  
  66.           Refer to the included sample programs SIMPLE.BAS & PCBDOOR.BAS,
  67.           they use most of the calls described below.
  68.  
  69.  
  70.  
  71.                                   Port Initialization
  72.  
  73.           OpenComm Port%, IRQ%, Wordlen%, Parity%, Baudrate&, HS%
  74.  
  75.           Port%     This is an integer value. If the specified port is 1 to
  76.                     4, the driver opens that port. If you specify the port as
  77.                     ZERO (0) the driver enters "LOCAL" mode. This allows you
  78.                     to call the driver with data, but the driver won't send
  79.                     anything. This is useful when working with "doors". if
  80.                     you specify the port as any other value, QBserial will
  81.                     use that as the base address for the port. This allows
  82.                     you to work with non-standard I/O addresses. Note however
  83.                     that if you open a non-standard port, you must specify an
  84.                     IRQ value of 1 to 7
  85.  
  86.           IRQ%      Specifies which interrupt to use with this port. If the
  87.                     value of IRQ% is ZERO (0), then the default IRQ values
  88.                     are used (COM1 & COM3 use IRQ4, COM2 & COM4 use IRQ3).
  89.                     This is what most applications will use. Specify an IRQ
  90.                     value of 1 through 7 when you want to use an IRQ value
  91.                     other than the default. Such as when you want to use IRQ7
  92.                     with COM3. NOTE: Be careful when choosing an IRQ value
  93.                     other than the default. Most machines use the other IRQ
  94.                     inputs for other machine functions such as the Hard drive
  95.                     and system clock. QBserial DOES NOT chain the interrupt,
  96.                     it takes it over entirely. If you choose an IRQ that is
  97.                     used for something already, your machine will most
  98.                     certainly operate improperly.
  99.  
  100.           Wordlen%  an integer specifying the word length of the serial data.
  101.                     It has a value of 7 or 8.
  102.  
  103.           Parity%   an integer, 0 = NONE, 1 = ODD, 2 = EVEN.
  104.  
  105.           BaudRate& is a LONG INTEGER representing the desired baud rate.
  106.                     Valid numbers are 0, 300, 1200, 2400, 4800, 9600, 19200,
  107.                     38400, 57600, and 115200. The value you send is NOT
  108.                     checked and I assume you could generate crazy baud rates
  109.                     if desired. 115200 is the absolute maximum rate that can
  110.                     be generated. If you specify a baud rate of ZERO then the
  111.                     serial port is used AS-IS. The rate, word length, &
  112.                     parity are NOT changed. This is useful for door operation
  113.  
  114.  
  115.         QBSERIAL User Manual - V 2.10                              Page 2
  116.  
  117.  
  118.  
  119.                     since the port is already initialized at the proper
  120.                     settings when you get control.
  121.  
  122.           HS%       an integer specifying the type of handshake you wish to
  123.                     use between the CPU and Modem (or destination device).
  124.                     Valid numbers are: 0 = NO handshake, 1 = XON/XOFF, 2 =
  125.                     CTS/RTS, 3 = XON/XOFF and CTS/RTS.
  126.  
  127.  
  128.                                      Serial Output
  129.  
  130.           To send a string of data out the serial port, you use the
  131.           "Transmit" call as follows:
  132.  
  133.                Temp$ = "Transmit this..."
  134.                Transmit Temp$
  135.  
  136.                     or
  137.  
  138.                Transmit "Send this also...."
  139.  
  140.           If you want to transmit single characters, you can use the
  141.           "WriteChar" function. Transmit calls WriteChar to send the actual
  142.           characters to the port. If you wish to use WriteChar, it has the
  143.           following format:
  144.  
  145.                Status% = WriteChar(Char%)
  146.  
  147.           Char% is the integer value of the character you want to send, it is
  148.           not a string. Status% is an integer returned by WriteChar, it is
  149.           NON-ZERO if the character was actually sent to the port, and ZERO
  150.           if the character was not sent. WriteChar will loop indefinitely on
  151.           CTS hold, XOFF hold, or Transmit Buffer Busy. These loops will exit
  152.           if carrier is lost in FULL or PARTIAL modes and return a ZERO
  153.           status%. WriteChar gives you more low level control of the sending
  154.           of characters, but you must send each character separately and
  155.           monitor its status.
  156.  
  157.           The Transmit function monitors the status of its calls to WriteChar
  158.           and triggers QuickBASIC's User Event trap (UEVENT) if a carrier
  159.           loss occurs in FULL mode. The UEVENT trap (FULL mode) is used by
  160.           default. You can disable the use of this event trap in the event
  161.           you already use the UEVENT trap for something else (PARTIAL mode).
  162.           Therefore, by default, carrier loss detection in your program is
  163.           done with the ON UEVENT GOSUB/UEVENT ON statements. The example
  164.           programs show the use of this method. By default UEVENT is also
  165.           used for catching carrier loss on keyboard input. this is described
  166.           below.
  167.  
  168.  
  169.  
  170.  
  171.  
  172.         QBSERIAL User Manual - V 2.10                              Page 3
  173.  
  174.  
  175.  
  176.                                       Serial Input
  177.  
  178.           Serial input is managed with three functions: DataWaiting,
  179.           ReadChar, & ClearInputBuffer. DataWaiting is used to test the input
  180.           buffer to see if any characters need to be read from it. ReadChar
  181.           is then called to get the characters. ClearInputBuffer flushes the
  182.           input buffer of any existing characters. Both example programs
  183.           contain a subroutine called "KeyboardInput" that demonstrates the
  184.           use of these calls. It also properly handles input from the local
  185.           and remote keyboards, and can be the routine you use in your
  186.           programs if you wish. Basically the procedure for reading the
  187.           remote keyboard (serial input) is as follows:
  188.  
  189.                IF DataWaiting THEN
  190.                     C$ = CHR$(ReadChar)
  191.                END IF
  192.  
  193.           The DataWaiting function also monitors the state of the carrier
  194.           detect signal and triggers, in FULL mode, the user event trap
  195.           (UEVENT) if carrier is lost. As you can see a singular trap routine
  196.           catches carrier loss on output as well as input. You will notice
  197.           that the "KeyboardInput" subroutine loops using DataWaiting, and as
  198.           such, carrier is constantly checked while waiting for input. If the
  199.           ReadChar function is called when no data is available (as indicated
  200.           by DataWaiting) a NULL character is returned.
  201.  
  202.           If XOFF/XON, CTS/RTS, or BOTH is enabled, then the serial buffer
  203.           will be protected from overfills. When the buffer reaches 75% of
  204.           capacity, an XOFF will be sent on the serial output or RTS will be
  205.           dropped. When the buffer empties out to 25% of capacity, an XON
  206.           will be sent or RTS raised. The capacity of the input buffer is
  207.           2048 bytes.
  208.  
  209.  
  210.                                  Carrier Detect Control
  211.  
  212.           There are three modes of carrier detection: Full, Partial, & None.
  213.           Each has it own distinct use for a particular purpose. The driver
  214.           defaults to FULL carrier detection unless you change it. The
  215.           following call is used to change control modes:
  216.  
  217.                CarrierDetect 0 [or] 1 [or] 2
  218.  
  219.           Specifying a TWO (2) sets carrier detection to FULL. This is the
  220.           default mode. When a loss of carrier occurs while transmitting,
  221.           polling for input data, or sitting in a wait loop (XOFF/XON or
  222.           CTS), the driver will return to the calling program and trip the
  223.           UEVENT flag. Tripping the UEVENT flag causes Basic to go to the
  224.           User Event trap routine (providing ON UEVENT GOSUB/UEVENT ON has
  225.           been set up in the user program). You should use this mode only if
  226.           you want to use the UEVENT trap for carrier loss detection. You
  227.           cannot transmit data (with the Transmit function) in this mode if
  228.  
  229.         QBSERIAL User Manual - V 2.10                              Page 4
  230.  
  231.  
  232.  
  233.           there is no carrier. You can send characters in this mode with the
  234.           WriteChar function.
  235.  
  236.           Specifying a ONE (1) sets carrier detection to PARTIAL. This mode
  237.           is similar to FULL with the exception that the UEVENT flag is not
  238.           tripped when carrier is lost. This mode should be used if UEVENT is
  239.           used for something else in your program, or you don't wish to
  240.           utilize UEVENT. 
  241.  
  242.           Specifying a ZERO (0) sets carrier detection to NONE. An example of
  243.           this mode would be where "plain Jane" serial I/O is required (such
  244.           as communicating with a "dumb" terminal). In this application there
  245.           are no modem handshake signals (3 wire EIA/RS-232). This mode can
  246.           also be used for talking to a modem when there is no carrier signal
  247.           present (such as dialing and initialization commands). The Transmit
  248.           and WriteChar routines will always transmit data in this mode with
  249.           or without carrier present. Carrier detection must be disabled in
  250.           this mode to prevent calls to Uevent and disable the no carrier
  251.           escape mechanisms built into the XON/XOFF loops. Important: if you
  252.           are using the XOFF/XON protocol in this mode and receive an XOFF
  253.           while transmitting, you will sit forever waiting for an XON. This
  254.           is a normal condition, with the exception that there is no escape
  255.           from this loop other than XON.
  256.  
  257.           Please note that there was an error in documentation in the
  258.           previous version (2.0). With CarrierDetect set to 1 (partial) data
  259.           WOULD NOT be sent if no carrier was present (I had said it would be
  260.           sent). You MUST use mode 0 if you wish to converse with a modem
  261.           that is not currently on-line (has no carrier). Once carrier is
  262.           detected, you would then switch to either mode 1 or 2.
  263.  
  264.                            Carrier Loss Detection by Polling
  265.  
  266.           As mentioned above, by default, the UEVENT trap is used to detect
  267.           when a loss of carrier occurs. There is also a function that allows
  268.           you to detect loss of carrier without using the UEVENT trap. While
  269.           I feel that using UEVENT is the simplest way to catch a carrier
  270.           loss in a program, it is possible that UEVENT might need to be used
  271.           by something else. This function is:
  272.  
  273.                X% = CarrierLost
  274.  
  275.           This function call allows to you to 'poll' for the state of
  276.           carrier. CarrierLost returns a NON-ZERO value when there is NO
  277.           carrier, and a ZERO when there IS carrier. CarrierLost is a real
  278.           time function, it returns the current carrier condition at the time
  279.           of the call. This allows you to code simple IF or DO loops to
  280.           detect loss:
  281.  
  282.                IF CarrierLost THEN
  283.                     ..process carrier loss
  284.                END IF
  285.  
  286.         QBSERIAL User Manual - V 2.10                              Page 5
  287.  
  288.  
  289.  
  290.  
  291.  
  292.                                   Program Termination
  293.  
  294.           Since "OpenComm" seizes an interrupt vector, this vector needs to
  295.           be restored BEFORE your program ends. If you neglect to restore
  296.           this vector, you could be risking a crash. The routine used to
  297.           reset the vector is: CloseComm. Only use CloseComm if you specified
  298.           a port value of 1, 2, 3, 4, or a non-standard port address in the
  299.           OpenComm call. If you specified a port value of ZERO (Local mode)
  300.           the interrupt vector is NOT grabbed, and does not need to be reset.
  301.           CloseComm also resets any UART registers to their original value.
  302.  
  303.  
  304.  
  305.                                Data Terminal Ready (DTR)
  306.  
  307.           Everybody that has used QuickBASIC's OPEN COMn statement is very
  308.           familiar with the problems of the DTR signal. Apparently Microsoft
  309.           felt that DTR would never be needed after a program terminates.
  310.           Anybody who has ever tried to write a door, or chain from one
  311.           program to another has cursed this decision at some time during
  312.           their programs development. This driver handles the DTR with a
  313.           different view. When you close the comm channel the DTR signal is
  314.           left in the same state it was when you opened the comm channel. For
  315.           door applications, this is a must. 
  316.  
  317.           A function call is provided however that allows your program to
  318.           control the DTR signal:
  319.  
  320.           DTRcontrol 1 [or] 0           ' 0 = DTR OFF, 1 = DTR ON
  321.  
  322.           Additionally when you use DTRcontrol to change the state of the DTR
  323.           signal it also instructs the driver to leave it this way when the
  324.           CloseComm function is called. Remember that the driver leaves DTR
  325.           the way it found it when OpenComm was called. If you used some
  326.           other method to change DTR after OpenComm was called, it would
  327.           automatically return to that original state when you called
  328.           CloseComm. Therefor only DTRcontrol should be used if you wish to
  329.           change the state of DTR.
  330.  
  331.                                  Request To Send (RTS)
  332.  
  333.           Request To Send (RTS) is a hardware flow control signal used to
  334.           tell the remote device to STOP sending data to us. Normally RTS is
  335.           set "on" and data will always flow (or the signal is ignored at the
  336.           remote end). With some communications programs RTS is used to
  337.           temporarily stop a modem from sending data while I/O is done to a
  338.           slow disk. This is especially true with high speed communications
  339.           where there is very little time between interrupts. This function
  340.           is independent of the automatic RTS flow control selected by
  341.           handshake 2 or 3 which tells the remote device to stop sending when
  342.  
  343.         QBSERIAL User Manual - V 2.10                              Page 6
  344.  
  345.  
  346.  
  347.           the input buffer is almost full. This function allows you to
  348.           manually control the state of RTS so you could, for instance, go
  349.           off and write the data somewhere without fear of loosing data.
  350.  
  351.           RTScontrol 1 [or] 0           ' 0 = RTS OFF, 1 = RTS ON
  352.  
  353.           When you use RTScontrol to change the state of the RTS signal it
  354.           also instructs the driver to leave it this way when the CloseComm
  355.           function is called. The driver leaves RTS the way it found it when
  356.           OpenComm was called. If you used some other method to change RTS
  357.           after OpenComm was called, it will automatically return to that
  358.           original state when you call CloseComm. Therefor only RTScontrol
  359.           should be used if you wish to change the state of RTS. This is
  360.           similar in the way DTRcontrol works.
  361.  
  362.                               Driver Version and Copyright
  363.  
  364.           A function is available to access the drivers version and copyright
  365.           string. This would be used if you wish to display in your final
  366.           product the version of QBserial that your are using, and/or my
  367.           copyright along with yours. In order to access the copyright
  368.           string, the following lines should be added to your Basic program:
  369.  
  370.                     X& = DriverCopyright
  371.                     WHILE (PEEK(X&))
  372.                          CP$ = CP$ + CHR$(PEEK(X&))
  373.                          X& = X& + 1
  374.                     WEND
  375.  
  376.           This places the version/copyright string into string variable CP$.
  377.           This string may now be handled in whatever method you choose.
  378.  
  379.  
  380.                                  Cresent's PDQ Library
  381.  
  382.           An object module for use with PDQ is also included. PDQ does not
  383.           support UEVENT, so all references to UEVENT in the text should be
  384.           ignored. You will need to do carrier checking by polling with the
  385.           CarrierLost function. If you use FULL mode and carrier is lost it
  386.           will operate the same way as PARTIAL mode. The only exception to
  387.           this is the Transmit function, which when in FULL mode, will not
  388.           transmit data.
  389.  
  390.           NOTE:     An additional note for PDQ users. Since PDQ replaces the
  391.                     Microsoft run time libraries, the public variable
  392.                     ACRTUSED is not satisfied during the link stage. A dummy
  393.                     stub file, ACRTUSED.OBJ is included with QBserial to
  394.                     prevent this error from occurring. The next paragraph
  395.                     explains the proper linking sequence.
  396.  
  397.  
  398.  
  399.  
  400.         QBSERIAL User Manual - V 2.10                              Page 7
  401.  
  402.  
  403.  
  404.                                         Linking
  405.  
  406.           Since object modules are provided for QB4.x, BC7, and PDQ, you will
  407.           need to select which one to use for your program. The file
  408.           QBSER.OBJ should be used for programs compiled with QuickBASIC,
  409.           BC7SER.OBJ is to be used for programs compiled with BC7 PDS, and
  410.           QBSERPDQ.OBJ is for PDQ users. Typical link command lines would
  411.           look like this: (Please note that your command lines will probably
  412.           be different if you use additional libraries to generate your code)
  413.  
  414.           Link yourprog qbser;               (For QuickBASIC)
  415.  
  416.           Link yourprog bc7ser;              (For BC7 PDS)
  417.  
  418.           Link yourprog qbserpdq acrtused;   (For PDQ)
  419.  
  420.  
  421.  
  422.                                     Quick Libraries
  423.  
  424.           If you wish to develop programs from within the environment, you
  425.           will first need to create a Quick library using one of the object
  426.           modules QBSER.OBJ, BC7SER.OBJ, or QBSERPDQ.OBJ. To create a Quick
  427.           lib for QuickBASIC 4.x, use the following Link command:
  428.  
  429.                Link QBSER,,,BQLB4x/q
  430.  
  431.           Where "BQLB4x" is one of the following: BQLB40.LIB, BQLB41.LIB, or
  432.           BQLB45.LIB. Use the one that came with your compiler. If you use
  433.           the wrong BQLB file you might get an "Invalid Format" error when
  434.           attempting to start QuickBASIC. QBSER.OBJ may also be added to
  435.           Quick Libraries containing other routines and OBJ's as well.
  436.  
  437.           To create a Quick Library for use within QBX (BC7's environment)
  438.           use the following link command (be sure to use Link v5.xx that came
  439.           with BC7):
  440.  
  441.                Link BC7SER,,,QBXQLB/q;
  442.  
  443.           For PDQ, use the method for QB4.x, since you will be using the
  444.           built in run time routines built into the environment. You ONLY use
  445.           QBSERPDQ.OBJ when you link the EXEcutable file.
  446.  
  447.           Remember too, that you can also add BC7SER.OBJ to Quicklibs
  448.           containing other routines.
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.         QBSERIAL User Manual - V 2.10                              Page 8
  458.  
  459.  
  460.  
  461.                                      Specifications
  462.  
  463.           The following port addresses and default interrupts are used:
  464.  
  465.                Comm      Base Address        IRQ (Default)
  466.  
  467.                 1          3F8 hex            4
  468.                 2          2F8 hex            3
  469.                 3          3E8 hex            4
  470.                 4          2E8 hex            3
  471.  
  472.           Please read the section explaining the OpenComm function for
  473.           information on how to use addresses or IRQ's other than the
  474.           defaults.
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.         QBSERIAL User Manual - V 2.10                              Page 9
  515.  
  516.  
  517.  
  518.                                 Registration and Support
  519.  
  520.           QBserial is distributed as shareware. You may copy and distribute
  521.           it freely. 
  522.  
  523.           QBserial is not free software, and requires registration. There are
  524.           two classes of registration which are dependant upon use:
  525.           Commercial and Non-Commercial.
  526.  
  527.           Registration of QBserial is $25 for non-commercial use. Non-
  528.           commercial uses are: Personal use, or use in another shareware
  529.           product such as doors and utilities where you allows others to try
  530.           the product first before buying and request a nominal registration
  531.           fee. Source code is available as an option for an additional $50.
  532.  
  533.           Registration of QBserial for commercial use is $75. Commercial uses
  534.           are: Inclusion of QBserial into ANY product that is to be sold for
  535.           profit, or any use of this program in a business environment. Any
  536.           program that must be paid for in advance before the product is
  537.           delivered, or use in a corporate environment fits this category.
  538.           Commercial registration includes the source code for QBserial in C
  539.           (Microsoft C), if desired.
  540.  
  541.           Please register your copy!
  542.  
  543.           Software and Shareware distribution houses may charge a nominal
  544.           distribution and copying fee not to exceed $5.00. They may not sell
  545.           this program outright or ask you for the registration fee directly,
  546.           they must inform you that registration is required by the author.
  547.  
  548.           If you have access to a BBS that is an ILINK mail network member,
  549.           you can reach me in the Basic conference. If you do not have ILINK
  550.           access anywhere nearby, then you can always contact me on the
  551.           SailBoard BBS at the number listed below. I would prefer if you
  552.           contact me directly on the SailBoard however, as ILINK isn't as
  553.           reliable as Id like, and I have missed messages. I'll do the best I
  554.           can to help if you have questions. Bugs will be tended to if
  555.           required, and good suggestions tend to be implemented.
  556.  
  557.  
  558.                                       Source Code
  559.  
  560.           The source code for QBserial is available. The source is available
  561.           by signing at the appropriate place on the registration form. The
  562.           source may be used for you own internal uses only. The source may
  563.           not be distributed by you to any other person, even if you make
  564.           changes to it. Nor can the resulting object code be sold or
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.         QBSERIAL User Manual - V 2.10                             Page 10
  572.  
  573.  
  574.  
  575.           distributed. Modifications can only be used in your end product,
  576.           and without any type of royalty. The source is available only after
  577.           you register QBserial. The license fee for the QBserial source code
  578.           is $50.00 for Non-Commercial users. Commercial users receive the
  579.           source as part of their registration fee if they desire it.
  580.  
  581.                                       Jeff Sumberg
  582.                                 Sysop(2) - SailBoard BBS
  583.                                 Wayne, NJ, 201-831-8152
  584.  
  585.                                         [ or ]
  586.  
  587.                                         Box 212
  588.                                   Ringwood, NJ, 07456
  589.  
  590.  
  591.  
  592.                                     Acknowledgments
  593.  
  594.           Thanks go out to Mark "Sparky" Herring for using these routines in
  595.           his highly successful Qmail door (versions 3 & 4).
  596.  
  597.           Thanks to Mark Wilson for some very good ideas in version 2.0.
  598.           Thanks to Michael Conley for finding a real time sensitive
  599.           interrupt problem.
  600.           Thanks to Jeffrey Morley (author of ZipLab) for testing.
  601.  
  602.  
  603.                                  Changes and Revisions
  604.  
  605.           06/09/89  1.0       Initial Release
  606.  
  607.           06/21/89  1.1       Added carrier detection control. Calling
  608.                               program can turn detection off and on as
  609.                               desired. Necessary if data sending/receiving
  610.                               required if carrier isn't present.
  611.  
  612.           09/01/89  1.2       Fixed a bug in Readchar where 'extended'
  613.                               characters (ASCII 128 to 255) were causing an
  614.                               Illegal Function Call in the CHR$() conversion
  615.                               (because they were being returned as negative
  616.                               numbers). Extended character may now be
  617.                               received properly. Added three new functions:
  618.                               CDtrap, CarrierLost, and DTRcontrol.
  619.  
  620.  
  621.           03/24/90  1.5       Added support for Basic Compiler 7.0 PDS and
  622.                               PDQ. Added sections to manual about Linking,
  623.                               Source code availability, and updated section
  624.                               on Quicklibs. Separate object files now
  625.                               supplied for QB, BC7, and PDQ.
  626.  
  627.  
  628.         QBSERIAL User Manual - V 2.10                             Page 11
  629.  
  630.  
  631.  
  632.           05/01/90  1.6       Oops! PDQ users found out fast that I forgot to
  633.                               compile the PDQ module with stack checking
  634.                               removed. I also forgot to include ACRTUSED.OBJ
  635.                               to satisfy linking requirements. Sorry 'bout
  636.                               that! Released only as beta to those that
  637.                               needed it.
  638.  
  639.           11/01/90  2.0       Added capability to specify non-standard port
  640.                               addresses and which IRQ to use when the port is
  641.                               opened. Removed CDtrap function. Created new
  642.                               carrier detection modes using the CarrierDetect
  643.                               function. (0 = NONE, 1 = PARTIAL, 2 = FULL).
  644.                               Also added DriverCopyright function to allow
  645.                               program access to the driver version.
  646.  
  647.           02/08/92  2.10      Added RTS flow control support. RTS will be
  648.                               used to control data coming in to QBserial when
  649.                               the handshake is set to 2 (CTS/RTS). Removed
  650.                               necessity for SERIAL.LIB library file by adding
  651.                               inline assembler that performed the routines
  652.                               that were previously included in that library.
  653.                               QBserial is now compiled with Microsoft C 6.0
  654.                               which will give smaller, faster, and more
  655.                               efficient code than QuickC could generate. This
  656.                               is especially true in the interrupt area. Added
  657.                               new function RTScontrol, to allow program to
  658.                               control RTS line directly. Increased size of
  659.                               input buffer from 1024 to 2048 bytes. Changed
  660.                               method in which interrupt controller mask bits
  661.                               were set & cleared. Corrected error found in
  662.                               documentation describing the function of
  663.                               CarrierDetect.
  664.  
  665.  
  666.                                       Future Plans
  667.  
  668.           I hope in the not to near future to be able to add support for
  669.           extended interrupts (IRQs 8-15). There have been several requests
  670.           for this already.
  671.  
  672.           I also hope to be able to add support for the 16550A buffered UART.
  673.           This would make high speed communications much more reliable.
  674.  
  675.           I would also like to do a version of QBserial that can use two comm
  676.           ports simultaneously.
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.         QBSERIAL User Manual - V 2.10                             Page 12