home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / PROGRAM / PCL4P30.ZIP / PCL4P.USR < prev    next >
Text File  |  1992-01-27  |  44KB  |  1,455 lines

  1.  
  2.  
  3.                       Personal Communications Library
  4.  
  5.                       For Turbo Pascal ( Version 4.0 & up)
  6.  
  7.  
  8.                                ( PCL4P )
  9.  
  10.  
  11.  
  12.  
  13.                       USERS MANUAL
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.                               Version 3.0
  21.  
  22.                               Jan 15, 1992
  23.  
  24.  
  25.  
  26.  
  27.                     This software is provided as-is.
  28.               There are no warranties, expressed or implied.
  29.  
  30.  
  31.  
  32.  
  33.                             Copyright (C) 1992
  34.                             All rights reserved
  35.  
  36.  
  37.  
  38.  
  39.                            MarshallSoft Computing, Inc.
  40.                            Post Office Box 4543
  41.                            Huntsville AL 35815
  42.  
  43.                            Phone (205) 881-4630
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.       PCL4P Users Manual                                      Page 1
  64.  
  65.  
  66.  
  67.  
  68.                              Table of Contents
  69.  
  70.  
  71.  
  72.  
  73.  
  74.        Chapter                                        Page
  75.  
  76.        Introduction........................................3
  77.        Registration........................................4
  78.        Library Overview....................................5
  79.           Initialization & Termination.....................5
  80.           Configuration....................................5
  81.           Modem Control & Status...........................6
  82.           Serial I/O.......................................6
  83.           Error Detection..................................7
  84.           General Support..................................7
  85.        Installation........................................8
  86.        Using the Library...................................9
  87.        Compiling...........................................10
  88.        Talking to your Modem...............................11
  89.        Problems............................................12
  90.        Function Summary....................................13
  91.        Serial Communications...............................14
  92.        IBM Communications Ports............................15
  93.        RS232 Signals.......................................16
  94.        National INS8250 UART...............................17
  95.        Register Summary....................................18
  96.        Example Code........................................20
  97.           SIMPLE...........................................20
  98.           TERM.............................................20
  99.           LOOPBACK.........................................20
  100.        Revision History....................................21
  101.        License.............................................22
  102.        Warranty............................................22
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.       PCL4P Users Manual                                      Page 2
  130.  
  131.  
  132.  
  133.  
  134.                              Introduction
  135.  
  136.  
  137.  
  138.        The  Personal Communications Library for Turbo Pascal ( PCL4P ) is
  139.        an asynchronous communications library  designed  for  experienced
  140.        software  developers  programming in Turbo Pascal. An IBM PC/XT/AT
  141.        or compatible is required.  The PCL features:
  142.  
  143.           o  26 communications and support functions.
  144.           o  Interrupt driven receiver.
  145.           o  Supports 300 baud to 115,200 baud.
  146.           o  Supports COM1, COM2, COM3, and COM4.
  147.           o  Adjustable receive queues from 8 bytes to 16 KB.
  148.           o  Control-BREAK error exit.
  149.           o  17 communications error conditions trapped.
  150.           o  Allows 2 ports to run concurrently.
  151.           o  Complete modem control & status.
  152.           o  Written in assembly language for small size & high speed.
  153.  
  154.        A  typical  application  program  using  PCL4P might look like the
  155.        following code outline:
  156.  
  157.  
  158.        +----------------------------------------------------------------+
  159.        | program YourProgram                                            |
  160.        | uses PCL4P;                                                    |
  161.        | ...                                                            |
  162.        | ...                                                            |
  163.        | var Buffer : array[0..1023] of Char;                           |
  164.        | ...                                                            |
  165.        | begin (* YourProgram *)                                        |
  166.        |    RetCode := SioRxBuf(Port,Ofs(Buffer),Seg(Buffer),Size1024); |
  167.        |    RetCode := SioParms(Port,NoParity,OneStopBit,WordLength8);  |
  168.        |    RetCode := SioReset(Port,Baud2400);                         |
  169.        |    ...                                                         |
  170.        |    ... ( application code )                                    |
  171.        |    ...                                                         |
  172.        |    RetCode := SioDone(Port);                                   |
  173.        | end. (* YourProgram *)                                         |
  174.        +----------------------------------------------------------------+
  175.  
  176.  
  177.        In the above example, SioRxBuf is called to set up the a 1024 byte
  178.        receive  buffer; SioParms is called to set up the parity, stop bit
  179.        count, and word length; SioReset is called to set the baud rate to
  180.        2400 and  reset  the  UART  (  Univeral  Asynchronous  Receiver  /
  181.        Transmitter ).
  182.  
  183.        Before  leaving your application, SioDone is called to restore the
  184.        prior state of the serial communications system.
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.       PCL4P Users Manual                                      Page 3
  196.  
  197.  
  198.  
  199.  
  200.                              Registration
  201.  
  202.  
  203.  
  204.        The shareware version of PCL4P.LIB is provided  so  that  you  may
  205.        personally  determine  the usefulness of the product for yourself.
  206.        If  you  can  use  the  Personal  Communications  Library,  please
  207.        register  your  use  with us. Send $45 plus $3 S&H ( $6 outside of
  208.        the USA, Canada, and Mexico ) to:
  209.  
  210.                 MarshallSoft Computing, Inc.
  211.                 Post Office Box  4543
  212.                 Huntsville AL 35815
  213.  
  214.        Please pay by check in US dollars drawn on a US bank. Payment must
  215.        accompany  purchase orders. Print the file PCL4P.INV if an invoice
  216.        is needed. The registered package is mailed first  class  US  Mail
  217.        and includes:
  218.  
  219.           o  Turbo Pascal library without the shareware screens.
  220.           o  Assembler source code for the library.
  221.           o  Printed Users Manual.
  222.           o  Printed Reference Manual.
  223.           o  Telephone support for one year.
  224.           o  All updates ( with printed manuals ) are $15  plus  $3  S&H
  225.              ( $6 outside of USA, Canada, & Mexico ).
  226.  
  227.        PCL4P.ASM is the source code for the library. The source  code  is
  228.        copyrighted  by MarshallSoft Computing, Inc. The user is granted a
  229.        license to use the PCL4P object code in his own application  only.
  230.        PCL4P.ASM  is  not  shareware and may not be sold or given away to
  231.        anyone.
  232.  
  233.        The  registered  user  will receive the latest version of PCL4P by
  234.        return mail.  A 5.25" diskette is provided unless a 3.5"  diskette
  235.        is requested. Be sure to specify the "Pascal" version.
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.       PCL4P Users Manual                                      Page 4
  262.  
  263.  
  264.  
  265.  
  266.                              Library Overview
  267.  
  268.  
  269.  
  270.        The  PCL4P  library is organized into six categories of functions.
  271.        Refer to the PCL Reference Manual ( PCL4P.REF  )  for  details  on
  272.        individual functions.
  273.  
  274.  
  275.                         1. Initialization & Termination
  276.  
  277.  
  278.        There are five functions in  the  initialization  and  termination
  279.        category.   Together,  SioParms, SioRxBuf, and SioReset initialize
  280.        your serial communications system.   Your  application  must  call
  281.        SioParms  and  SioRxBuf before calling SioReset, and SioReset must
  282.        be called before any serial I/O processing can be done.
  283.  
  284.        After initialization, SioParms and SioBaud can be called again  to
  285.        change  the communications parameters without resetting the serial
  286.        port.
  287.  
  288.        Before  exiting  from  your  application,  SioDone must be called.
  289.        Failure to call SioDone can crash your system later.
  290.  
  291.        SioRxBuf   -- Sets up receive buffer.
  292.        SioParms   -- Sets parity, stop bits, and word length.
  293.        SioReset   -- Initialize a serial port for processing.
  294.        SioDone    -- Terminates further serial processing.
  295.        SioBaud    -- Sets the baud rate of the selected port.
  296.  
  297.  
  298.                         2.  Configuration
  299.  
  300.  
  301.        SioUART  is the only function in the configuration category. It is
  302.        used to change the UART base address for a communications port  at
  303.        a  non-standard  address Note however, that IRQ4 is still used for
  304.        ports COM1 and COM3, while IRQ3 is still used for ports  COM2  and
  305.        COM4.  ( See the chapter IBM Communications Ports for more details
  306.        on standard UART addresses and IRQ lines ).
  307.  
  308.        SioUART  can also be used to set the UART base address to zero for
  309.        non-existant ports. For example, if you don't have COM4  installed
  310.        in your computer ( SioLoopBack will return an error ), use SioUART
  311.        to zero the UART address for COM4:
  312.  
  313.        SioUart(COM4,0)
  314.  
  315.        Then,  any subsequent attempt to reset COM4 will result in a "UART
  316.        undefined" message - reminding you that you don't have COM4.
  317.  
  318.  
  319.        SioUART -- Sets the UART base address.
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.       PCL4P Users Manual                                      Page 5
  328.  
  329.  
  330.  
  331.  
  332.                         3. Modem Control & Status
  333.  
  334.  
  335.        There  are  seven  functions  in  the  modem  control  and  status
  336.        category which provide your application with complete control over
  337.        the status and control bits of your modem.
  338.  
  339.        There are two modem control bits, "Data Terminal Ready"  (  DTR  )
  340.        and  "Request  To  Send"  ( RTS ). These bits can be read, set, or
  341.        cleared by SioDTR and SioRTS.
  342.  
  343.        There are four modem status bits, "Data Set Ready" ( DSR ), "Clear
  344.        To Send" ( CTS ), "Ring Indicator"  (  RI  ),  and  "Data  Carrier
  345.        Detect"  (  DCD ). SioModem can read any of the modem status bits.
  346.        SioDSR, SioCTS, SioRI, and SioDCD can only read  their  respective
  347.        modem status bit.
  348.  
  349.        Refer to the chapter entitled "RS232 Signals" for a discussion  of
  350.        each of the control and status bits.
  351.  
  352.        SioDTR    -- Set, clear, or read the Data Terminal Ready (DTR) bit.
  353.        SioRTS    -- Sets, clears, or reads the Request to Send (RTS) line.
  354.        SioModem  -- Reads the modem status register.
  355.        SioDSR    -- Reads the Data Set Ready (DSR) modem status bit.
  356.        SioCTS    -- Reads the Clear to Send (CTS) modem status bit
  357.        SioDCD    -- Reads the Data Carrier Detect (DCD) modem status bit.
  358.        SioRI     -- Reads the Ring Indicator (RI) modem status bit.
  359.  
  360.  
  361.                         4. Serial I/O
  362.  
  363.  
  364.        There are six  library  functions  in  the  serial  I/O  category.
  365.        Together,  these  functions  give  the programmer complete control
  366.        over serial I/O.  Higher level functions  such  as  protocols  and
  367.        smart  modem communications can be completely implemented in terms
  368.        of these functions. Refer to the example code.
  369.  
  370.        SioGetc  and SioPutc perform all the actual serial I/O.  SioUnGetc
  371.        and SioRxFlush modify the receive queue. SioLine can  be  used  to
  372.        test for UART errors.
  373.  
  374.        SioGetc    -- Reads the next character from the serial line.
  375.        SioPutc    -- Transmit a character over a serial line.
  376.        SioUnGetc  -- "Un-gets" (puts back) a specified character.
  377.        SioRxFlush -- Flush ( clears) the receive buffer.
  378.        SioRxQue   -- Returns the number of characters in the receive queue.
  379.        SioLine    -- Reads the line status register.
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.       PCL4P Users Manual                                      Page 6
  394.  
  395.  
  396.  
  397.  
  398.                         5.  Error Detection
  399.  
  400.  
  401.  
  402.        There are four functions in the error detection category. They are
  403.        concerned with detecting or reporting communications errors.   Use
  404.        of  these  functions  can make your application significantly more
  405.        robust.
  406.  
  407.        SioBrkKey  can  be  used  as  an  "emergency"   exit   from   your
  408.        application. SioBrkSig can read or modify the UART break bit. This
  409.        is  useful for signalling the remote system that a fatal condition
  410.        has occurred. SioLoopBack can be used to  test  the  integrity  of
  411.        your  UART.  SioError displays a error message corresponding to an
  412.        error  code  returned from a PCL4P function ( every PCL4P function
  413.        returns a code ).
  414.  
  415.        SioBrkKey -- Returns non-zero if the Control-BREAK key was pressed
  416.        SioBrkSig -- Asserts, cancels, or detects  BREAK  signal.
  417.        SioError  -- Displays  error  in  text.
  418.        SioLoopBack -- Performs a UART loopback test.
  419.  
  420.  
  421.                         6.  General Support
  422.  
  423.  
  424.        There are two functions in the general support category.  SioDelay
  425.        delays a specified number of clock tics while SioTimer returns the
  426.        system clock tics.
  427.  
  428.        SioDelay    -- Delays one or more tics.
  429.        SioTimer    -- Returns the number of system clock tics.
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.       PCL4P Users Manual                                      Page 7
  460.  
  461.  
  462.  
  463.  
  464.                              Installation
  465.  
  466.  
  467.  
  468.        (1) Before installation of PCL4P , your compiler should already be
  469.        installed  on your system and tested. If you are not familiar with
  470.        makefiles,  refer  to  your  compiler  manual.  Examine  the  file
  471.        "FILES.LST" for a list of all the distribution files.
  472.  
  473.        (2) Make a backup  copy  of  your  distribution  disk.   Put  your
  474.        original distribution disk in a safe place.
  475.  
  476.        (3)  Create  a  work  directory  on your work disk ( normally your
  477.        harddisk ). For example, to create a work directory  named  PCL4P,
  478.        we first log onto the work disk and then type:
  479.  
  480.                              MKDIR PCL4P
  481.  
  482.        (4)  Copy  all the files from your backup copy of the distribution
  483.        disk to your work directory.  For example, to  copy  from  the  A:
  484.        drive to your work directory, we type:
  485.  
  486.                             CD PCL4P
  487.                             COPY A:*.*
  488.  
  489.        (5) Compile SIMPLE.PAS:
  490.  
  491.                             TPC SIMPLE
  492.  
  493.        SIMPLE.PAS should compile without any problems.
  494.  
  495.        (7) The recommended way to  test  SIMPLE  is  to  run  it  on  two
  496.        computers  connected  by a null modem cable.  Whatever is typed on
  497.        one computer should be displayed on the other.
  498.  
  499.        (8) Compile and run each of the remaining example programs.
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.       PCL4P Users Manual                                      Page 8
  526.  
  527.  
  528.  
  529.  
  530.                              Using the Library
  531.  
  532.  
  533.  
  534.        The  PCL4P  has been tested on a TANDY 1000 ( 4.77 MHZ 8088 IBM PC
  535.        clone ), a TANDY 3000 ( 80286 IBM AT clone ), a TANDY 1400LT ( IBM
  536.        XT clone ), and a Gateway 2000 Cache ( 25 MHZ 80386-DX  ).   PCL4P
  537.        has been tested under MSDOS 2.11, 3.2, 3.3, 4.01, and 5.0.
  538.  
  539.        Please  examine  the  PCL4P.PAS file. Note that COM1 is defined as
  540.        port zero, not port one.  The user must assume  the  responsibilty
  541.        for passing the correct information when calling PCL4P functions.
  542.  
  543.        For an example of PCL4P use, examine the terminal emulator program
  544.        SIMPLE.PAS.  The user should compile and link SIMPLE.PAS as a test
  545.        of the library.
  546.  
  547.        If you have two computers, then you can connect them together with
  548.        a  null  modem  cable  and  run  SIMPLE  or TERM on both machines.
  549.        Whatever is typed on one machine should appear on the  other,  and
  550.        vice versa.
  551.  
  552.        If you have a modem, use TERM to call up any bulletin board system
  553.        ( BBS ). Be sure to un-comment the code that initializes th modem.
  554.  
  555.        in  the source code so that TERM sends an initialization string to
  556.        your modem.
  557.  
  558.        There are many free BBSs around the country. Look in any issue  of
  559.        "Computer  Shopper" ( available in bookstores, computer shops, and
  560.        many grocery stores ) for a list of current systems.
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.       PCL4P Users Manual                                      Page 9
  592.  
  593.  
  594.  
  595.  
  596.                              Compiling
  597.  
  598.  
  599.  
  600.        Registered users may wish to assemble  PCL4PLIB.ASM.  To  assemble
  601.        using the Microsoft assembler:
  602.  
  603.              MASM PCL4PLIB /DPASCAL_MODEL;
  604.  
  605.        To build the library TPU:
  606.  
  607.              TPC PCL4P
  608.  
  609.        To compile the sample programs:
  610.  
  611.              TPC SIMPLE.PAS
  612.  
  613.              TPC LOOPBACK.PAS
  614.  
  615.              TPC TERM.PAS /m
  616.  
  617.        A  makefile (  TERM.MAK  )  is  also  provided  for  the  TERM.PAS
  618.        program. To compile TERM and all dependent units, type:
  619.  
  620.              MAKE -FTERM
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.       PCL4P Users Manual                                      Page 10
  658.  
  659.  
  660.  
  661.  
  662.                              Talking To Your Modem
  663.  
  664.  
  665.  
  666.        If your application uses a Modem ( as  opposed  to  using  a  null
  667.        modem  cable  ),  then  you  should  always send an initialization
  668.        string to your modem if it is a programmable modem such  as  those
  669.        made  by  Hayes.  Communication programs such as PROCOMM and TELIX
  670.        always send such a string automatically as soon as they start up.
  671.  
  672.        The particular initialization string depends on the make  of  your
  673.        modem.   For  Hayes  and  Hayes  compatible  modems, the following
  674.        string ( followed by a carriage return ) should work:
  675.  
  676.             AT E1 S7=60 S11=60 V1 X1 Q0 S0=0
  677.  
  678.        Refer to your Hayes User's Guide for a full  discussion  of  these
  679.        commands. A brief description is as follows:
  680.  
  681.        AT     Modem attention command.
  682.        E1     Modem will echo what you send to it.
  683.        S7=60  Wait 60 seconds for carrier and/or dial tone.
  684.        S11=60 Use 60 milliseconds for tone dialing duration & spacing.
  685.        V1     Display result code as words ( not numbers ).
  686.        X1     Use the extended result message ( CONNECT XXXX ) set.
  687.        Q0     Modem returns result codes.
  688.        S0=0   Do not answer RING.
  689.  
  690.        If your application will answer incoming calls, then  set  the  S0
  691.        register to the ring on which to automatically answer.
  692.  
  693.        If  you  send  the  above  codes  by using SioPutc ( as opposed to
  694.        typing them from the keyboard ), then follow these guidelines:
  695.  
  696.        (1) Send an initial  carriage  return  before  the  initialization
  697.        string.
  698.  
  699.        (2) Pause at least two tics ( 18 tics to the second )  after  each
  700.        character  sent  as  your  modem needs the time to perform its own
  701.        internal processing.  Pause a little longer if your modem  is  not
  702.        accepting your initialization string.
  703.  
  704.        (3) Pause one and a half seconds after sending any  initialization
  705.        command  such  as ATZ or AT&F since your modem must do quite a bit
  706.        of processing.
  707.  
  708.        If you experience any problems in initializing your  Hayes  modem,
  709.        you should first reset it to factory settings by sending:
  710.  
  711.             AT&F
  712.  
  713.        Refer  to  the  TERM program ( functions SendTo and WaitFor in the
  714.        file MODEM_IO.PAS ) for an  example  of  sending  an  initialization
  715.        string to a Hayes compatible modem.
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.       PCL4P Users Manual                                      Page 11
  724.  
  725.  
  726.  
  727.  
  728.                              Problems
  729.  
  730.  
  731.  
  732.        If you cannot get your application to run properly, first  compile
  733.        and  run  the  terminal  emulator program TERM provided on your
  734.        distribution disk.  If you are using  a  null  modem  cable  or  a
  735.        non-programmable  modem, be sure to set the HAYES constant to 0 in
  736.        the source code ( #define HAYES 0 ).  If you  are  using  a  Hayes
  737.        compatible  modem, set the HAYES constant to 1. If you are using a
  738.        programmable modem which is not Hayes compatible,  then  you  must
  739.        modify the initialization string for your particular modem.
  740.  
  741.        If  your application does not run but TERM runs correctly, then
  742.        you  have  most  likely  made  a  programming  mistake   in   your
  743.        application. MarshallSoft Computing cannot debug your application,
  744.        especially  over  the  telephone!   However,  consider each of the
  745.        following when searching for an error in your application.
  746.  
  747.        1.  Did you include the "uses PCL4P" statement ?
  748.  
  749.        2.  Is your receive buffer large enough ? If you are using 1K data
  750.            blocks in YMODEM, then your receive buffer should be at  least
  751.            1K ( 2K if baud rates above 38400 are to be used ).
  752.  
  753.        4.  Have you selected too high a baud rate ( if you  are  using  a
  754.            slow PC ) ?  If only one COM port is being run, you should  be
  755.            able to run at 38400 baud on 8088 machines and 115200 on  most
  756.            286 and all 386 and 486 machines.
  757.  
  758.        5.  Are  you  attempting  to  run  another  application   in   the
  759.            background ?  Try running  without any other programs  running
  760.            in the background ( unload all TSR programs ).
  761.  
  762.        6.  If you are running two COM ports simultaneously, are you using
  763.            separate receive buffers ? ( you should ).
  764.  
  765.        7.  Did SioReset return a zero value ?  If not, then you must call
  766.            SioReset again. See TERM.PAS for an example.
  767.  
  768.        8.  Did you send the proper initialization string to your modem ?
  769.  
  770.        9.  Do you have more than one COM1 port, etc.  For example, if you
  771.            have a COM1 port on your motherboard,  you cannot add  another
  772.            COM1  port  or  modem  board  that  uses  COM1  without  first
  773.            disabling the COM1 on the motherboard.
  774.  
  775.        If TERM does not run, then either there is a  physical  connection
  776.        problem  or  your computer isn't as compatible as you thought !
  777.  
  778.        Registered  users  can call (205) 881 - 4630 from 5 PM to 8 PM CST
  779.        Monday through Friday for help.
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.       PCL4P Users Manual                                      Page 12
  790.  
  791.  
  792.  
  793.  
  794.                              Function Summary
  795.  
  796.  
  797.  
  798.        Refer to the PCL4P Reference Manual (  PCL4P.REF  )  for  detailed
  799.        information  on  the  communications  and support functions. A one
  800.        line summary of each function follows:
  801.  
  802.  
  803.        SioBaud     Sets the baud rate of the selected port.
  804.        SioBrkKey   Returns non-zero if the Control-BREAK key was pressed.
  805.        SioBrkSig   Asserts, cancels, or detects BREAK signal.
  806.        SioCTS      Reads the Clear to Send (CTS) modem status bit.
  807.        SioDCD      Reads the Data Carrier Detect (DCD) modem status bit.
  808.        SioDelay    Delays one or more tics ( 18 tics per second ).
  809.        SioDone     Terminates further serial processing.
  810.        SioDSR      Reads the Data Set Ready (DSR) modem status bit.
  811.        SioDTR      Set, clear, or read the Data Terminal Ready (DTR) bit.
  812.        SioError    Displays error in text.
  813.        SioGetc     Reads the next character from the serial line.
  814.        SioLine     Reads the line status register.
  815.        SioLoopBack Performs a UART loopback test.
  816.        SioModel    Returns a code corresponding to the memory model used.
  817.        SioModem    Reads the modem status register.
  818.        SioParms    Sets parity, stop bits, and word length.
  819.        SioPutc     Transmit a character over a serial line.
  820.        SioReset    Initialize a serial port for processing.
  821.        SioRI       Reads the Ring Indicator (RI) modem status bit.
  822.        SioRTS      Sets, clears, or reads the Request to Send (RTS) line.
  823.        SioRxBuf    Sets up receive buffer.
  824.        SioRxFlush  Flushes ( clears ) the receive buffer.
  825.        SioRxQue    Returns the number of characters in the receive queue.
  826.        SioTimer    Returns the number of system clock tics.
  827.        SioUART     Sets the UART base address.
  828.        SioUnGetc   "Un-gets" ( puts back ) a specified character.
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.       PCL4P Users Manual                                      Page 13
  856.  
  857.  
  858.  
  859.  
  860.                              Serial Communications
  861.  
  862.  
  863.  
  864.        The heart  of  serial  communications  is  the  UART  (  Universal
  865.        Asynchronous   Receiver  Transmitter  ).   The  IBM  PC/XT/AT  and
  866.        compatibles use the INS8250 UART or an  UART  that  is  compatible
  867.        with the INS8250.  The purpose of the UART is:
  868.  
  869.        (1)  To  convert  bytes  from the CPU ( Central Processing Unit ),
  870.        into a serial format by adding  the  necessary  start,  stop,  and
  871.        parity bits to each byte before transmission, and to then transmit
  872.        each bit at the correct baud rate.
  873.  
  874.        (2) To convert the incoming stream ( at a specified baud rate ) of
  875.        serial  bits  into  bytes  by removing the start, stop, and parity
  876.        bits before being made available to the CPU.
  877.  
  878.        The  UART  is  part of the serial interface circuitry which allows
  879.        the CPU to send and receive signals over the RS232 lines. This can
  880.        be diagrammed as follows:
  881.  
  882.                              Serial Interface
  883.                           +-------------------+
  884.        +-----+  Data Bus  |     +------+      |    RS232 Signals
  885.        | CPU |============|     | UART |      |<------------------>
  886.        +-----+            |     +------+      |
  887.                           +-------------------+
  888.  
  889.        The  INS  8250  UART  is capable of operating in one of two modes,
  890.        "polled"  and  "interrupt  driven".   The  serial   communications
  891.        functions  in  the BIOS uses the polled method.  In this approach,
  892.        the CPU is typically in a loop asking the UART over and over again
  893.        if it has a byte ready. If its does, the polling code returns  the
  894.        byte.  But,  if  the next byte comes in before the polling code is
  895.        executing again, then that byte is lost.
  896.  
  897.        In the interrupt driven approach ( used by PCL4P for incoming data
  898.        ), when a byte is received by  the  UART,  an  "Interrupt  Service
  899.        Routine"  (  ISR ) is executed immediately, suspending temporarily
  900.        whatever else is executing.  The ISR then  moves  the  byte  to  a
  901.        buffer  so  that your application program can later read it. Refer
  902.        to the sections entitled "RS232  Signals"  and  "National  INS8250
  903.        UART" for further information on these topics.
  904.  
  905.        The best way to learn about serial communications  is  to  read  a
  906.        good  book  on the subject. Several good texts are available.  Two
  907.        that I like are:
  908.  
  909.        (1) C Programmers's Guide to Serial Communications by Joe Campbell
  910.        (SAMS)
  911.  
  912.        (2) Mastering Serial Communications by Peter Gofton (SYBEX).
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.       PCL4P Users Manual                                      Page 14
  922.  
  923.  
  924.  
  925.  
  926.                              IBM Communications Ports
  927.  
  928.  
  929.  
  930.        There  are  a  few  things to know about how serial communications
  931.        ports are used by  IBM  PC/XT/AT  and  compatible  computers.  The
  932.        standard IBM PC/XT/AT configuration values are as follows:
  933.  
  934.        Port     Reg Base   IRQ Line   Vector
  935.        COM1        3F8H        4        12
  936.        COM2        2F8H        3        11
  937.        COM3        3E8H        4        12
  938.        COM4        2E8H        3        11
  939.  
  940.        PCL4P assumes the  above  values.  If  necessary,  the  UART  base
  941.        address   can  be changed by SioUART. However, the IRQ and Service
  942.        vector values can not be changed ( unless you  modify  the  source
  943.        code ).
  944.  
  945.        When installing new communications cards, the following guidelines
  946.        are recommended:
  947.  
  948.        (1) Be sure to read the documentaion  for  the  hardware  you  are
  949.        installing.   Pay special attention to UART base addresses and IRQ
  950.        lines.
  951.  
  952.        (2) If you have a choice in base addresses and IRQ  lines,  always
  953.        choose standard values as defined above.
  954.  
  955.        (3) The first port should be COM1, the second COM2, etc.
  956.  
  957.        (4)  Use  SioUART  to  zero  all  unused ports ( for example, call
  958.        SioUART(COM4,0) if there is no COM4 port installed ).
  959.  
  960.        (5)  Be  carefull not to configure two ports for the same address.
  961.        This is easier to do than you may believe.
  962.  
  963.        (6) Choose an external modem over an internal  one.   It  is  much
  964.        easier  to  debug problems with an external modem than an internal
  965.        one.
  966.  
  967.        (7) Always test your port as soon as it is installed.
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.       PCL4P Users Manual                                      Page 15
  988.  
  989.  
  990.  
  991.  
  992.                              RS232 Signals
  993.  
  994.  
  995.  
  996.        RS-232  is  the name of the serial data interface standard used to
  997.        connect computers to modems.  Most IBM  compatible  computers  are
  998.        built  with  at least one serial port and use either DB9 ( 9 pin )
  999.        or DB25 ( 25 pin ) connectors.
  1000.  
  1001.        A summary of these pins and  their  function  follows.   For  more
  1002.        detailed  information, refer to one of the many books dealing with
  1003.        RS-232 interfacing.
  1004.  
  1005.        Signal Ground Pin 7 (DB25), Pin 5 (DB9)
  1006.  
  1007.        The SG line is used as the common signal ground, and  must  always
  1008.        be connected.
  1009.  
  1010.        Transmit Data Pin 2 (DB25), Pin 3 (DB9)
  1011.  
  1012.        The TX line is used to carry data from the computer to the modem.
  1013.  
  1014.        Receive Data Pin 3 (DB25), Pin 2 (DB9)
  1015.  
  1016.        The RX line is used to carry data from the modem to the computer.
  1017.  
  1018.        Data Terminal Ready Pin 20 (DB25), Pin 4 (DB9)
  1019.  
  1020.        The  DTR  line is used by the computer to signal the modem that it
  1021.        is ready.
  1022.  
  1023.        Data Set Ready Pin 6 (DB25), Pin 6 (DB9)
  1024.  
  1025.        The DSR line is used by the modem to signal the computer  that  it
  1026.        is ready.
  1027.  
  1028.        Request to Send Pin 4 (DB25), Pin 7 (DB9)
  1029.  
  1030.        The  RTS  line  is  used  to "turn the line around" in half duplex
  1031.        modems, but is not necessary in full duplex modems.
  1032.  
  1033.        Clear to Send Pin 5 (DB25), Pin 8 (DB9)
  1034.  
  1035.        The  CTS  line, like the RTS line, is not necessary in full duplex
  1036.        modems.
  1037.  
  1038.        Data Carrier Detect Pin 8 (DB25), Pin 1 (DB9)
  1039.  
  1040.        The DCD line is used by the modem to signal the  computer  that  a
  1041.        data carrier signal is present.
  1042.  
  1043.        Ring Indicator Pin 22 (DB25), Pin 9 (DB9)
  1044.  
  1045.        The RI line is asserted when a 'ring' occurs.
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.       PCL4P Users Manual                                      Page 16
  1054.  
  1055.  
  1056.  
  1057.  
  1058.                              National INS8250 UART
  1059.  
  1060.  
  1061.  
  1062.        The  Personal  Communications  Library  is  based  on the standard
  1063.        National INS8250 UART and compatible UARTs.  The 8250 consists  of
  1064.        8 register ports as follows:
  1065.  
  1066.        Offset    R/W   Register
  1067.          0       R/W   Receiver ( read ) / Transmitter ( write )
  1068.          1       R/W   Interrupt Enable
  1069.          2       R     Interrupt Identification
  1070.          3       R/W   Data Format ( Line Control )
  1071.          4       R/W   RS-232 ( Modem ) Control
  1072.          5       R/W   Line Status
  1073.          6       R/W   RS-232 ( Modem ) Status
  1074.          7       R/W   Not used.
  1075.  
  1076.        The  UART  registers  are  based  at  3F8  (COM1), 2F8 (COM2), 3E8
  1077.        (COM3), and 2E8 (COM4). COM1 and COM3 share  interrupt  vector  12
  1078.        and  interrupt  request  line  IRQ4  while  COM2  and  COM4  share
  1079.        interrupt vector 11 and interrupt request line IRQ3.   This  means
  1080.        that  COM1  and  COM3  cannot  both  be  used  at  the  same time.
  1081.        Similarly, COM2 and COM4 cannot both be used at the same time.
  1082.  
  1083.  
  1084.        Port     Reg Base   IRQ Line   Vector
  1085.        COM1        3F8H        4        12
  1086.        COM2        2F8H        3        11
  1087.        COM3        3E8H        4        12
  1088.        COM4        2E8H        3        11
  1089.  
  1090.        Four sources  of  interrupts  are  possible  with  the  8250:  (1)
  1091.        receiver  error  or  BREAK,  (2) receiver data ready, (3) ready to
  1092.        transmit, and (4) RS232 input.  These four sources  of  interrupts
  1093.        are summarized as follows:
  1094.  
  1095.        Source of Interrupt        Action Required to Clear
  1096.        Receiver error or BREAK.   Read Line Status register.
  1097.        Receiver data.             Read data from data register.
  1098.        Transmitter Buffer Empty.  Write to data register or read IID reg.
  1099.        RS232 input.               Read Modem Status register.
  1100.  
  1101.        However,  PCL4P  only  enables  the receiving data interrupt. This
  1102.        means that interrupts can only be caused by incoming data.
  1103.  
  1104.        If  you  are not familiar with the INS8250, several good books are
  1105.        available.   Refer  to  the  Serial  Communications  chapter   for
  1106.        recommendations.    Although  a  knowledge  of  the  8250  is  not
  1107.        necessary to use PCL4P, a  general  knowledge  of  the  theory  of
  1108.        asynchronous serial communications is recommended.
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.       PCL4P Users Manual                                      Page 17
  1120.  
  1121.  
  1122.  
  1123.  
  1124.                              Register Summary
  1125.  
  1126.  
  1127.  
  1128.        REG 0 : Data Register
  1129.  
  1130.        Reading  from  the data register fetches the next input byte, once
  1131.        it is ready.  Writing to the  data  register  transmits  the  byte
  1132.        written to it over the serial line.
  1133.  
  1134.        REG 1 : Interrupt Enable 
  1135.  
  1136.        The  Interrupt  Enable  register  enables  each  of  four types of
  1137.        interrupts when the appropriate bit is set to a one.
  1138.  
  1139.        bit 3 : Enable interrupt on RS232 input.
  1140.        bit 2 : Enable interrupt on receiver error or break.
  1141.        bit 1 : Enable interrupt on transmitter buffer empty ( TBE ).
  1142.        bit 0 : Enable interrupt on received data ( RxRDY ).
  1143.  
  1144.        REG 2 : Interrupt Identification (IID)
  1145.  
  1146.        Reading the Interrupt Identification register  once  an  interrupt
  1147.        has occurred identifies the interrupt as follows:
  1148.  
  1149.        Bit 2  Bit 1  Bit 0  Priority  Interrupt
  1150.        =====  =====  =====  ========  =========
  1151.          0      0      1      none     none
  1152.          1      1      0       0       Serialization or break.
  1153.          1      0      0       1       Received data.
  1154.          0      1      0       2       Transmitter Buffer Empty.
  1155.          0      0      0       3       RS232 Input.
  1156.  
  1157.        where 0 = highest priority.
  1158.  
  1159.        REG 3 : Line Control
  1160.  
  1161.        RS232  line parameters are selected by writing to this register as
  1162.        follows:
  1163.  
  1164.        bit 7 : DLAB = 0
  1165.        bit 6 : BREAK on(1), off(0).
  1166.        bits 5-3: Parity None(000),ODD(001),EVEN(011),MARK(101),SPACE(111)
  1167.        bit 2 : One stop bit(0), two stop bits(1).
  1168.        bits 1-0: Data bits = 5 (00), 6(01), 7(10), 8(11).
  1169.  
  1170.        When the Divisor Latch Access Bit ( DLAB ) is 1, registers 0 and 1
  1171.        become the LS and MS bytes of the Baud Rate Divisor registers.
  1172.  
  1173.         Divisor    Baud Rate            Divisor    Baud Rate
  1174.           300      0180                     9600      000C
  1175.           600      00C0                    19200      0006
  1176.          1200      0060                    38400      0003
  1177.          2400      0030                    57600      0002
  1178.          4800      0018                   115200      0001
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.       PCL4P Users Manual                                      Page 18
  1186.  
  1187.  
  1188.  
  1189.  
  1190.        REG 4 : Modem Control
  1191.  
  1192.        RTS, DTR, loopback testing, and General Purpose Outputs #1 and  #2
  1193.        are controlled by the Modem Control register as follows:
  1194.  
  1195.        bit 4 : Enable local loopback.
  1196.        bit 3 : Enable GP02. Necessary for 8250 interrupts.
  1197.        bit 2 : Enable GP01.
  1198.        bit 1 : Set / clear RTS.
  1199.        bit 0 : Set / clear DTR.
  1200.  
  1201.        REG 5 : Line Status
  1202.  
  1203.        Reading  the  Line  Status register provides status information as
  1204.        follows ( 1 for TRUE, 0 for FALSE ) :
  1205.  
  1206.        bit 6 : Transmitter Empty.
  1207.        bit 5 : Transmitter Buffer Empty ( TBE ).
  1208.        bit 4 : BREAK detect.
  1209.        bit 3 : Framing error.
  1210.        bit 2 : Parity error.
  1211.        bit 1 : Overrun error.
  1212.        bit 0 : Data Ready.
  1213.  
  1214.        REG 6 : Modem Status
  1215.  
  1216.        Reading the Modem Status register provides  the  following  status
  1217.        information ( 1 for TRUE, 0 for FALSE ) :
  1218.  
  1219.        bit 7 : DCD status.
  1220.        bit 6 : RI status.
  1221.        bit 5 : DSR status.
  1222.        bit 4 : CTS status.
  1223.        bit 3 : Delta DCD status.
  1224.        bit 2 : Delta RI status.
  1225.        bit 1 : Delta DSR status.
  1226.        bit 0 : Delta CTS status.
  1227.  
  1228.        The  delta  bits  ( bits 0 through 3 ) are set whenever one of the
  1229.        status bits ( bits 4 through 7 ) changes ( from 0 to 1 or  from  1
  1230.        to  0  )  since  the  last time that the Modem Status register was
  1231.        read. Reading the Modem Status register clear the delta bits.
  1232.  
  1233.        REG 7 : Scratch Register
  1234.  
  1235.        There is no function associated with  register  7.   It  does  not
  1236.        exist in early versions of the 8250.
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.       PCL4P Users Manual                                      Page 19
  1252.  
  1253.  
  1254.  
  1255.  
  1256.                              Example Code
  1257.  
  1258.  
  1259.  
  1260.        The  following programs are provided as examples of the use of the
  1261.        PCL4P library.  They are not part of the PCL4P library, and may be
  1262.        used in any way the user wishes. Makefiles (  small  model  )  are
  1263.        provided for all example code.
  1264.  
  1265.        SIMPLE
  1266.  
  1267.        SIMPLE  is  an  extremely simple terminal emulator program.  It is
  1268.        provided as the smallest and  easiest  to  understand  example  of
  1269.        serial communications programming using PCL4P.
  1270.  
  1271.        To  start  SIMPLE,  just type SIMPLE. The baud rate is set at 2400
  1272.        and can be easily changed in the source code. Similiarly the  port
  1273.        is set to COM1 and is easily changed in the source code. Note that
  1274.        SIMPLE does not send an initialization string to your modem.
  1275.  
  1276.        TERM
  1277.  
  1278.        TERM  is  a  more  capable  terminal  emulator  than  SIMPLE.   It
  1279.        functions as a dumb terminal emulator but can exchange files using
  1280.        XMODEM ( Standard XMODEM, XMODEM-CRC, and XMODEM-1K ) and YMODEM (
  1281.        batch  capability  ) communications protocols. TERM will also send
  1282.        an initialization string to your Hayes compatible modem.
  1283.  
  1284.        To start TERM, type TERM followed by the port ( 1 to 4 )  and  the
  1285.        baud rate ( 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600,
  1286.        or 115200). For example, "TERM 4 2400".
  1287.  
  1288.        LOOPBACK
  1289.  
  1290.        LOOPBACK performs a loopback test of the selected port UART.  This
  1291.        is  useful  for  testing  a  serial port UART that is suspected of
  1292.        being bad. However, defective UARTS are very unusual.
  1293.  
  1294.        Start LOOPBACK by typing LOOPBACK followed by the port ( 1 to 4 ).
  1295.        For example "LOOPBACK 4".
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.       PCL4P Users Manual                                      Page 20
  1318.  
  1319.  
  1320.  
  1321.  
  1322.                              Revision History
  1323.  
  1324.  
  1325.  
  1326.        Version 1.0 -- 14 January 1991 -- original release.
  1327.  
  1328.        Version 1.1 -- 11 March 1991
  1329.  
  1330.        o  Added SioUnGetc() function to library.
  1331.        o  Minor documentation changes.
  1332.  
  1333.        Version 1.2 -- 1 June 1991
  1334.  
  1335.        o  Name changed to Personal Communications Library.
  1336.        o  Minor bug fixes.
  1337.  
  1338.        Version 1.3 -- 1 July 1991
  1339.  
  1340.        o  Added NORESET option to SioReset.
  1341.        o  Added SioDSR, SioCTS, SioDCD, and SioRI.
  1342.        o  Added SioLoopBack function to library.
  1343.        o  Added LOOPBACK.PAS example program.
  1344.  
  1345.        Version 2.0 -- 1 Nov 1991
  1346.  
  1347.        o  All example code released in shareware package.
  1348.        o  Fixed bug due to Microsoft Assembler (MASM 5.0,5.1) error.
  1349.        o  Greatly expanded documentation.
  1350.  
  1351.        ( MarshallSoft incorporated on December 23, 1991 )
  1352.  
  1353.        Version 3.0 -- 15 Jan 1991
  1354.  
  1355.        o  Added XMODEM & YMODEM to example code.
  1356.        o  Added SioUART function.
  1357.        o  Added "UART undefined" error code.
  1358.        o  Added "Bad or missing UART" error code.
  1359.        o  Added "Port already enabled" error code.
  1360.        o  Added "Cannot enable both COM1 & COM3 ..." error code.
  1361.        o  Fixed several minor bugs ( using new automated testing ).
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.       PCL4P Users Manual                                      Page 21
  1384.  
  1385.  
  1386.  
  1387.  
  1388.                              License
  1389.  
  1390.  
  1391.  
  1392.        MarshallSoft Computing, Inc. grants the registered user  of  PCL4P
  1393.        the  right  to  use  the  PCL4P  library ( in object form ) in the
  1394.        development  of  any  software  product  without  any   royalties.
  1395.        However,  the  source  code for the library may not be released in
  1396.        whole or in part.
  1397.  
  1398.  
  1399.  
  1400.                              Warranty
  1401.  
  1402.  
  1403.  
  1404.        MARSHALLSOFT COMPUTING, INC. DISCLAIMS ALL WARRANTIES RELATING  TO
  1405.        THIS  SOFTWARE,  WHETHER  EXPRESSED  OR IMPLIED, INCLUDING BUT NOT
  1406.        LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY  AND  FITNESS
  1407.        FOR  A  PARTICULAR  PURPOSE, AND ALL SUCH WARRANTIES ARE EXPRESSLY
  1408.        AND SPECIFICALLY DISCLAIMED. NEITHER MARSHALLSOFT COMPUTING,  INC.
  1409.        NOR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION,
  1410.        OR  DELIVERY  OF  THIS  SOFTWARE SHALL BE LIABLE FOR ANY INDIRECT,
  1411.        CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING OUT  OF  THE  USE  OR
  1412.        INABILITY  TO  USE  SUCH  SOFTWARE EVEN IF MARSHALLSOFT COMPUTING,
  1413.        INC.  HAS BEEN ADVISED OF  THE  POSSIBILITY  OF  SUCH  DAMAGES  OR
  1414.        CLAIMS. IN NO EVENT SHALL MARSHALLSOFT COMPUTING, INC.'S LIABILITY
  1415.        FOR ANY SUCH DAMAGES EVER EXCEED THE PRICE PAID FOR THE LICENSE TO
  1416.        USE  THE SOFTWARE, REGARDLESS OF THE FORM OF THE CLAIM. THE PERSON
  1417.        USING  THE  SOFTWARE  BEARS  ALL  RISK  AS  TO  THE  QUALITY   AND
  1418.        PERFORMANCE OF THE SOFTWARE.
  1419.  
  1420.        Some  states  do not allow the exclusion of the limit of liability
  1421.        for consequential or incidental damages, so the  above  limitation
  1422.        may not apply to you.
  1423.  
  1424.        This  agreement  shall  be  governed  by  the laws of the State of
  1425.        Alabama and shall inure to the benefit of Marshallsoft  Computing,
  1426.        Inc.   and  any successors, administrators, heirs and assigns. Any
  1427.        action or proceeding brought by either  party  against  the  other
  1428.        arising  out of or related to this agreement shall be brought only
  1429.        in a STATE or FEDERAL COURT of competent jurisdiction  located  in
  1430.        Madison County, Alabama. The parties hereby consent to in personam
  1431.        jurisdiction of said courts.
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.       PCL4P Users Manual                                      Page 22
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.