home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / LCOMMT.ZIP / LCTP.TXT < prev    next >
Encoding:
Text File  |  1988-10-06  |  113.9 KB  |  3,829 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                       OVERVIEW
  10.                                       OVERVIEW
  11.                                       ________
  12.  
  13.  
  14.             FEATURES
  15.             FEATURES
  16.             ________
  17.  
  18.  
  19.             The LiteComm-TP Toolbox(Tm) is a set of powerful routines
  20.             designed to provide easy access to the full capabilities of
  21.             the PC's asynchronous communications ports. In its initial
  22.             release, the LiteComm-TP ToolBox supports fully interrupt-
  23.             driven and buffered communications support on COM1 thru COM4
  24.             simultaneously. Now you can quickly incorporate
  25.             sophisticated communications support in your applications
  26.             without having in-depth knowledge of how the hardware
  27.             functions.
  28.  
  29.  
  30.             LiteComm-TP is implemented as a set of 4 units for the basic
  31.             product, with additional units providing the protocol-engine
  32.             capability.  The protocol engines are a part of the
  33.             registered version of the package.
  34.  
  35.  
  36.             The LiteComm ToolBox was originally developed in the C
  37.             language for use in CAD/CAM applications that required the
  38.             ability to have PC compatible systems communicating with a
  39.             variety of devices.  The introduction of version 4.0 of
  40.             Turbo PASCAL<> has made it possible for use to extend the
  41.             power and flexibility of the original LiteComm ToolBox(Tm)
  42.             to Turbo PASCAL programmers.
  43.  
  44.  
  45.  
  46.             THE SHAREWARE CONCEPT
  47.             THE SHAREWARE CONCEPT
  48.             _____________________
  49.  
  50.  
  51.             Shareware is a "try before you buy" means of software
  52.             distribution. If you find a shareware product useful, pay
  53.             the registration fee, and let the authors know that you
  54.             support their efforts.
  55.  
  56.  
  57.             Information Technology, Ltd., is a member of, and supports
  58.             the standards of, ASP, The Association of Shareware
  59.             Professionals.
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.                                        Page 1
  68.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  77.  
  78.  
  79.                          LICENSE, WARRANTY AND REGISTRATION
  80.                          LICENSE, WARRANTY AND REGISTRATION
  81.                          __________________________________
  82.  
  83.  
  84.             LICENSE
  85.             LICENSE
  86.             _______
  87.  
  88.  
  89.             The LiteComm-TP ToolBox, is distributed as a shareware
  90.             product. In its shareware form, support is limited to all
  91.             COM ports, but only at sppeds of 1200 baud and below.  To
  92.             receive the units that support the extended features of
  93.             LiteComm-TP and/or the source code for the product, register
  94.             your copy today. See the registration form at the end of
  95.             this manual.
  96.  
  97.  
  98.             Information Technology, Ltd, grants to registered users a
  99.             non-exclusive, perpetual license to the LiteComm-TP ToolBox,
  100.             subject to these terms and conditions:
  101.  
  102.  
  103.  
  104.                 1. You must treat your copy of the LiteComm-TP
  105.                    Toolbox as you would a book.  You may install
  106.                    the LiteComm-TP ToolBox on more than one
  107.                    machine, but you may use only one copy at a
  108.                    time.  If you desire, site licenses are
  109.                    available at a reduced cost.  You may make as
  110.                    many copies of the LiteComm-TP ToolBox as you
  111.                    require for the sole purpose of backup.
  112.  
  113.  
  114.                 2. You may incorporate portions of the LiteComm-TP
  115.                    ToolBox in products that you develop without the
  116.                    payment of additional royalties or license fees.
  117.                    You must include the statement 'Portions
  118.                    Copyright 1987, 1988, Information Technology,
  119.                    Ltd' in your product's documentation.
  120.  
  121.  
  122.                 3. You may copy and redistribute the shareware
  123.                    portion of the LiteComm-TP ToolBox, commonly
  124.                    known as LCOMMTP.ARC, but you may not modify in
  125.                    any way, the contents of the shareware package.
  126.                    Further, you may charge a fee for providing such
  127.                    a copy, beyond a maximum $8.00 copying or
  128.                    duplication fee, without the express, written
  129.                    consent of Information Technology, Ltd,
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.                                        Page 2
  138.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  147.  
  148.  
  149.                 4. You may not redistribute, in any form, the
  150.                    source code for the LiteComm-TP ToolBox.
  151.                    Further, you may not translate the source code
  152.                    for the LiteComm-TP ToolBox into any other
  153.                    language without the express, written consent of
  154.                    Information Technology, Ltd.
  155.  
  156.  
  157.                 5. Information Technology reserves the right to
  158.                    change both the LiteComm-TP ToolBox or its
  159.                    documentation without prior notice, with no
  160.                    obligation to you, the licensee.
  161.  
  162.  
  163.                 6. You agree that any disputes arising from this
  164.                    license will be subject to the laws of the state
  165.                    of Rhode Island.
  166.  
  167.  
  168.                 7. You agree to hold the developer and distributors
  169.                    of the LiteComm-TP ToolBox harmless for any
  170.                    damages, either direct or consequential, that
  171.                    might arise from the use of this product.
  172.  
  173.  
  174.                 8. You acknowledge that the LiteComm-TP ToolBox,
  175.                    libraries, source code, and documentation are
  176.                    the copyrighted property of Information
  177.                    Technology, Ltd.
  178.  
  179.  
  180.                 9. By your use of the LiteComm-TP ToolBox, you
  181.                    acknowledge that you have read, and understand
  182.                    the terms and conditions of this license.
  183.  
  184.  
  185.             WARRANTY
  186.             WARRANTY
  187.             ________
  188.  
  189.  
  190.             The LiteComm-TP ToolBox is distributed as-is and without
  191.             warranty, including, but not limited to, the implied
  192.             warranties of merchantability and fitness for a particular
  193.             purpose.
  194.  
  195.  
  196.             Information Technology, Ltd does warrant the distribution
  197.             media for a period of 30 days.  During that period,
  198.             Information Technology, Ltd will replace the distribution
  199.             media or provide a refund at its option.
  200.  
  201.  
  202.  
  203.  
  204.  
  205.                                        Page 3
  206.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  215.  
  216.  
  217.             REGISTERING YOUR COPY
  218.             REGISTERING YOUR COPY
  219.             _____________________
  220.  
  221.             Registration of your copy of the LiteComm-TP ToolBox
  222.             provides you with several benefits:
  223.  
  224.  
  225.                 1. Puts you on our mailing list for low-cost
  226.                    updates, enhancements, and alert bulletins when
  227.                    they occur.
  228.  
  229.  
  230.                 2. Gives you access to telephone support. Sorry,
  231.                    but we cannot provide support by telephone to
  232.                    unregistered user's of the ToolBox. Unregistered
  233.                    users can leave EMAIL on Compuserve to
  234.                    70166,1152; on GEnie to I.TECH; and on DELPHI to
  235.                    RBMACE. We will respond to EMAIL on an as-
  236.                    available basis.
  237.  
  238.  
  239.                 3.Helps to further the shareware concept.
  240.  
  241.             To register your copy, use the form at the end of this
  242.             documentation. You may also register on-line through
  243.             Compuserve, GEnie, or DELPHI, using EMAIL.
  244.  
  245.  
  246.  
  247.             NOTE
  248.             NOTE
  249.             ____
  250.  
  251.             LiteComm-TP is a package undergoing continuing development.
  252.             Registered users of the product receive, in addition to the
  253.             fully-functional base package, units that provide protocol
  254.             engines supporting XModem, Windowed XModem, and YModem
  255.             protocols.
  256.  
  257.             We plan to follow these with similar engines for CompuServe
  258.             B, Telink, and other protocols. These engines, as they are
  259.             released, will only be made available to registered ToolBox
  260.             users. The shareware version, as enhanced but without the
  261.             protocol engines, will continue to be offered.
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.                                        Page 4
  276.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  285.  
  286.  
  287.                              COMMUNICATIONS AND THE PC
  288.                              COMMUNICATIONS AND THE PC
  289.                              _________________________
  290.  
  291.  
  292.             PC SHORTCOMINGS
  293.             PC SHORTCOMINGS
  294.             _______________
  295.  
  296.  
  297.             This section is intended as a mini-tutorial on
  298.             ______________________________________________
  299.             communications concepts. We encourage you to read it,
  300.             _____________________________________________________
  301.             although it is not strictly necessary to do so.
  302.             _______________________________________________
  303.  
  304.  
  305.             The IBM-PC, and its close compatibles, is a generally well
  306.             thought-out, flexible, and well-executed computer.
  307.             Unfortunately, not as much can be said for the thought which
  308.             was given to the software which is meant to provide access
  309.             to that hardware. One of the shortcomings which is most
  310.             noticeable is in the support, or rather lack of it, that is
  311.             provided to handle access to the serial port. Support for
  312.             the serial port is limited by the BIOS to polled mode only,
  313.             i.e. a program must interrogate the port on a regular basis
  314.             to avoid losing received characters, and to check to
  315.             determine whether or not the port is ready to send a
  316.             character. Not only is this mode of operation primitive; it
  317.             also tends to cause complications when attempting to perform
  318.             any but the simplest of tasks, at slow speeds.
  319.  
  320.  
  321.             A novice might think that the hardware, in some way, is the
  322.             limiting factor. In fact, everything that is needed,
  323.             hardware-wise, to support a more sophisticated method of
  324.             handling the serial port is already there. All that is
  325.             missing is the software follow-through. The LiteComm-TP
  326.             ToolBox provides this missing software.
  327.  
  328.  
  329.  
  330.             THE 8250 UART
  331.             THE 8250 UART
  332.             _____________
  333.  
  334.  
  335.             The term serial port comes from the fact that both incoming
  336.             and outgoing characters entering and leaving the port do so
  337.             in a bitwise fashion. When we send a character out the
  338.             serial port, the responsible circuitry sends out information
  339.             one bit at a time. When we receive a character, this
  340.             circuitry accepts the individual bits and reassembles them
  341.             into a recognizable character. These very complex operations
  342.             are performed automatically by the 8250 UART (Universal
  343.             Asynchronous Receiver-Transmitter).
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.                                        Page 5
  351.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  360.  
  361.  
  362.             The 8250 UART is a fully programmable device that permits
  363.             independent control of the various parameters that affect
  364.             serial communications, i.e. baud rate, parity, number of
  365.             data bits, and number of stop bits. The 8250 also optionally
  366.             supports four types of interrupts, error/break detection,
  367.             modem status change detection, transmitter ready, and
  368.             received character ready. The LiteComm-TP ToolBox fully
  369.             supports all four type of interrupts.
  370.  
  371.  
  372.             The term asynchronous implies that there is no absolute
  373.                      asynchronous                                  
  374.                      ____________                                  
  375.             timing associated with the transmission of information.
  376.             Instead, the clocking-in of the data bits is done by
  377.                          clocking-in                            
  378.                          ___________                            
  379.             counting the bits. The first bit sent or received is call
  380.             the start bit and signals the beginning of a new character.
  381.             The individual data bits follow the start bit which are
  382.             clocked out and in at the specified data rate, with the
  383.             least significant bit transferred first and the parity bit,
  384.             if present, transferred last. Finally one or more stop bits
  385.             follow, signalling the end of the character.
  386.  
  387.  
  388.             The 8250 UART takes care of all of the mechanics associated
  389.             with the process described in the preceding paragraph. The
  390.             UART will also detect and report error which may occur in
  391.             the process. For example, if the parity bit is incorrect,
  392.             the UART reports the fact. If too few or too many bits are
  393.             received, the UART will report a framing error or overrun
  394.             error respectively.
  395.  
  396.  
  397.             Since the transmission of information may depend on complex
  398.             interactions with another device, such as a modem or
  399.             computer, the 8250 can also report on the status of the
  400.             handshaking lines used to provide information about the
  401.             handshaking                                            
  402.             ___________                                            
  403.             status of the connection with the other device. These
  404.             signals are explained below.
  405.  
  406.                                 SIGNAL DESCRIPTIONS
  407.                                           
  408.                   CTS      Clear To Send   The other device will accept
  409.                                            a transmission.
  410.             
  411.                   DSR      Data Set Ready  The other device is enabled.
  412.             
  413.                   RI       Ring Indicator  Usually reserved for modems
  414.                                            only. The phone is ringing
  415.             
  416.                   DCD      Carrier Detect  Usually reserved for modems.
  417.                                            The other modem's
  418.                                             carrier signal was detected.
  419.  
  420.  
  421.  
  422.                                        Page 6
  423.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  432.  
  433.  
  434.             The units for the LiteComm-TP ToolBox contains the various
  435.             bit masks required for you to make use of the information
  436.             provided by the 8250 UART.
  437.  
  438.  
  439.  
  440.             TOOLBOX NOTES AND WARNINGS
  441.             TOOLBOX NOTES AND WARNINGS
  442.             __________________________
  443.  
  444.  
  445.             Before you can send or receive information on a serial port
  446.             using the ToolBox, you must use the open function to enable
  447.             the line. This function initializes the 8250 UART with the
  448.             correct parameters, and introduces the UART into the
  449.             interrupt structure of the PC. The ToolBox will detect, and
  450.             report, any errors that you may make in selecting the port
  451.             or specifying the initial parameters. The ToolBox cannot and
  452.             will not detect an attempt to open a non-existent serial
  453.             port.
  454.  
  455.  
  456.             The ToolBox interfaces directly with the interrupt structure
  457.             of the PC. It is critical that, before exiting a program
  458.             that has opened a serial port that the serial port is closed
  459.             with the close function. If you exit your program without
  460.             closing the port, you may cause your system to crash since
  461.             the interrupt vector for the port might point to a section
  462.             of memory that no longer contains the needed code to support
  463.             the interrupt.  As an alternative, Turbo PASCAL permits you
  464.             to install one or more exit handlers (see the PASCAL
  465.             reference).  You may use this approach to provide a safe
  466.             shutdown, but be follow carefully Borland's recommendations
  467.             about implementing exit handlers.
  468.  
  469.  
  470.             Failure of the open function can be the result of either
  471.             improper parameters to the open function, or insufficient
  472.             memory available to allocate the requested buffers and
  473.             related control structures for the port. Memory for the
  474.             transmit and receive buffers as well as the port control
  475.             block are allocated from the heap. It is your responsibility
  476.             to insure that adequate memory is available for this
  477.             purpose.
  478.  
  479.  
  480.             Unless you are very familiar with the interrupt structure of
  481.             the PC, do not attempt to manipulate the interrupt enable
  482.             flag outside of the ToolBox. The ToolBox sets and clears the
  483.             interrupt enable flag at appropriate times and assumes that
  484.             it has sole control over the flag.
  485.  
  486.  
  487.  
  488.  
  489.  
  490.                                        Page 7
  491.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  500.  
  501.  
  502.             Unless otherwise specified, all library functions have been
  503.             compiled with the default structure alignment, i.e. the
  504.             structure alignment switch has not been used in creating the
  505.             ToolBox library.
  506.  
  507.  
  508.  
  509.                                 LITECOMM-TP HISTORY
  510.                                 LITECOMM-TP HISTORY
  511.                                 ___________________
  512.  
  513.  
  514.             VERSION 1.0
  515.             VERSION 1.0
  516.             ___________
  517.  
  518.  
  519.             Version 1.0 is the first version of LiteComm-TP to be
  520.             offered to the general public, although there have been 2
  521.             Beta releases prior to Version 1.0 release.  Version 1.0 is
  522.             the functional equivalent of the original LiteComm ToolBox,
  523.             version 2.5. At present, Windowed XModem is still under
  524.             development
  525.  
  526.  
  527.  
  528.             VERSION 2.0
  529.             VERSION 2.0
  530.             ___________
  531.  
  532.  
  533.             Version 2.0 represent some major tuning to the heart of
  534.             LiteComm-TP, the kernel routines.  In version 2.0, the
  535.             kernel routines have been tightened and made more efficient,
  536.             resulting in improved reliability of LiteComm-TP at higher
  537.             baud rates than before.
  538.  
  539.  
  540.             In addition new functionality has been added in the support
  541.             of Break Detection.  The ModemStatus function has also been
  542.             enhanced to make it simpler to use.  Finally, with version
  543.             2.0, we have introduced support for the Windowed XModem
  544.             protocol, and we have also added additional support to the
  545.             existing engines in the nature of a user-written 'hook' that
  546.             permits a limited view of the engine in operation.
  547.  
  548.  
  549.             Finally, several minor bugs have been corrected that were
  550.             detected in version 1.o of the product.
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.                                        Page 8
  563.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  572.  
  573.  
  574.             VERSION 3.0
  575.             VERSION 3.0
  576.             ___________
  577.  
  578.  
  579.             Version 3 of LiteComm-TP is a departure from the precedent
  580.             established in previous version.  In versions 1 and 2,
  581.             LiteComm-TP was implemented strictly in Turbo-PASCAL.  The
  582.             advantages to a strictly high-level language implementation
  583.             are obvious...as is the drawback of speed.  In version 3.0,
  584.             the kernel interrupt handlers have been recoded in assembly
  585.             language.  In addition, version 3 contains some fundamental
  586.             function additions that will be of use to those attempting
  587.             to develop bulletin board systems.  In addition, we feel
  588.             that these routines will serve as a tutorial on how to
  589.             approach certain communications problems.
  590.  
  591.  
  592.             With version 3, we have also included interrupt chaining for
  593.             COM3 and COM4, that users of the C version of LiteComm have
  594.             enjoyed since version 2.
  595.  
  596.  
  597.             Note also that, with version 3, we have changed the
  598.             shareware distribution package.  The shareware package now
  599.             supports all COM ports, but only at speeds of 1200 baud or
  600.             less.
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.                                        Page 9
  631.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  640.  
  641.  
  642.                                     BEYOND COM2
  643.                                     BEYOND COM2
  644.                                     ___________
  645.  
  646.  
  647.             THE TOOLBOX METHODOLOGY
  648.             THE TOOLBOX METHODOLOGY
  649.             _______________________
  650.  
  651.  
  652.             In the design of the original PC, and in subsequent
  653.             variations such as the PC/AT, there were only provision for
  654.             two serial ports. Many manufacturers of add-in products,
  655.             both serial ports and internal modems have added the
  656.             capability to support 1 or more additional ports beyond the
  657.             COM2 limit. Generally, this can cause problems in the PC
  658.             since there is no room in the interrupt request scheme for
  659.             additional levels of interrupts, and there are no designated
  660.             interrupt vectors for other additional ports.
  661.  
  662.  
  663.             The ToolBox approach to resolving these issues is to permit
  664.             the programmer a degree of control over the parameters that
  665.             govern the interrupt mechanism for COM3 and COM4.
  666.             Specifically, these parameters are: 1) the interrupt request
  667.             (IRQ) bit that is used to mask the 8259 interrupt
  668.             controller; 2) the interrupt vector number (not address) to
  669.             which the port is attached; and 3) the base i/o register for
  670.             the port itself. Of course, it is assumed that the port is
  671.             based upon the 8250 UART or compatible device.
  672.  
  673.  
  674.             Before you attempt to use COM3 and/or COM4, you must
  675.             determine from the port's documentation, the appropriate
  676.             values for these three parameters. As distributed, the
  677.             ToolBox assumes the following:
  678.  
  679.             
  680.             
  681.                                      COM3         COM4
  682.                                      ____         ____
  683.             
  684.                         IRQ Bit      4            3
  685.                         Vector #     0Ch          0Bh
  686.                         Base Reg     3E8h         2E8h
  687.  
  688.             You may change any or all of these values by using the
  689.             PortChange function described below, but only before you
  690.             open the port with CommOpen. Once the port has been opened,
  691.             PortChange is ineffective, and PortChange will not work on
  692.             COM1 or COM2.
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.                                       Page 10
  702.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  711.  
  712.  
  713.             CAUTIONS
  714.             CAUTIONS
  715.             ________
  716.  
  717.  
  718.             There is an intimate relationship between the IRQ setting
  719.             and the interrupt vector to which it relates. In the PC,
  720.             this relationship is controlled, in part, by the 8259
  721.             interrupt controller that is set during BIOS initialization.
  722.  
  723.  
  724.             In brief, the BIOS settings for the PC (and most close
  725.             compatibles) establish IRQ0 as being vector number 08h, and
  726.             subsequent IRQ levels at increasing vector numbers. These
  727.             vector numbers (or types in INTEL terms) act as a cpu-
  728.             directed call table to locations in the lowest 1K of system
  729.             memory. We can alter how the system responds to a given
  730.             interrupt by replacing or changing the values in the
  731.             associated vector position to point to a routine which we
  732.             supply.
  733.  
  734.  
  735.             COM3 and COM4 share two critical parameters with COM1 and
  736.             COM2 respectively, the IRQ bit and the interrupt vector
  737.             number. If you intend to use COM1 with COM3 or COM2 with
  738.             COM4 simultaneously, you must change the BOTH the vector
  739.             number and the IRQ for COM3 or COM4 to an unused or un-
  740.             needed vector. The ability for your add-on ports to handle
  741.             such a change is highly hardware dependent, so check your
  742.             port's documentation carefully. Failure to do so will result
  743.             in loss of data at best, and a system lockup at worst.
  744.  
  745.  
  746.             Judging from the questions asked by some users of LiteComm-
  747.             TP, there is evidently some mis-understanding about using
  748.             ports beyond COM2, and how this all relates to your
  749.             hardware. Before you can successfully use COM3 or COM4, you
  750.             must consider the following:
  751.  
  752.  
  753.  
  754.                 1. Does the hardware permit a change to the base
  755.                    port and/or the interrupt vector to which the
  756.                    port responds.  Some expansion cards will
  757.                    support changing one and not the other, giving
  758.                    rise to potential hardware conflicts and lost
  759.                    data.
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.                                       Page 11
  770.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  779.  
  780.  
  781.                 2. Does the hardware permit  re-assignment of the
  782.                    IRQ priority. Some expansion cards permit you to
  783.                    alter the IRQ priority, some won't. Suffice it
  784.                    to say from the previous discussion the any
  785.                    change to the IRQ priority must allow a
  786.                    corresponding change to the interrupt vector
  787.                    number. Without this capability, reprogramming
  788.                    of the 8259 chip would be required.
  789.  
  790.  
  791.                 3. In fact, many add-on cards permit this dual
  792.                    change simply by making a single switch or
  793.                    jumper setting. Unfortunately, the documentation
  794.                    for these cards  generally assume that you are
  795.                    aware of the dual nature of the IRQ vector
  796.                    relationship, and may leave you with the
  797.                    impression that you are changing one and not the
  798.                    other. In most circumstances, this is not the
  799.                    case.
  800.  
  801.             The point to all of this is that LiteComm-TP can only
  802.             provide as much support as the hardware permits, or is
  803.             capable of responding to. If you wish to use other than the
  804.             default base port, interrupt vector, or irq priority for
  805.             COM3 or COM4, then your expansion card must be capable of
  806.             supporting the new values; in other words, these values are
  807.             all hardware-provided, and are recognized by the LiteComm-TP
  808.             software. If your hardware does not permit changing a value,
  809.             LiteComm-TP cannot improve the situation.
  810.  
  811.  
  812.             We should, at this point, add one final caution about how
  813.             interrupt priorities function, and their relationship to the
  814.             irq bit the you may select. The standard PC permits 8
  815.             interrupt priority levels, with the programmable timer
  816.             having the highest priority, and the parallel printer port
  817.             having the lowest priority. When an interrupt occurs, the
  818.             interrupt controller (8259 chip) masks out all other
  819.             interrupts from the priority of the interrupting device and
  820.             all lower priority devices.
  821.  
  822.  
  823.             As an aid to making COM3 and COM4 "fit", LiteComm-TP
  824.             supports  interrupt chaining for the COM3 and COM4 ports. If
  825.             you use COM3 or COM4, when an interrupt occurs, the kernel
  826.             will attempt to determine if the interrupt was caused by the
  827.             supported port or from some other source.
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.                                       Page 12
  836.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  845.  
  846.  
  847.             If the kernel determines that the supported port did not
  848.             cause the interrupt, an automatic chain to the original
  849.             interrupt handler for that interrupt level (IRQ level) will
  850.             take place, allowing you to "patch in" or share the
  851.             available interrupt vectors.
  852.  
  853.  
  854.             If you intend to use other than the provided defaults, be
  855.             sure that you understand the interrupt mechanism. The use of
  856.             the automatic chaining described above can be particularly
  857.             troublesome under some circumstances, resulting in loss of
  858.             interrupts and, potentially, a system crash.
  859.  
  860.  
  861.  
  862.                                   PACKAGE CONTENTS
  863.                                   PACKAGE CONTENTS
  864.                                   ________________
  865.  
  866.             Your distribution diskette contains several files that are
  867.             important to you. All distribution diskettes, at a minimum,
  868.             include the following files in the diskette's root
  869.             directory:
  870.  
  871.             
  872.                         PSERIAL.NUM       SERIAL NUMBER OF THIS COPY
  873.                         READ.ME           LATEST INFORMATION ABOUT
  874.                                           LITECOMM-TP
  875.             
  876.                         LTCOMM.ARC        SHAREWARE VERSION AND
  877.                                           DOCUMENTATION FILES
  878.             
  879.                         LTUNITS.ARC       FULLY FUNCTIONAL UNIT FILES
  880.             
  881.             If you registered for the source code modules, the diskette
  882.             contains 2 additional source code archives.
  883.             
  884.             
  885.                         LITECOMM-TP SOURCE CODE     LTSRC.ARC
  886.             
  887.                         XMODEM ENGINE SOURCE CODE   LTXMSRC.ARC
  888.             
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.                                       Page 13
  904.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  913.  
  914.  
  915.             INSTALLATION INSTRUCTIONS
  916.             INSTALLATION INSTRUCTIONS
  917.             _________________________
  918.  
  919.  
  920.             In the following discussion, we assume that your regular
  921.             ________________________________________________________
  922.             unit files are contained in a directory called \TP.
  923.                                                            \TP 
  924.             ___________________________________________________
  925.  
  926.  
  927.             To install the unit files used with LiteComm-TP, perform the
  928.             following steps:
  929.  
  930.  
  931.  
  932.                 1. CD \TP
  933.  
  934.  
  935.                 2. ARC E A:LTUNITS
  936.  
  937.             Since Turbo PASCAL permits you the flexibility of having a
  938.             separate sub-directory for units, you should execute the
  939.             above instructions in whatever directory you use for units.
  940.  
  941.  
  942.             If you are installing only the units, this completes the
  943.             installation procedure. If you have registered for the
  944.             package's source code, we recommend that you create a
  945.             separate sub-directory.  The example below assumes that you
  946.             will use a directory named COMM to hold the LiteComm-TP and
  947.             XModem source code modules. To install the LiteComm-TP
  948.             source code, do the following:
  949.  
  950.  
  951.  
  952.                 1. MD \COMM
  953.  
  954.  
  955.                 2. CD \COMM
  956.  
  957.  
  958.                 3. ARC E A:LTSRC *.*
  959.  
  960.  
  961.                 4. ARC E A:LTXMSRC *.*
  962.  
  963.             We strongly urge that you use the recommended approach in
  964.             handling the source code to avoid naming conflicts that
  965.             might arise.
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.                                       Page 14
  975.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  984.  
  985.  
  986.                                    GENERAL NOTES
  987.                                    GENERAL NOTES
  988.                                    _____________
  989.  
  990.             In the discussion of the various functions which follow, you
  991.             should assume that any references to the 'port' variable
  992.             refer to a variable or constant that may take on a value of
  993.             from 1 to 4. No other values are acceptable, and will be
  994.             rejected.
  995.  
  996.  
  997.             While we feel that LiteComm-TP is written in the most
  998.             efficient way possible, commensurate with good programming
  999.             practice, we cannot be responsible for variations caused by
  1000.             hardware configurations or other factors beyond our control.
  1001.             LiteComm-TP has been tested, and is known to perform on, the
  1002.             IBM PC-AT and several compatible systems such as the Zenith
  1003.             and Wyse equivalents. LiteComm-TP has not been tested in
  1004.             environments in which other software, most significantly TSR
  1005.             (terminate and stay resident) modules exist. Some TSR
  1006.             programs that "steal" interrupts for their own purposes
  1007.             present an unfavorable environment to other programs that
  1008.             rely on the interrupt structure of the computer.
  1009.  
  1010.  
  1011.             Should you experience erratic behavior with LiteComm-TP in a
  1012.             TSR-type situation, try executing your application without
  1013.             the TSR module being present. If the problems you have
  1014.             experienced disappear, suspect the TSR module.
  1015.  
  1016.  
  1017.             Conversely, LiteComm-TP provides an excellent vehicle for
  1018.             supporting TSR programs that you may write. Since the
  1019.             package is fully reentrant, your only concern need be with
  1020.             those aspects of TSR programs are of normal concern, e.g.
  1021.             the non-reentrant nature of DOS. LiteComm-TP never uses DOS
  1022.             functions and may therefore be safely used in a TSR
  1023.             environment.
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.                                       Page 15
  1043.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1052.  
  1053.  
  1054.                           PROCEDURE AND FUNCTION REFERENCE
  1055.                           PROCEDURE AND FUNCTION REFERENCE
  1056.                           ________________________________
  1057.  
  1058.             In the following pages, we provide the detailed information
  1059.             about each of the available LiteComm-TP ToolBox functions
  1060.             and procedures.  Each definition includes, at a minimum, a
  1061.             summary of how the function or procedure is referenced, in
  1062.             which unit the function or procedure is found, a description
  1063.             of what the function or procedure does, and an indication of
  1064.             those values, if any, that might be returned.
  1065.  
  1066.  
  1067.             Where appropriate, we include additional documentation about
  1068.             the function.  Some definitions include examples, in the
  1069.             sense of code fragments illustrating the function's usage.
  1070.             More importantly, some definitions include additional notes
  1071.             and warnings as well as references to other functions within
  1072.             the package.
  1073.  
  1074.  
  1075.             We have made every effort to insure that the documentation
  1076.             of the functions is complete and accurate.  The style and
  1077.             manner of the documentation assumes that the reader is
  1078.             thoroughly familiar with the elements of C syntax and common
  1079.             conventions.
  1080.  
  1081.  
  1082.  
  1083.             UNIT USAGE
  1084.             UNIT USAGE
  1085.             __________
  1086.  
  1087.  
  1088.             To assist you in developing your own applications, you will
  1089.             need to know the following information.
  1090.  
  1091.  
  1092.                            Unit           Uses
  1093.             
  1094.                            LctKrnl        DOS
  1095.                            LctSupp        DOS, LctKrnl
  1096.                            LctHayes       DOS, LctSupp
  1097.                            LctBBs         DOS, CRT, LctKrnl, LctSupp
  1098.                            LcTimer        DOS *
  1099.                            LTXMKrnl       DOS, LctSupp, LcTimer *
  1100.                            LTXModem       DOS, LctSupp, LTXMKrnl
  1101.                                           LcTimer *
  1102.             
  1103.             * This unit part of registered version only.
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.                                       Page 16
  1113.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1122.  
  1123.  
  1124.            _______________________________________________________________
  1125.  
  1126.                  PortChange function               LctKrnl
  1127.                  PortChange function               LctKrnl
  1128.            _______________________________________________________________
  1129.  
  1130.  
  1131.             FUNCTION
  1132.             FUNCTION
  1133.             ________
  1134.  
  1135.             Changes one or more of the critical parameters for port COM3
  1136.             or COM4.
  1137.  
  1138.  
  1139.  
  1140.             DECLARATION
  1141.             DECLARATION
  1142.             ___________
  1143.  
  1144.                  Portchange(CPort:integer; NewBase:word; NewIrq,
  1145.                     NewVector:byte)
  1146.  
  1147.  
  1148.             RESULT TYPE
  1149.             RESULT TYPE
  1150.             ___________
  1151.  
  1152.                  boolean
  1153.  
  1154.  
  1155.  
  1156.             REMARKS
  1157.             REMARKS
  1158.             _______
  1159.  
  1160.  
  1161.             This function must be used before the port is opened to be
  1162.             effective. To leave any of the parameters at its default
  1163.             value, make the corresponding entry 0. Note that vector is a
  1164.             vector number, not an address or pointer.
  1165.  
  1166.  
  1167.             The irq parameter should not be taken to be the irq
  1168.             (interrupt request number), but rather the irq mask. For
  1169.             example, the correct value for irq4 is NOT 4, but a byte in
  1170.             which bit 4, using INTEL's bit numbering, is set to a value
  1171.             of 1. Thus, to use irq priority 4 as the irq for either COM3
  1172.             or COM4, you would specify $10 as the value of irq when
  1173.             calling PortChange.
  1174.  
  1175.  
  1176.             If you intend to change the default irq settings, you MUST
  1177.             also make a corresponding change to the vector number. See
  1178.             the preceding section about using COM3 and COM4 for
  1179.             additional details. Failure to follow this rule may make the
  1180.             port appear to be non-functional.
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.                                       Page 17
  1189.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1198.  
  1199.  
  1200.             The PortChange function does NOT check to determine that you
  1201.             have provided both an IRQ mask AND a new vector number.
  1202.  
  1203.  
  1204.             PortChange returns a value of TRUE if the change was
  1205.             successful, false otherwise.
  1206.  
  1207.  
  1208.  
  1209.             EXAMPLE
  1210.             EXAMPLE
  1211.             _______
  1212.  
  1213.                  Var
  1214.                     Newbase : word;
  1215.                     Newirq : byte;
  1216.                     NewVector : byte;
  1217.                     
  1218.                     Begin
  1219.                       Newbase := $03E8;
  1220.                       Newirq := $10;
  1221.                       NewVector := $0C;
  1222.                     
  1223.                       if PortChange(3, Newbase, Newirq, NewVector)
  1224.                     then
  1225.                       Writeln('Port 3 Changed')
  1226.                     else
  1227.                       Writeln('Error changing Port 3');
  1228.                     end;
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.                                       Page 18
  1257.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1266.  
  1267.  
  1268.            _______________________________________________________________
  1269.  
  1270.                  CommOpen function                 LctKrnl
  1271.                  CommOpen function                 LctKrnl
  1272.            _______________________________________________________________
  1273.  
  1274.  
  1275.             FUNCTION
  1276.             FUNCTION
  1277.             ________
  1278.  
  1279.             Prepares the specified port for use by the other functions
  1280.  
  1281.  
  1282.  
  1283.             DECLARATION
  1284.             DECLARATION
  1285.             ___________
  1286.  
  1287.                  CommOpen(CPort, Baud:integer; Parity:char;
  1288.                     Databits, Stopbits, InSize, OutSize:integer)
  1289.  
  1290.  
  1291.             RESULT TYPE
  1292.             RESULT TYPE
  1293.             ___________
  1294.  
  1295.                  boolean
  1296.  
  1297.  
  1298.  
  1299.             REMARKS
  1300.             REMARKS
  1301.             _______
  1302.  
  1303.             Opens the specified port for use and attaches an interrupt
  1304.             handler to DOS for the port. The function allocates buffers
  1305.             for input and output of the specified sizes, and sets the
  1306.             port to the parameters specified. The minimum value for
  1307.             InSize is 128; the minimum size for OutSize is 64. A port
  1308.             opened in this manner must be closed using CommClose before
  1309.             program termination to avoid the possibility of a system
  1310.             crash.
  1311.  
  1312.  
  1313.             CommOpen sets aside an additional 512 bytes per open port.
  1314.             This additional memory is used as the stack for the port's
  1315.             interrupt handler while interrupts are being processed.
  1316.             This approach help avoid the possiblity of stack overflows
  1317.             that might occur under some conditions.
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.                                       Page 19
  1333.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1342.  
  1343.  
  1344.             The parameters passed to the function are discrete values,
  1345.             and must be drawn from the following lists:
  1346.  
  1347.  
  1348.             Baud: any value that your communication equipment, e.g. your
  1349.             modem, will support.
  1350.             Parity: E, O, N, M, S
  1351.                  E - Even
  1352.                  O - Odd
  1353.                  N - None
  1354.                  M - Mark
  1355.                  S - Space
  1356.             Databits: 5, 6, 7, 8
  1357.             StopBits: 1, 2
  1358.  
  1359.  
  1360.             A return of TRUE indicates the port has been successfully
  1361.             opened and is ready for use.  A return of FALSE indicates an
  1362.             error occurred, either as the result of an invalid
  1363.             parameter, or insufficient heap space available to allocate
  1364.             the buffers and control structures for the port.
  1365.  
  1366.  
  1367.  
  1368.             EXAMPLE
  1369.             EXAMPLE
  1370.             _______
  1371.  
  1372.                  Var
  1373.                     Baud, Databits, Stopbits : integer;
  1374.                     Parity : char;
  1375.                     Insize, Outsize : integer;
  1376.                     
  1377.                     begin
  1378.                       Baud := 2400;
  1379.                       Parity := 'E';
  1380.                       Databits := 7;
  1381.                       Stopbits := 1;
  1382.                       Insize := 256;
  1383.                       Outsize := 256;
  1384.                     
  1385.                       if CommOpen(1, Baud, Parity, Databits,
  1386.                     Stopbits, Insize, Outsize) then
  1387.                            Writeln('COM1 available for use')
  1388.                       else
  1389.                            Writeln('Error opening COM1');
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.                                       Page 20
  1401.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1410.  
  1411.  
  1412.            _______________________________________________________________
  1413.            _______________________________________________________________
  1414.  
  1415.                CommClose procedure                           LctKrnl
  1416.                CommClose procedure                           LctKrnl
  1417.            _______________________________________________________________
  1418.            _______________________________________________________________
  1419.  
  1420.  
  1421.             FUNCTION
  1422.             FUNCTION
  1423.             ________
  1424.  
  1425.             Closes a port that has been opened by the CommOpen function
  1426.  
  1427.             DECLARATION
  1428.             DECLARATION
  1429.             ___________
  1430.  
  1431.             CommClose(CPort:integer)
  1432.  
  1433.  
  1434.  
  1435.             REMARKS
  1436.             REMARKS
  1437.             _______
  1438.  
  1439.             This function is the companion to CommOpen and, in effect,
  1440.             performs the opposite action. CommClose detaches the kernel
  1441.             interrupt handler from the port, and reconnects the previous
  1442.             interrupt handler. CommClose also release dynamically
  1443.             allocated memory used for buffering and control structures.
  1444.             Failure to call CommClose before terminating a program may
  1445.             result in unexplained system crashes or hangs.
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.                                       Page 21
  1477.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1486.  
  1487.  
  1488.            _______________________________________________________________
  1489.            _______________________________________________________________
  1490.  
  1491.                CommSetup function                            LctKrnl
  1492.                CommSetup function                            LctKrnl
  1493.            _______________________________________________________________
  1494.            _______________________________________________________________
  1495.  
  1496.  
  1497.             FUNCTION
  1498.             FUNCTION
  1499.             ________
  1500.  
  1501.             Provides the capability of changing the parameters for an
  1502.             open port, without breaking the connection or closing the
  1503.             port.
  1504.  
  1505.  
  1506.  
  1507.             DECLARATION
  1508.             DECLARATION
  1509.             ___________
  1510.  
  1511.             CommSetup(CPort, Baud:integer; Parity:char; Databits,
  1512.             Stopbits:integer)
  1513.  
  1514.  
  1515.  
  1516.             RESULT TYPE
  1517.             RESULT TYPE
  1518.             ___________
  1519.                  boolean
  1520.  
  1521.  
  1522.             REMARKS
  1523.             REMARKS
  1524.             _______
  1525.  
  1526.             The CommSetup function is a subset of the CommOpen function
  1527.             and the remarks made in the description of CommOpen apply.
  1528.             This function is useful if you wish to change the basic
  1529.             communication parameters of the specified port that has
  1530.             already been opened without CommClose'ing the port and
  1531.             breaking the connection.
  1532.  
  1533.  
  1534.  
  1535.             SEE ALSO
  1536.             SEE ALSO
  1537.             ________
  1538.  
  1539.                  CommOpen
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.                                       Page 22
  1557.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1566.  
  1567.  
  1568.            _______________________________________________________________
  1569.            _______________________________________________________________
  1570.  
  1571.                ValidatePort function                         LctKrnl
  1572.                ValidatePort function                         LctKrnl
  1573.            _______________________________________________________________
  1574.            _______________________________________________________________
  1575.  
  1576.  
  1577.             FUNCTION
  1578.             FUNCTION
  1579.             ________
  1580.  
  1581.             Verifies that the specified port has been opened and returns
  1582.             a pointer to the Communications Control Block for the port.
  1583.  
  1584.  
  1585.  
  1586.             DECLARATION
  1587.             DECLARATION
  1588.             ___________
  1589.  
  1590.             ValidatePort(CPort:integer)
  1591.  
  1592.  
  1593.  
  1594.             RESULT TYPE
  1595.             RESULT TYPE
  1596.             ___________
  1597.  
  1598.                  CCBPTR
  1599.  
  1600.  
  1601.  
  1602.             REMARKS
  1603.             REMARKS
  1604.             _______
  1605.  
  1606.             Used internally to validate that the port number specified
  1607.             is correct and has been opened with the CommOpen function.
  1608.             May be of use to you in writing certain applications that
  1609.             require access to the Communications Control Block.  The
  1610.             function returns a value of NIL if the specified port is
  1611.             incorrect or not open.
  1612.  
  1613.  
  1614.  
  1615.             EXAMPLE
  1616.             EXAMPLE
  1617.             _______
  1618.  
  1619.                  if ValidatePort(2) = NIL then
  1620.                       Writeln('The port has been opened')
  1621.                     else
  1622.                       Writeln('The port is nor presently open');
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.                                       Page 23
  1637.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1646.  
  1647.  
  1648.            _______________________________________________________________
  1649.            _______________________________________________________________
  1650.  
  1651.                BytesInInput function                         LctSupp
  1652.                BytesInInput function                         LctSupp
  1653.            _______________________________________________________________
  1654.            _______________________________________________________________
  1655.  
  1656.  
  1657.             FUNCTION
  1658.             FUNCTION
  1659.             ________
  1660.  
  1661.             Returns the number of characters currently available in the
  1662.             input buffer (BytesInInput) or the number of untransmitted
  1663.             characters in the output buffer (ByteInOutput).
  1664.  
  1665.  
  1666.  
  1667.             DECLARATION
  1668.             DECLARATION
  1669.             ___________
  1670.  
  1671.             BytesInInput(CPort:integer)
  1672.             BytesInOutput(CPort:integer)
  1673.  
  1674.  
  1675.  
  1676.             RESULT TYPE
  1677.             RESULT TYPE
  1678.             ___________
  1679.  
  1680.                  integer
  1681.  
  1682.  
  1683.  
  1684.             REMARKS
  1685.             REMARKS
  1686.             _______
  1687.  
  1688.             May be used to determine the number of characters currently
  1689.             in the input (BytesInInput) or output (BytesInOutput)
  1690.             buffers for the port. In the event of an error (bad port), a
  1691.             value of -1 is returned.
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.                                       Page 24
  1715.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1724.  
  1725.  
  1726.            _______________________________________________________________
  1727.            _______________________________________________________________
  1728.  
  1729.                ModemStatus function                          LctKrnl
  1730.                ModemStatus function                          LctKrnl
  1731.            _______________________________________________________________
  1732.            _______________________________________________________________
  1733.  
  1734.  
  1735.             FUNCTION
  1736.             FUNCTION
  1737.             ________
  1738.  
  1739.             Returns the last know status of the modem control lines for
  1740.             the specified port.
  1741.  
  1742.  
  1743.  
  1744.             DECLARATION
  1745.             DECLARATION
  1746.             ___________
  1747.  
  1748.             ModemStatus(CPort:integer)
  1749.  
  1750.  
  1751.  
  1752.             RESULT TYPE
  1753.             RESULT TYPE
  1754.             ___________
  1755.  
  1756.                  byte
  1757.  
  1758.  
  1759.  
  1760.             REMARKS
  1761.             REMARKS
  1762.             _______
  1763.  
  1764.             Use this function to determine the last known state of the
  1765.             modem-supplied handshake signals. These may be tested using
  1766.             the values included in the unit, using PASCAL's bitwise AND
  1767.             operator.  NOTE: The byte value returned can be viewed as
  1768.             consisting of two sub-fields, the current signal state
  1769.             (found in the high order 4 bits of the byte), and the signal
  1770.             change(DELTA) indicators(found in the low-order 4 bits of
  1771.             the byte).  Whenever this function is called, both subfields
  1772.             are returned, and represent the current state of the
  1773.             individual signals.  The DELTA settings may be all reset, if
  1774.             no signals have changed since the last call to the function.
  1775.             The signals which are tracked are CTS, DSR, RI, and DCD.
  1776.  
  1777.  
  1778.             To determine which signals, if any, have changed use the
  1779.             DeltaXXX bits returned. For example, if CTS has changed, the
  1780.             DeltaCTS bit will be set.  The actual CTS value (on or off)
  1781.             will be found in the CTS bit of the returned byte.
  1782.  
  1783.  
  1784.             In the event of an error, a byte of $00 is returned.
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.                                       Page 25
  1793.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1802.  
  1803.  
  1804.             HINT
  1805.             HINT
  1806.             ____
  1807.  
  1808.             Detecting a ringing phone (using the RI signal) can be
  1809.             tricky and timing dependent.  One nearly foolproof method
  1810.             that we have used is to examine the DeltaRI value, not the
  1811.             RI value.  The DeltaRI value is set and reset as the
  1812.             telephone starts and stops ringing.  The RI value is set and
  1813.             cleared independantly, and you may miss the fact that the
  1814.             phone is ringing if you don't examine the value at the right
  1815.             time.
  1816.  
  1817.  
  1818.  
  1819.             EXAMPLE
  1820.             EXAMPLE
  1821.             _______
  1822.  
  1823.                  Var
  1824.                     CStat : byte;
  1825.                     
  1826.                     begin
  1827.                       CStat := ModemStatus(1);
  1828.                       if CStat and DeltaCTS = DeltaCTS then
  1829.                         if CStat and CTS <> CTS then
  1830.                            Writeln('The connection is broken');
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.                                       Page 26
  1863.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1872.  
  1873.  
  1874.            _______________________________________________________________
  1875.            _______________________________________________________________
  1876.  
  1877.                BreakRecd function                            LctKrnl
  1878.                BreakRecd function                            LctKrnl
  1879.            _______________________________________________________________
  1880.            _______________________________________________________________
  1881.  
  1882.  
  1883.             FUNCTION
  1884.             FUNCTION
  1885.             ________
  1886.  
  1887.             Returns a value of true if a BREAK signal has been received
  1888.             from the serial port since that last call to the function.
  1889.  
  1890.  
  1891.  
  1892.             DECLARATION
  1893.             DECLARATION
  1894.             ___________
  1895.  
  1896.                  BreakRecd(CPort:integer);
  1897.  
  1898.  
  1899.  
  1900.             RESULT TYPE
  1901.             RESULT TYPE
  1902.             ___________
  1903.  
  1904.                  boolean;
  1905.  
  1906.  
  1907.  
  1908.             REMARKS
  1909.             REMARKS
  1910.             _______
  1911.  
  1912.             This function returns a value of TRUE if a BREAK character
  1913.             has been received since the last call to the function.
  1914.  
  1915.  
  1916.  
  1917.             EXAMPLE
  1918.             EXAMPLE
  1919.             _______
  1920.  
  1921.                       if BreakRecd(2) then
  1922.                         Writeln('Break Signal detected on Port 2');
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.                                       Page 27
  1943.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1952.  
  1953.  
  1954.            _______________________________________________________________
  1955.            _______________________________________________________________
  1956.  
  1957.                ErrorStatus function                          LctKrnl
  1958.                ErrorStatus function                          LctKrnl
  1959.            _______________________________________________________________
  1960.            _______________________________________________________________
  1961.  
  1962.  
  1963.             FUNCTION
  1964.             FUNCTION
  1965.             ________
  1966.  
  1967.             Return the last known error status for the specified port.
  1968.  
  1969.  
  1970.  
  1971.             DECLARATION
  1972.             DECLARATION
  1973.             ___________
  1974.  
  1975.             ErrorStatus(CPort:integer)
  1976.  
  1977.  
  1978.  
  1979.             RESULT TYPE
  1980.             RESULT TYPE
  1981.             ___________
  1982.  
  1983.                  byte
  1984.  
  1985.  
  1986.  
  1987.             REMARKS
  1988.             REMARKS
  1989.             _______
  1990.  
  1991.             Returns the last known state of the serial port's error
  1992.             status bits, encoded in a byte. These may be tested using
  1993.             the constants defined in the unit in conjunction with
  1994.             PASCAL's bitwise AND operator.  The applicable values that
  1995.             may be checked are OverRun, BadParity, and, BadFrame.  Break
  1996.             detection, i.e. the receipt of a BREAK character, is handled
  1997.             by the BreakRecd function(qv).  In the event of an error, a
  1998.             byte of $00 is returned.
  1999.  
  2000.  
  2001.             Once the error status bits have been read in this fashion,
  2002.             they are reset to $00, and will remain so until the next
  2003.             error occurs.  Since this process happens asynchronously, it
  2004.             is not possible for your application to determine which
  2005.             character created the error, only that the error occurred.
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.                                       Page 28
  2021.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2030.  
  2031.  
  2032.             EXAMPLE
  2033.             EXAMPLE
  2034.             _______
  2035.  
  2036.                  Var
  2037.                     EStat : byte;
  2038.                     
  2039.                     begin
  2040.                       EStat := ErrorStatus(2);
  2041.                       if EStat and OverRun = OverRun then
  2042.                         Writeln('Receive Character Over Run');
  2043.  
  2044.  
  2045.            _______________________________________________________________
  2046.            _______________________________________________________________
  2047.  
  2048.                SetModemSignals function                      LctKrnl
  2049.                SetModemSignals function                      LctKrnl
  2050.            _______________________________________________________________
  2051.            _______________________________________________________________
  2052.  
  2053.  
  2054.             FUNCTION
  2055.             FUNCTION
  2056.             ________
  2057.  
  2058.             Allows the programmer to set the individual modem control
  2059.             lines for the specified port.
  2060.  
  2061.  
  2062.  
  2063.             DECLARATION
  2064.             DECLARATION
  2065.             ___________
  2066.  
  2067.             SetModemSignals(CPort:integer; NewSet:byte)
  2068.  
  2069.  
  2070.  
  2071.             RESULT TYPE
  2072.             RESULT TYPE
  2073.             ___________
  2074.  
  2075.                  boolean
  2076.  
  2077.  
  2078.  
  2079.             REMARKS
  2080.             REMARKS
  2081.             _______
  2082.  
  2083.             Set one or more of the modem control signals. Because of the
  2084.             need to always have OUT2 set for interrupt support, the
  2085.             function always provides the correct setting for this bit.
  2086.  
  2087.  
  2088.             The value of NewSet is bitwise OR'ed with the current set of
  2089.             values to produce a new modem control setting.  The value of
  2090.             NewSet DOES NOT replace the current values. Use the
  2091.             constants supplied in the unit to obtain the correct values.
  2092.             These include DTR and RTS.
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.                                       Page 29
  2100.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2109.  
  2110.  
  2111.             EXAMPLE
  2112.             EXAMPLE
  2113.             _______
  2114.  
  2115.                  begin
  2116.                     if SetModemSignals(1, (DTR and RTS)) then
  2117.                       Writeln('Port is ready to transmit')
  2118.                     else
  2119.                       Writeln('Unable to set modem signals');
  2120.  
  2121.  
  2122.             SEE ALSO
  2123.             SEE ALSO
  2124.             ________
  2125.  
  2126.                  ClearModemSignals, FlipModemSignals
  2127.  
  2128.  
  2129.  
  2130.            _______________________________________________________________
  2131.            _______________________________________________________________
  2132.  
  2133.                ClearModemSignals function                    LctKrnl
  2134.                ClearModemSignals function                    LctKrnl
  2135.            _______________________________________________________________
  2136.            _______________________________________________________________
  2137.  
  2138.  
  2139.             FUNCTION
  2140.             FUNCTION
  2141.             ________
  2142.  
  2143.             Allows the programmer to clear (reset) the individual modem
  2144.             control lines for the specified port.
  2145.  
  2146.  
  2147.  
  2148.             DECLARATION
  2149.             DECLARATION
  2150.             ___________
  2151.  
  2152.             ClearModemSignals(CPort:integer; NewSet:byte)
  2153.  
  2154.  
  2155.  
  2156.             RESULT TYPE
  2157.             RESULT TYPE
  2158.             ___________
  2159.  
  2160.                  boolean
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.                                       Page 30
  2179.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2188.  
  2189.  
  2190.             REMARKS
  2191.             REMARKS
  2192.             _______
  2193.  
  2194.             Clears (resets) one or more of the modem control signals.
  2195.             Because of the need to always have OUT2 set for interrupt
  2196.             support, the function always provides the correct setting
  2197.             for this bit.
  2198.  
  2199.  
  2200.             The compliment of NewSet is bitwise AND'ed with the current
  2201.             set of values to produce a new modem control setting.  The
  2202.             value of NewSet DOES NOT replace the current values. Use the
  2203.             constants supplied in the unit to obtain the correct values.
  2204.             These include DTR and RTS.
  2205.  
  2206.  
  2207.  
  2208.             EXAMPLE
  2209.             EXAMPLE
  2210.             _______
  2211.  
  2212.                  begin
  2213.                     if ClearModemSignals(1,  RTS) then
  2214.                       Writeln('RTS for Port 1 has been dropped')
  2215.                     else
  2216.                       Writeln('Unable to clear RTS');
  2217.  
  2218.  
  2219.             SEE ALSO
  2220.             SEE ALSO
  2221.             ________
  2222.  
  2223.                  SetModemSignals, FlipModemSignals
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.                                       Page 31
  2251.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2260.  
  2261.  
  2262.            _______________________________________________________________
  2263.            _______________________________________________________________
  2264.  
  2265.                FlipModemSignals function                     LctKrnl
  2266.                FlipModemSignals function                     LctKrnl
  2267.            _______________________________________________________________
  2268.            _______________________________________________________________
  2269.  
  2270.  
  2271.             FUNCTION
  2272.             FUNCTION
  2273.             ________
  2274.  
  2275.             Allows the programmer to compliment(toggle) the individual
  2276.             modem control lines for the specified port.
  2277.  
  2278.  
  2279.  
  2280.             DECLARATION
  2281.             DECLARATION
  2282.             ___________
  2283.  
  2284.             FlipModemSignals(CPort:integer; NewSet:byte)
  2285.  
  2286.  
  2287.  
  2288.             RESULT TYPE
  2289.             RESULT TYPE
  2290.             ___________
  2291.  
  2292.                  boolean
  2293.  
  2294.  
  2295.  
  2296.             REMARKS
  2297.             REMARKS
  2298.             _______
  2299.  
  2300.             Complements(toggles) one or more of the modem control
  2301.             signals. Because of the need to always have OUT2 set for
  2302.             interrupt support, the function always provides the correct
  2303.             setting for this bit.
  2304.  
  2305.  
  2306.             The value of NewSet is bitwise XOR'ed with the current set
  2307.             of values to produce a new modem control setting.  The value
  2308.             of NewSet DOES NOT replace the current values. Use the
  2309.             constants supplied in the unit to obtain the correct values.
  2310.             These include DTR and RTS.
  2311.  
  2312.  
  2313.  
  2314.             EXAMPLE
  2315.             EXAMPLE
  2316.             _______
  2317.  
  2318.                  begin
  2319.                     if FlipModemSignals(1, RTS) then
  2320.                       Writeln('RTS for Port 1 has been changed')
  2321.                     else
  2322.                       Writeln('Unable to change RTS');
  2323.  
  2324.  
  2325.             SEE ALSO
  2326.             SEE ALSO
  2327.             ________
  2328.  
  2329.                  SetModemSignals, ClearModemSignals
  2330.  
  2331.  
  2332.                                       Page 32
  2333.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2342.  
  2343.  
  2344.            _______________________________________________________________
  2345.            _______________________________________________________________
  2346.  
  2347.                EnableXon function                            LctKrnl
  2348.                EnableXon function                            LctKrnl
  2349.            _______________________________________________________________
  2350.            _______________________________________________________________
  2351.  
  2352.  
  2353.             FUNCTION
  2354.             FUNCTION
  2355.             ________
  2356.  
  2357.             Enable or disable the semi-automatic flow control features
  2358.             of LiteComm-TP
  2359.  
  2360.  
  2361.  
  2362.             DECLARATION
  2363.             DECLARATION
  2364.             ___________
  2365.  
  2366.             EnableXon(CPort:integer; XonFlag:boolean)
  2367.  
  2368.  
  2369.  
  2370.             RESULT TYPE
  2371.             RESULT TYPE
  2372.             ___________
  2373.  
  2374.                  boolean;
  2375.  
  2376.  
  2377.  
  2378.             DESCRIPTION
  2379.             DESCRIPTION
  2380.             ___________
  2381.  
  2382.             If XonFlag is TRUE, turns on semi-automatic XON-XOFF flow
  2383.             control function. If XonFlag is FALSE (the default setting),
  2384.             automatic flow control is disabled. When enabled, the kernel
  2385.             will automatically transmit an XOFF if and when the input
  2386.             buffer is approximately 2/3 full and will automatically
  2387.             recognize an XOFF sent by the companion system. If the
  2388.             companion system transmits an XOFF, the kernel will refuse
  2389.             to send any characters until the condition is cleared.
  2390.  
  2391.  
  2392.             It is the programmer's responsibility to transmit XON when
  2393.             conditions permit. See the XoffSent function to tell if an
  2394.             automatic XOFF has been sent by the kernel. See the XoffRecd
  2395.             function to determine if the kernel has detected an XOFF.
  2396.  
  2397.  
  2398.             If you intended to implement a protocol that might include
  2399.             the XON-XOFF characters, be sure to disable the automatic
  2400.             flow control. Failure to do so may result in a system hang.
  2401.  
  2402.  
  2403.  
  2404.             SEE ALSO
  2405.             SEE ALSO
  2406.             ________
  2407.  
  2408.                  XoffRecd, XoffRecd
  2409.  
  2410.  
  2411.  
  2412.                                       Page 33
  2413.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2422.  
  2423.  
  2424.            _______________________________________________________________
  2425.            _______________________________________________________________
  2426.  
  2427.                XoffRecd function                             LctKrnl
  2428.                XoffRecd function                             LctKrnl
  2429.            _______________________________________________________________
  2430.            _______________________________________________________________
  2431.  
  2432.  
  2433.             FUNCTION
  2434.             FUNCTION
  2435.             ________
  2436.  
  2437.             Reports whether or not the kernel has detected an XOFF from
  2438.             the companion system
  2439.  
  2440.  
  2441.  
  2442.             DECLARATION
  2443.             DECLARATION
  2444.             ___________
  2445.  
  2446.             XoffRecd(CPort:integer)
  2447.  
  2448.  
  2449.  
  2450.             RESULT TYPE
  2451.             RESULT TYPE
  2452.             ___________
  2453.  
  2454.                  boolean
  2455.  
  2456.  
  2457.  
  2458.             REMARKS
  2459.             REMARKS
  2460.             _______
  2461.  
  2462.             Returns TRUE if an XOFF has been received, FALSE otherwise.
  2463.             If an XOFF has been received, the port's flag will be reset,
  2464.             and transmission to the companion system will be permitted.
  2465.             If an XON is received from the companion system, the port's
  2466.             flag will also be reset, permitting further transmissions to
  2467.             occur. Be aware that if the companion system never sends an
  2468.             XON after sending an XOFF, a possible race condition may
  2469.                                                   race              
  2470.                                                   ____              
  2471.             occur, resulting in a system hang.
  2472.  
  2473.  
  2474.  
  2475.             SEE ALSO
  2476.             SEE ALSO
  2477.             ________
  2478.  
  2479.                  EnableXon, XoffSent
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.                                       Page 34
  2495.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2504.  
  2505.  
  2506.            _______________________________________________________________
  2507.            _______________________________________________________________
  2508.  
  2509.                XoffSent function                             LctKrnl
  2510.                XoffSent function                             LctKrnl
  2511.            _______________________________________________________________
  2512.            _______________________________________________________________
  2513.  
  2514.  
  2515.             FUNCTION
  2516.             FUNCTION
  2517.             ________
  2518.  
  2519.             Reports whether or not the kernel has automatically sent an
  2520.             XOFF to the companion system.
  2521.  
  2522.  
  2523.  
  2524.             DECLARATION
  2525.             DECLARATION
  2526.             ___________
  2527.  
  2528.             XoffSent(CPort:integer)
  2529.  
  2530.  
  2531.  
  2532.             RESULT TYPE
  2533.             RESULT TYPE
  2534.             ___________
  2535.  
  2536.                  boolean
  2537.  
  2538.  
  2539.  
  2540.             REMARKS
  2541.             REMARKS
  2542.             _______
  2543.  
  2544.             Returns TRUE if the kernel has sent an XOFF to the companion
  2545.             system, FALSE otherwise. If an XOFF has been sent, the
  2546.             port's flag will be reset. You must send an XON character to
  2547.             the companion system to permit transmissions to proceed.
  2548.  
  2549.  
  2550.  
  2551.             SEE ALSO
  2552.             SEE ALSO
  2553.             ________
  2554.  
  2555.                  EnableXon, XoffRecd
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.                                       Page 35
  2575.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2584.  
  2585.  
  2586.            _______________________________________________________________
  2587.            _______________________________________________________________
  2588.  
  2589.                LctGet function                               LctSupp
  2590.                LctGet function                               LctSupp
  2591.            _______________________________________________________________
  2592.            _______________________________________________________________
  2593.  
  2594.  
  2595.             FUNCTION
  2596.             FUNCTION
  2597.             ________
  2598.  
  2599.             Returns an available character from the ports input buffer.
  2600.  
  2601.  
  2602.  
  2603.             DECLARATION
  2604.             DECLARATION
  2605.             ___________
  2606.  
  2607.             LctGet(CPort:integer; var Ch:byte)
  2608.  
  2609.  
  2610.  
  2611.             RESULT TYPE
  2612.             RESULT TYPE
  2613.             ___________
  2614.  
  2615.                  boolean
  2616.  
  2617.  
  2618.  
  2619.             REMARKS
  2620.             REMARKS
  2621.             _______
  2622.  
  2623.             Places the next available character in the input buffer for
  2624.             the port in Ch. The function returns a value of TRUE if
  2625.             there is a character available, FALSE if there is no
  2626.             character available or on an error.  The contents of Ch are
  2627.             undefined when the return is FALSE.
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.                                       Page 36
  2653.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2662.  
  2663.  
  2664.            _______________________________________________________________
  2665.            _______________________________________________________________
  2666.  
  2667.                LctPeek function                              LctSupp
  2668.                LctPeek function                              LctSupp
  2669.            _______________________________________________________________
  2670.            _______________________________________________________________
  2671.  
  2672.  
  2673.             FUNCTION
  2674.             FUNCTION
  2675.             ________
  2676.  
  2677.             Permits you to look at the next character in the ports input
  2678.             buffer without removing if from the buffer.
  2679.  
  2680.  
  2681.  
  2682.             DECLARATION
  2683.             DECLARATION
  2684.             ___________
  2685.  
  2686.             LctPeek(CPort:integer; var Ch:byte)
  2687.  
  2688.  
  2689.  
  2690.             RESULT TYPE
  2691.             RESULT TYPE
  2692.             ___________
  2693.  
  2694.                  boolean
  2695.  
  2696.  
  2697.  
  2698.             REMARKS
  2699.             REMARKS
  2700.             _______
  2701.  
  2702.             Places the next available character in the input buffer for
  2703.             the specified port into the Ch variable, but does not remove
  2704.             the character from the buffer. This allows the application
  2705.             to look-ahead by one character in a non-destructive fashion.
  2706.                look-ahead                                               
  2707.                __________                                               
  2708.             Returns FALSE if the port is not active, or if there are no
  2709.             characters in the port's buffer, TRUE otherwise. The
  2710.             contents of Ch are undefined when the result is FALSE
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.                                       Page 37
  2733.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2742.  
  2743.  
  2744.            _______________________________________________________________
  2745.            _______________________________________________________________
  2746.  
  2747.                LctPut function                               LctSupp
  2748.                LctPut function                               LctSupp
  2749.            _______________________________________________________________
  2750.            _______________________________________________________________
  2751.  
  2752.  
  2753.             FUNCTION
  2754.             FUNCTION
  2755.             ________
  2756.  
  2757.             Places a character in the port's transmit buffer to be sent
  2758.             when the port is ready.
  2759.  
  2760.  
  2761.  
  2762.             DECLARATION
  2763.             DECLARATION
  2764.             ___________
  2765.  
  2766.             LctPut(CPort:integer; Ch:byte)
  2767.  
  2768.  
  2769.  
  2770.             RESULT TYPE
  2771.             RESULT TYPE
  2772.             ___________
  2773.  
  2774.                  boolean
  2775.  
  2776.  
  2777.  
  2778.             REMARKS
  2779.             REMARKS
  2780.             _______
  2781.  
  2782.             Returns TRUE if successful. Note that this does not
  2783.             guarantee that the character has been sent, only that no
  2784.             errors were detected. Returns FALSE if the port is not
  2785.             active, or if there no room in the port's buffer.
  2786.  
  2787.  
  2788.  
  2789.  
  2790.  
  2791.  
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.                                       Page 38
  2811.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2820.  
  2821.  
  2822.            _______________________________________________________________
  2823.            _______________________________________________________________
  2824.  
  2825.                GetStream function                            LctSupp
  2826.                GetStream function                            LctSupp
  2827.            _______________________________________________________________
  2828.            _______________________________________________________________
  2829.  
  2830.  
  2831.             FUNCTION
  2832.             FUNCTION
  2833.             ________
  2834.  
  2835.             Gets a stream of N characters from the port's input buffer
  2836.  
  2837.  
  2838.  
  2839.             DECLARATION
  2840.             DECLARATION
  2841.             ___________
  2842.  
  2843.             GetStream(CPort:integer; var Buff; BCnt:integer)
  2844.  
  2845.  
  2846.  
  2847.             RESULT TYPE
  2848.             RESULT TYPE
  2849.             ___________
  2850.  
  2851.                  integer
  2852.  
  2853.  
  2854.  
  2855.             REMARKS
  2856.             REMARKS
  2857.             _______
  2858.  
  2859.             Reads a stream of, at most, BCnt characters from the serial
  2860.             port's input buffer into the Buff array. Returns the count
  2861.             of characters actually transferred, or -1 if an error
  2862.             occurs. NOTE that Buff is an array of characters or bytes,
  2863.             not a string, although you may treat a string variable like
  2864.             an array, as shown below.
  2865.  
  2866.  
  2867.  
  2868.             EXAMPLE
  2869.             EXAMPLE
  2870.             _______
  2871.  
  2872.                  Type
  2873.                     MaxStr = string[256];
  2874.                     
  2875.                     Var
  2876.                       StrBuff : MaxStr;
  2877.                       RecdLen : integer;
  2878.                     
  2879.                     begin
  2880.                       RecdLen := GetStream(2, StrBuff[1], 256);
  2881.                       if RecdLen <M=> 0 then     { error or no char
  2882.                     }
  2883.                         StrBuff[0] := 0
  2884.                       else
  2885.                         StrBuff[0] := Chr(RecdLen);
  2886.                     end;
  2887.  
  2888.  
  2889.  
  2890.                                       Page 39
  2891.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2900.  
  2901.  
  2902.            _______________________________________________________________
  2903.            _______________________________________________________________
  2904.  
  2905.                PutStream function                            LctSupp
  2906.                PutStream function                            LctSupp
  2907.            _______________________________________________________________
  2908.            _______________________________________________________________
  2909.  
  2910.  
  2911.             FUNCTION
  2912.             FUNCTION
  2913.             ________
  2914.  
  2915.             Places a stream of, at most, N characters in the port's
  2916.             transmit buffer.
  2917.  
  2918.  
  2919.  
  2920.             DECLARATION
  2921.             DECLARATION
  2922.             ___________
  2923.  
  2924.             PutStream(CPort:integer; var Buff; BCnt:integer)
  2925.  
  2926.  
  2927.  
  2928.             RESULT TYPE
  2929.             RESULT TYPE
  2930.             ___________
  2931.  
  2932.                  integer
  2933.  
  2934.  
  2935.  
  2936.             REMARKS
  2937.             REMARKS
  2938.             _______
  2939.  
  2940.             Buff is an array of character or byte, not a string,
  2941.             although it is possible to specify a string variable, using
  2942.             the same approach as outlined for the GetStream function.
  2943.             PutStream returns the number of characters actually placed
  2944.             into the buffer. Note that this does not guarantee that the
  2945.             characters have been sent. A value of 0 will be returned if
  2946.             any error occurs, or if there no room in the port's buffer.
  2947.  
  2948.  
  2949.  
  2950.             SEE ALSO
  2951.             SEE ALSO
  2952.             ________
  2953.  
  2954.                  PutStream
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.                                       Page 40
  2971.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.  
  2978.  
  2979.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2980.  
  2981.  
  2982.            _______________________________________________________________
  2983.            _______________________________________________________________
  2984.  
  2985.                Buffer Flushing functions                     LctSupp
  2986.                Buffer Flushing functions                     LctSupp
  2987.            _______________________________________________________________
  2988.            _______________________________________________________________
  2989.  
  2990.  
  2991.             FUNCTION
  2992.             FUNCTION
  2993.             ________
  2994.             Provides several high level buffer management functions to
  2995.             control the contents of the port's transmit and receive
  2996.             buffers
  2997.  
  2998.  
  2999.             DELCLARATION
  3000.             DELCLARATION
  3001.             ____________
  3002.  
  3003.             function PurgeTxBuff(CPort:integer)
  3004.             
  3005.             function PurgeRxBuff(CPort:integer)
  3006.             
  3007.             procedure FlushUntilMatch(CPort:integer; Ch:byte)
  3008.             
  3009.             procedure FlushNBytes(CPort:integer; N:integer);
  3010.  
  3011.  
  3012.  
  3013.             RESULT TYPE
  3014.             RESULT TYPE
  3015.             ___________
  3016.  
  3017.                  boolean for PurgeTxBuff, PurgeRxBuff
  3018.  
  3019.  
  3020.  
  3021.             REMARKS
  3022.             REMARKS
  3023.             _______
  3024.  
  3025.             The PurgeRxBuff and PurgeTxBuff functions remove all
  3026.             characters from the port's receive and transmit buffers
  3027.             respectively and discard them; untransmitted characters in
  3028.             the transmit buffer are NEVER sent; unprocessed characters
  3029.             in the receive buffer are lost.  Both functions return a
  3030.             value of TRUE if no errors were encountered, FALSE
  3031.             otherwise.  An empty buffer is NOT considered an error.
  3032.  
  3033.  
  3034.             The FlushUntilMatch procedure will continually dispose of
  3035.             received characters until the character Ch is received. The
  3036.             procedure will return when the character Ch is detected, or
  3037.             when there are no more characters in the port's input
  3038.             buffer.
  3039.  
  3040.  
  3041.             The FlushNBytes procedure removes, at most, N characters
  3042.             from the port's receive buffer.
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.                                       Page 41
  3049.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3058.  
  3059.  
  3060.            _______________________________________________________________
  3061.            _______________________________________________________________
  3062.  
  3063.                SendBreak function                            LctKrnl
  3064.                SendBreak function                            LctKrnl
  3065.            _______________________________________________________________
  3066.            _______________________________________________________________
  3067.  
  3068.  
  3069.             FUNCTION
  3070.             FUNCTION
  3071.             ________
  3072.  
  3073.             Send a true Break signal
  3074.  
  3075.  
  3076.  
  3077.             DECLARATION
  3078.             DECLARATION
  3079.             ___________
  3080.  
  3081.             SendBreak(CPort:integer)
  3082.  
  3083.  
  3084.  
  3085.             RESULT TYPE
  3086.             RESULT TYPE
  3087.             ___________
  3088.  
  3089.                  boolean
  3090.  
  3091.  
  3092.  
  3093.             REMARKS
  3094.             REMARKS
  3095.             _______
  3096.  
  3097.             SendBreak generates a BREAK signal using a particular
  3098.             characteristic of the 8250 UART to generate an accurate
  3099.             BREAK at any baud rate.  BREAKS generated in this manner are
  3100.             timed based upon the baud rate at which the 8250 is
  3101.             currently initialized.  This function may or may not work
  3102.             correctly with other than the actual 8250 UART.
  3103.  
  3104.  
  3105.             Returns TRUE if successful. Returns FALSE if an error is
  3106.             detected.
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.                                       Page 42
  3127.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3136.  
  3137.  
  3138.             BBS Functions
  3139.  
  3140.  
  3141.  
  3142.            _______________________________________________________________
  3143.            _______________________________________________________________
  3144.  
  3145.                CheckEvent Function                            LctBBS
  3146.                CheckEvent Function                            LctBBS
  3147.            _______________________________________________________________
  3148.            _______________________________________________________________
  3149.  
  3150.  
  3151.             FUNCTION
  3152.             FUNCTION
  3153.             ________
  3154.  
  3155.             Returns a value of TRUE is the Event Timer specified in the
  3156.             function call has not expired.  Returns a value of FALSE if
  3157.             the specified Event Timer has expired.
  3158.  
  3159.  
  3160.  
  3161.             DECLARATION
  3162.             DECLARATION
  3163.             ___________
  3164.  
  3165.             CheckEvent(EventVal : Event);
  3166.  
  3167.  
  3168.  
  3169.             RESULT TYPE
  3170.             RESULT TYPE
  3171.             ___________
  3172.  
  3173.                  boolean;
  3174.  
  3175.  
  3176.  
  3177.             REMARKS
  3178.             REMARKS
  3179.             _______
  3180.  
  3181.             The event timer specified by EventVal must have been set
  3182.             using the NewEvent function
  3183.  
  3184.  
  3185.  
  3186.             SEE ALSO
  3187.             SEE ALSO
  3188.             ________
  3189.  
  3190.             NewEvent
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198.  
  3199.  
  3200.  
  3201.  
  3202.  
  3203.  
  3204.  
  3205.                                       Page 43
  3206.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3207.  
  3208.  
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3215.  
  3216.  
  3217.            _______________________________________________________________
  3218.            _______________________________________________________________
  3219.  
  3220.                NewEvent Function                              LctBBS
  3221.                NewEvent Function                              LctBBS
  3222.            _______________________________________________________________
  3223.            _______________________________________________________________
  3224.  
  3225.  
  3226.             FUNCTION
  3227.             FUNCTION
  3228.             ________
  3229.  
  3230.             Initializes an event timer to a value suitable for use with
  3231.             CheckEvent.  The event timer created in this fashion can
  3232.             time events up to 32767 seconds in duration.
  3233.  
  3234.  
  3235.  
  3236.             DECLARATION
  3237.             DECLARATION
  3238.             ___________
  3239.  
  3240.             NewEvent(Seconds : integer);
  3241.  
  3242.  
  3243.  
  3244.             RESULT TYPE
  3245.             RESULT TYPE
  3246.             ___________
  3247.  
  3248.                  Event;
  3249.  
  3250.  
  3251.  
  3252.             REMARKS
  3253.             REMARKS
  3254.             _______
  3255.  
  3256.             When used in conjunction with CheckEvent, the event timer
  3257.             can be used to time events that span days, months or years.
  3258.             Actually, it should be termed a timeout timer, since
  3259.             CheckEvent checks to see if the period specified by Seconds
  3260.             has elapsed.
  3261.  
  3262.  
  3263.  
  3264.             EXAMPLE
  3265.             EXAMPLE
  3266.             _______
  3267.  
  3268.                  var
  3269.                     InputEvent : Event;
  3270.                     Ch : byte;
  3271.                     
  3272.                     begin
  3273.                       InputEvent := NewEvent(15);
  3274.                       while CheckEvent(InputEvent) do
  3275.                            if LctGet(Port, Ch) then
  3276.                                 exit;
  3277.                       WriteLn('No Input Received in 15 seconds');
  3278.                     end;
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.                                       Page 44
  3286.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3295.  
  3296.  
  3297.            _______________________________________________________________
  3298.            _______________________________________________________________
  3299.  
  3300.                CheckForCall Function                          LctBBS
  3301.                CheckForCall Function                          LctBBS
  3302.            _______________________________________________________________
  3303.            _______________________________________________________________
  3304.  
  3305.  
  3306.             FUNCTION
  3307.             FUNCTION
  3308.             ________
  3309.  
  3310.             'Listens' to the specified port to see if the telephone is
  3311.             ringing.  If the phone is ringing, waits for up to 30
  3312.             seconds for a successful connection to be established.
  3313.  
  3314.  
  3315.  
  3316.             DECLARATION
  3317.             DECLARATION
  3318.             ___________
  3319.  
  3320.             CheckForCall(CPort : integer);
  3321.  
  3322.  
  3323.  
  3324.             RESULT TYPE
  3325.             RESULT TYPE
  3326.             ___________
  3327.  
  3328.                  integer;
  3329.  
  3330.  
  3331.  
  3332.             REMARKS
  3333.             REMARKS
  3334.             _______
  3335.  
  3336.             This function will return a value of -1 if the phone is not
  3337.             ringing, or if the modem fails to respond to the call within
  3338.             the 30 second period allowed.  In all other cases the
  3339.             function returns the result code that was returned by the
  3340.             modem itself.  It is the programmer's responsibility to
  3341.             correctly recognize and react to the various codes. In the
  3342.             case of a failure of the modem to respond, this function
  3343.             will automatically attempt to disconnect and reset the
  3344.             modem.
  3345.  
  3346.  
  3347.             The function assumes that the modem has been present to use
  3348.             numeric result codes, and that the S0 register (number of
  3349.             rings before answering) has not been set to zero.  The
  3350.             function ResetModem sets the correct values to match these
  3351.             assumptions.  CAUTION - do not attempt to use this function
  3352.             on ports not connected to a modem.  The function examines
  3353.             the modem control status lines and may behave in a
  3354.             unpredictable fashion if not connected to a modem.
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.                                       Page 45
  3364.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3373.  
  3374.  
  3375.             EXAMPLE
  3376.             EXAMPLE
  3377.             _______
  3378.  
  3379.                  var
  3380.                     ModemResult : integer;
  3381.                     
  3382.                     begin
  3383.                       repeat
  3384.                            ModemResult := CheckForCall(CPort);
  3385.                            if ModemResult = -1 then
  3386.                                 Delay(1000);  (* settling time*)
  3387.                       until ModemResult <> -1;
  3388.                       Writeln('Modem reply to call was ',
  3389.                     ModemResult:2);
  3390.                     end;
  3391.  
  3392.  
  3393.             SEE ALSO
  3394.             SEE ALSO
  3395.             ________
  3396.  
  3397.             Disconnect, ResetModem
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.                                       Page 46
  3434.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3435.  
  3436.  
  3437.  
  3438.  
  3439.  
  3440.  
  3441.  
  3442.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3443.  
  3444.  
  3445.            _______________________________________________________________
  3446.            _______________________________________________________________
  3447.  
  3448.                Disconnect Procedure                           LctBBS
  3449.                Disconnect Procedure                           LctBBS
  3450.            _______________________________________________________________
  3451.            _______________________________________________________________
  3452.  
  3453.  
  3454.             FUNCTION
  3455.             FUNCTION
  3456.             ________
  3457.  
  3458.             Causes the modem to disconnect from the caller.
  3459.  
  3460.  
  3461.  
  3462.             DECLARATION
  3463.             DECLARATION
  3464.             ___________
  3465.  
  3466.             Disconnect(CPort : integer);
  3467.  
  3468.  
  3469.  
  3470.             REMARKS
  3471.             REMARKS
  3472.             _______
  3473.  
  3474.             Forceablly disconnects the modem by dropping the DTR (Data
  3475.             Terminal Ready) modem status signal for 1 second.  This
  3476.             action will cause most modems to drop carrier and force the
  3477.             phone on-hook.  Please not that if the modem has been
  3478.             optioned with DTR permanently set on or ignored, this
  3479.             procedure will have no effect.
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.  
  3506.  
  3507.  
  3508.  
  3509.                                       Page 47
  3510.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3511.  
  3512.  
  3513.  
  3514.  
  3515.  
  3516.  
  3517.  
  3518.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3519.  
  3520.  
  3521.            _______________________________________________________________
  3522.            _______________________________________________________________
  3523.  
  3524.                ResetModem Function                            LctBBS
  3525.                ResetModem Function                            LctBBS
  3526.            _______________________________________________________________
  3527.            _______________________________________________________________
  3528.  
  3529.  
  3530.             FUNCTION
  3531.             FUNCTION
  3532.             ________
  3533.  
  3534.             Returns the modem to a known set of parameters, suitable for
  3535.             use with the related functions in this unit.  See the typed
  3536.             constants MODEMSET0 thru MODEMSET2 in the interface portion
  3537.             of the unit.
  3538.  
  3539.  
  3540.  
  3541.             DECLARATION
  3542.             DECLARATION
  3543.             ___________
  3544.  
  3545.             ResetModem(CPort, : integer);
  3546.  
  3547.  
  3548.  
  3549.             RESULT TYPE
  3550.             RESULT TYPE
  3551.             ___________
  3552.  
  3553.                  integer;
  3554.  
  3555.  
  3556.  
  3557.             REMARKS
  3558.             REMARKS
  3559.             _______
  3560.  
  3561.             The modem is reset to a known state, including, but not
  3562.             limited to 1) answer on the first ring, 2) numeric result
  3563.             codes, 3) extended code set.  The function returns the
  3564.             result of the reset operation (a modem response code) or -1
  3565.             if the modem fails to respond.  This function and related
  3566.             functions are suitable for use only with HAYES-type modems.
  3567.             It is the programmer's responsibility to interpret the
  3568.             result code returned.
  3569.  
  3570.  
  3571.  
  3572.             SEE ALSO
  3573.             SEE ALSO
  3574.             ________
  3575.  
  3576.             GetModemReply
  3577.  
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.                                       Page 48
  3590.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.  
  3597.  
  3598.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3599.  
  3600.  
  3601.            _______________________________________________________________
  3602.            _______________________________________________________________
  3603.  
  3604.                GetModemReply Function                         LctBBS
  3605.                GetModemReply Function                         LctBBS
  3606.            _______________________________________________________________
  3607.            _______________________________________________________________
  3608.  
  3609.  
  3610.             FUNCTION
  3611.             FUNCTION
  3612.             ________
  3613.  
  3614.             Returns the modem's response to the last set of instructions
  3615.             that were issued to the modem, in numeric form.
  3616.  
  3617.  
  3618.  
  3619.             DECLARATION
  3620.             DECLARATION
  3621.             ___________
  3622.  
  3623.             GetModemReply(CPort : integer);
  3624.  
  3625.  
  3626.  
  3627.             RESULT TYPE
  3628.             RESULT TYPE
  3629.             ___________
  3630.  
  3631.                  integer;
  3632.  
  3633.  
  3634.  
  3635.             REMARKS
  3636.             REMARKS
  3637.             _______
  3638.  
  3639.             This function expects the modem to be returning numeric
  3640.             result codes (set ResetModem) of up to 2 digits.  The
  3641.             function will react to 2 digits returned or the first <CR>
  3642.             returned, whichever occurs first within a 1 second timeout
  3643.             period.  In the case that the modem does not respond in the
  3644.             timeout period, the function returns a value of -1.  In no
  3645.             case does the function attempt to evaluate the
  3646.             response...this is left to the programmer.
  3647.  
  3648.  
  3649.  
  3650.             SEE ALSO
  3651.             SEE ALSO
  3652.             ________
  3653.  
  3654.             ResetModem.
  3655.  
  3656.  
  3657.  
  3658.  
  3659.  
  3660.  
  3661.  
  3662.  
  3663.  
  3664.  
  3665.  
  3666.  
  3667.  
  3668.  
  3669.                                       Page 49
  3670.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3679.  
  3680.  
  3681.             
  3682.  
  3683.  
  3684.  
  3685.            _______________________________________________________________
  3686.            _______________________________________________________________
  3687.  
  3688.                HAYES MODEM FUNCTIONS                        LctHayes
  3689.                HAYES MODEM FUNCTIONS                        LctHayes
  3690.            _______________________________________________________________
  3691.            _______________________________________________________________
  3692.  
  3693.  
  3694.             FUNCTION
  3695.             FUNCTION
  3696.             ________
  3697.  
  3698.             Provides support for various aspects of modems the support
  3699.             the Hayes(Tm) command set.
  3700.  
  3701.  
  3702.  
  3703.             DECLARATIONS
  3704.             DECLARATIONS
  3705.             ____________
  3706.  
  3707.                  const
  3708.                       NUMRES = 0     { numeric result codes}
  3709.                       WRDRES = 1     { word result codes }
  3710.                       SPKOFF = 0     { speaker off }
  3711.                       SPKON  = 1     { speaker on until CD }
  3712.                       SPKSPC = 2     { speaker always on }
  3713.                       ONHK   = 0     { go on-hook (hang up) }
  3714.                       OFFHK  = 1     { go off-hook (lift receiver)
  3715.                     }
  3716.                       OFFHKS = 2     { go off-hook, don't close
  3717.                     relay }
  3718.                       BASIC  = 0     { basic result set }
  3719.                       EXSET1 = 1     { extended results, set 1 }
  3720.                       EXSET3 = 2     { extended results, set 3 }
  3721.                       EXSET4 = 3     { extended results, set 4 }
  3722.                     
  3723.  
  3724.                  type
  3725.                       TelNumStr = string[20];
  3726.                     
  3727.  
  3728.  
  3729.  
  3730.  
  3731.  
  3732.  
  3733.  
  3734.  
  3735.  
  3736.  
  3737.  
  3738.  
  3739.  
  3740.  
  3741.  
  3742.                                       Page 50
  3743.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3752.  
  3753.  
  3754.             procedure SetType(NType : byte)
  3755.             
  3756.             procedure SetSet(NSet : byte)
  3757.             
  3758.             function RetType : byte
  3759.             
  3760.             function RetSet : byte
  3761.             
  3762.             function ModemCodesOn(CPort : integer):boolean
  3763.             
  3764.             function ModemCodesOff(CPort : integer):boolean
  3765.             
  3766.             function ModemWordResponse(CPort : integer):boolean
  3767.             
  3768.             function ModemDigitResponse(CPort : integer):boolean
  3769.             
  3770.             function RepeatModemCommand(CPort : integer):boolean
  3771.             
  3772.             function ModemSpeaker(CPort : integer; Mode : byte):boolean
  3773.             
  3774.             function SetModemRegister(CPort, Reg, NValue : integer) :
  3775.             boolean
  3776.             
  3777.             function GetModemRegister(CPort, Reg, NValue : integer) :
  3778.             boolean
  3779.             
  3780.             function ModemHalfDuplex(CPort : integer) : boolean
  3781.             
  3782.             function ModemFullDuplex(CPort : integer) : boolean
  3783.             
  3784.             function ModemEchoCmd(CPort : integer) : boolean
  3785.             
  3786.             function ModemNoEchoCmd(CPort : integer) : boolean
  3787.             
  3788.             function ModemHookMode(CPort : integer; HMode : byte) :
  3789.             boolean
  3790.             
  3791.             function ModemCarrierOn(CPort : integer) : boolean
  3792.             
  3793.             function ModemCarrierOff(CPort : integer) : boolean
  3794.             
  3795.             function ModemWordResponse(CPort : integer):boolean
  3796.             
  3797.             function ModemDigitResponse(CPort : integer):boolean
  3798.             
  3799.             function RepeatModemCommand(CPort : integer):boolean
  3800.             
  3801.             function ModemSpeaker(CPort : integer; Mode : byte):boolean
  3802.             
  3803.             function SetModemRegister(CPort, Reg, NValue : integer) :
  3804.             boolean
  3805.             
  3806.  
  3807.  
  3808.                                       Page 51
  3809.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3818.  
  3819.  
  3820.             function GetModemRegister(CPort, Reg, NValue : integer) :
  3821.             boolean
  3822.             
  3823.             function ModemHalfDuplex(CPort : integer) : boolean
  3824.             
  3825.             function ModemFullDuplex(CPort : integer) : boolean
  3826.             
  3827.             function ModemEchoCmd(CPort : integer) : boolean
  3828.             
  3829.             function ModemNoEchoCmd(CPort : integer) : boolean
  3830.             
  3831.             function ModemHookMode(CPort : integer; HMode : byte) :
  3832.             boolean
  3833.             
  3834.             function ModemCarrierOn(CPort : integer) : boolean
  3835.             
  3836.             function ModemCarrierOff(CPort : integer) : boolean
  3837.             
  3838.             function ModemCodeSet(CPort : integer; NewSet : byte) :
  3839.             boolean
  3840.             
  3841.             function ModemPulse(CPort : integer) : boolean
  3842.             
  3843.             function ModemTone(CPort : integer) : boolean
  3844.             
  3845.             function ModemDial(CPort : integer; TelNo : TelNumStr) :
  3846.             boolean
  3847.  
  3848.  
  3849.  
  3850.             REMARKS
  3851.             REMARKS
  3852.             _______
  3853.  
  3854.             The ModemCodeSet function allows you to change the set of
  3855.             codes that are returned by the modem when an action is
  3856.             specified.
  3857.  
  3858.  
  3859.             ModemDial instructs the modem to dial the number contained
  3860.             in TelNo. Do not include the dialing (ATD) prefix, or the
  3861.             trailing <CR>. These are provided by the function. You may
  3862.             include non-numeric characters as the contents of TelNo are
  3863.             not checked. The dialing is done in the last known, pulse or
  3864.             tone, mode. If you use the Modempulse or ModemTone
  3865.             functions, then dialing will be done in the mode that was
  3866.             last correctly enabled. If you have not exercised these
  3867.             functions, then dialing occurs in the modems default or
  3868.             power-up mode.
  3869.  
  3870.  
  3871.             The ModemHalfDuplex and ModemFullDuplex functions place the
  3872.             modem into local echo and remote echo modes respectively.
  3873.  
  3874.  
  3875.  
  3876.                                       Page 52
  3877.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3886.  
  3887.  
  3888.             The GetModemRegister function requests that the modem return
  3889.             the current value of S-register Reg. Reg must be in the
  3890.             range 0 to 13. Use the GetStream, or similar function, to
  3891.             retrieve the modem's response. Specifying a register outside
  3892.             the 0 to 13 range will cause a return of FALSE.
  3893.  
  3894.  
  3895.             SetModemRegister is the companion to GetModemRegister, with
  3896.             the same restrictions. Sets the S-register Reg to the value
  3897.             contained in NValue. If NValue contains -1, then the
  3898.             register is reset to its default (power-up) value. The
  3899.             function checks the value to be certain that it is within
  3900.             the limits specified for the particular register, and
  3901.             returns a value of FALSE if the value is outside the
  3902.             predefined limits.
  3903.  
  3904.  
  3905.             ModemCarrierOff enables modem carrier detect, but disables
  3906.             the modems carrier signal. The ModemCarrierOn companion
  3907.             enables both carrier detect and the modems carrier signal.
  3908.             When ModemCarrierOff is used the modem will receive data but
  3909.             will be unable to send data.
  3910.  
  3911.  
  3912.             The ModemNoEchoCmd and ModemEchoCmd functions determine
  3913.             whether commands sent to the modem are echoed back to the
  3914.             sending program. With echo turned off, the modem will
  3915.             continue to accept commands, but will not try to redisplay
  3916.             the command's characters.
  3917.  
  3918.  
  3919.             ModemHookMode allows you to control the current status of
  3920.             the modem's telephone line connection. See your modem's
  3921.             documentation and the above constants for additional
  3922.             information.
  3923.  
  3924.  
  3925.             The ModemRepeatCommand function instructs the modem to
  3926.             repeat the last command sequence executed. Generally, this
  3927.             function is of greatest value in re-dialing numbers that are
  3928.             busy, although its use is not restricted to that.
  3929.  
  3930.  
  3931.             The way in which your modem responds to commands is
  3932.             determined, in part, by the ModemWordResponse and
  3933.             ModemDigitResponse functions. If you call ModemWordResponse,
  3934.             then modem responses use the English language response
  3935.             codes, e.g. CONNECT or OK. Calling ModemDigitResponse
  3936.             instructs the modem to respond with code numbers only from
  3937.             the currently selected response set, see the ModemCodeSet
  3938.             function above.
  3939.  
  3940.  
  3941.  
  3942.                                       Page 53
  3943.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3952.  
  3953.  
  3954.             You may use the functions ModemCodesOn and ModemCodesOff to
  3955.             specify whether you want your modem to send back response
  3956.             codes when it receives a command string. In a sense, these
  3957.             act as companions to the EchoCmd functions above.
  3958.  
  3959.  
  3960.             Use the ModemSpeaker function to control the modem's
  3961.             internal speaker, if it has one. See the above constants for
  3962.             the applicable codes.
  3963.  
  3964.  
  3965.             The RetSet and RetType functions return, respectively, the
  3966.             last known command set (ModemCodeSet) and last known result
  3967.             type (ModemWordResponse, ModemDigitResponse). The RetSet and
  3968.             RetType  functions are only of value when used in
  3969.             conjunction with the companion functions.
  3970.  
  3971.  
  3972.  
  3973.             GENERAL REMARKS
  3974.             GENERAL REMARKS
  3975.             _______________
  3976.  
  3977.             Several considerations are in order if you intend to use the
  3978.             Hayes ToolBox functions.
  3979.  
  3980.  
  3981.  
  3982.                 1. You are responsible for checking the return
  3983.                    codes from the modem once you have given modem a
  3984.                    command. To make the task easier, we suggest
  3985.                    that you turn OFF command echo (so that you
  3986.                    don't have to worry about separating commands
  3987.                    from responses) and turn ON numeric responses
  3988.                    (to make the interpretation of result codes
  3989.                    easier and faster).
  3990.  
  3991.  
  3992.                 2. Be sure that you allow  adequate time between
  3993.                    commands for the modem to process the command
  3994.                    and respond. Failure to observe this rule may
  3995.                    result in commands being misinterpreted or
  3996.                    "lost". You can monitor the number of characters
  3997.                    in the receive buffer to help you with the
  3998.                    timing. Or alternatively, check the response
  3999.                    after each command. The latter approach is more
  4000.                    in line with what we believe to be good
  4001.                    programming practice.
  4002.  
  4003.  
  4004.             RETURN VALUES
  4005.             RETURN VALUES
  4006.             _____________
  4007.  
  4008.             All functions return a value of FALSE if a port or other
  4009.             error is detected, TRUE otherwise.
  4010.  
  4011.  
  4012.                                       Page 54
  4013.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  4022.  
  4023.  
  4024.                            LITECOMM-TP REGISTRATION FORM
  4025.                            LITECOMM-TP REGISTRATION FORM
  4026.                            _____________________________
  4027.  
  4028.             Please complete the following information. Note that the
  4029.             prices below are for a single-use registration only. Please
  4030.             contact us directly for site licensing.
  4031.  
  4032.             Mail to:
  4033.                  Information Technology
  4034.                  PO Box 554
  4035.                  Coventry, RI 02816
  4036.                  Telephone Orders or Information (401) 826-2223
  4037.             
  4038.              SHIP TO:
  4039.              Name    ________________________________________
  4040.             
  4041.              Company ________________________________________
  4042.             
  4043.              Street  ________________________________________
  4044.             
  4045.                      ________________________________________
  4046.             
  4047.              City    ___________________  State __  Zip _____
  4048.             
  4049.              Telephone _______________________
  4050.             
  4051.             
  4052.                QTY     REGISTRATION TYPE   REGISTRATION FEE
  4053.             
  4054.                        LIBRARIES @ $25    
  4055.             
  4056.                        LIBRARIES AND
  4057.                        SOURCE  @ $50      
  4058.             [ ] Check here for 3.5" disks, add $1.00
  4059.             RI residents, Sales Tax 6%    
  4060.             
  4061.             
  4062.             Method of Payment (Check, Mastercard, Visa) _____________
  4063.             
  4064.                  Credit Card Number __________________________
  4065.             
  4066.                  Expiration Date __________________________
  4067.             
  4068.                  Name as it appears on card ___________________________
  4069.             
  4070.                  Signature for MC/VISA ________________________________
  4071.             
  4072.             All MasterCard/Visa orders must include a telephone number,
  4073.             
  4074.             We regret that we cannot accept COD orders
  4075.             (office use only)
  4076.                 Date Received ______________ Date Sent _____________
  4077.                 Version ______________ Serial Number _______________
  4078.  
  4079.  
  4080.                                       Page 55
  4081.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.  
  4100.  
  4101.  
  4102.  
  4103.  
  4104.  
  4105.  
  4106.  
  4107.  
  4108.  
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.  
  4124.  
  4125.  
  4126.  
  4127.  
  4128.  
  4129.  
  4130.  
  4131.  
  4132.  
  4133.  
  4134.  
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.                                       Page 56
  4147.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.  
  4155.      8250 5, 6, 7
  4156.                                               ResetModem   48
  4157.      8259 10
  4158.                                               RetSet  51
  4159.      Asynchronous   6
  4160.                                               RetType 51
  4161.      BIOS 5, 11
  4162.                                               SendBreak    42
  4163.      BREAK     27, 28, 42
  4164.                                               SetModemRegister  51
  4165.      BreakRecd 27
  4166.                                               SetModemSignals   29
  4167.      Buffer Flushing     41
  4168.                                               ValidatePort 23
  4169.      Buffers   7, 19
  4170.                                               XoffRecd     34
  4171.      COM3 10
  4172.                                               XoffSent     35
  4173.      COM4 10
  4174.                                             Handshake 25
  4175.      CommOpen  10
  4176.                                             Handshaking    6
  4177.      Control structures  7
  4178.                                             HAYES     48
  4179.      CTS  25
  4180.                                             HAYES MODEM    50
  4181.      DCD  25
  4182.                                             Heap 7, 20
  4183.      DeltaCTS  25
  4184.                                             Interrupt chaining  9, 12
  4185.      DSR  25
  4186.                                             Interrupt enable flag    7
  4187.      DTR  29, 31, 32, 47
  4188.                                             Interrupt vector    11
  4189.      Error status bits   28
  4190.                                             Interrupt vectors   10
  4191.      Event Timer    43
  4192.                                             IRQ  11, 17
  4193.      Expansion cards     11
  4194.                                             IRQ0 11
  4195.      Flow control   33
  4196.                                             Look-ahead     37
  4197.      Functions
  4198.                                             Open function  7
  4199.        BytesInInput 24
  4200.                                             PortChange     10
  4201.        CheckEvent   43
  4202.                                             Procedures
  4203.        CheckForCall 45
  4204.                                               CommClose    21
  4205.        ClearModemSignals 30
  4206.                                               Disconnect   47
  4207.        CommOpen     19
  4208.                                               FlushNBytes  41
  4209.        CommSetup    22
  4210.                                               FlushUntilMatch   41
  4211.        EnableXon    33
  4212.                                               SetSet  51
  4213.        ErrorStatus  28
  4214.                                               SetType 51
  4215.        FlipModemSignals  32
  4216.                                             RI   25
  4217.        GetModemRegister  51, 52
  4218.                                             RTS  29, 31, 32
  4219.        GetModemReply     49
  4220.                                             S-register     53
  4221.        GetStream    39
  4222.                                             Stream    39, 40
  4223.        LctGet  36
  4224.                                             TSR  15
  4225.        LctPeek 37
  4226.                                             Vector numbers 11
  4227.        LctPut  38
  4228.                                             XOFF 33
  4229.        ModemCarrierOff   51, 52
  4230.                                             XON  33
  4231.        ModemCarrierOn    51, 52
  4232.        ModemCodeSet 52
  4233.        ModemCodesOff     51
  4234.        ModemCodesOn 51
  4235.        ModemDial    52
  4236.        ModemDigitResponse     51
  4237.        ModemEchoCmd 51, 52
  4238.        ModemFullDuplex   51, 52
  4239.        ModemHalfDuplex   51, 52
  4240.        ModemHookMode     51, 52
  4241.        ModemNoEchoCmd    51, 52
  4242.        ModemPulse   52
  4243.        ModemSpeaker 51
  4244.        ModemStatus  25
  4245.        ModemTone    52
  4246.        ModemWordResponse 51
  4247.        NewEvent     44
  4248.        PortChange   17
  4249.        PurgeRxBuff  41
  4250.        PurgeTxBuff  41
  4251.        PutStream    40
  4252.        RepeatModemCommand     51
  4253.  
  4254.                                           1
  4255.  
  4256.  
  4257.  
  4258.  
  4259.  
  4260.  
  4261.  
  4262.  
  4263.                 OVERVIEW........................................... 1
  4264.                     FEATURES....................................... 1
  4265.                     THE SHAREWARE CONCEPT.......................... 1
  4266.  
  4267.                 LICENSE, WARRANTY AND REGISTRATION................. 2
  4268.                     LICENSE........................................ 2
  4269.                     WARRANTY....................................... 3
  4270.                     REGISTERING YOUR COPY.......................... 4
  4271.                     NOTE........................................... 4
  4272.  
  4273.                 COMMUNICATIONS AND THE PC.......................... 5
  4274.                     PC SHORTCOMINGS................................ 5
  4275.                     THE 8250 UART.................................. 5
  4276.                     TOOLBOX NOTES AND WARNINGS..................... 7
  4277.  
  4278.                 LITECOMM-TP HISTORY................................ 8
  4279.                     VERSION 1.0.................................... 8
  4280.                     VERSION 2.0.................................... 8
  4281.                     VERSION 3.0.................................... 9
  4282.  
  4283.                 BEYOND COM2........................................ 10
  4284.                     THE TOOLBOX METHODOLOGY........................ 10
  4285.                     CAUTIONS....................................... 11
  4286.  
  4287.                 PACKAGE CONTENTS................................... 13
  4288.  
  4289.                 INSTALLATION INSTRUCTIONS.......................... 14
  4290.  
  4291.                 GENERAL NOTES...................................... 15
  4292.  
  4293.                 PROCEDURE AND FUNCTION REFERENCE................... 16
  4294.                     UNIT USAGE..................................... 16
  4295.  
  4296.                 BBS Functions...................................... 43
  4297.  
  4298.                 HAYES MODEM FUNCTIONS.............................. 50
  4299.  
  4300.                 LITECOMM-TP REGISTRATION FORM...................... 55
  4301.             
  4302.              Turbo PASCAL is a registered trademark of Borland
  4303.             International
  4304.             
  4305.  
  4306.  
  4307.  
  4308.  
  4309.  
  4310.  
  4311.  
  4312.  
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.