


                  Windows Standard Serial Communications

                          Library for PowerBASIC

                                 (WSC4PB)


                               USERS MANUAL



                                Version 2.4

                                May 24, 1999




                     This software is provided as-is.
              There are no warranties, expressed or implied.




                           Copyright (C) 1999
                           All rights reserved




                           MarshallSoft Computing, Inc.
                           Post Office Box 4543
                           Huntsville AL 35815

                           Voice : 256-881-4630
                             FAX : 256-880-0925
                           email : info@marshallsoft.com
                             web : www.marshallsoft.com


                               _______
                          ____|__     |                (R)
                       --+       |    +-------------------
                         |   ____|__  |  Association of
                         |  |       |_|  Shareware
                         |__|   o   |    Professionals
                       --+--+   |   +---------------------
                            |___|___|    MEMBER




      MARSHALLSOFT is a registered trademark of MarshallSoft Computing.



     WSC4PB Users Manual                                       Page 1

                            C O N T E N T S


      Chapter                                                   Page

       1.0 Introduction................................................3
           1.1 User Support............................................4
           1.2 ASP Ombudsman...........................................4
           1.3 Awards..................................................4
           1.4 Installation............................................5
           1.5 Uninstalling............................................5
           1.6 Limitations on COM Ports................................5
       2.0 Library Overview............................................6
           2.1 Dynamic Link Libraries..................................6
           2.2 Using the Library.......................................6
           2.3 Win32 STDCALL and DECLSPEC..............................6
           2.4 Using Threads...........................................6
       3.0 Compiling Programs..........................................7
           3.1 Compiling Programs......................................7
           3.2 Compiling WSC...........................................7
       4.0 Modem I/O...................................................8
           4.1 MIO Introduction........................................8
           4.2 MIO Function Summary....................................8
       5.0 XMODEM & YMODEM ............................................9
           5.1 XYDRIVER Introduction...................................9
           5.2 XYDRIVER Function Summary...............................9
       6.0 ASCII File Transfer........................................10
       7.0 Problems...................................................11
       8.0 Example Programs...........................................12
           8.1 SIMPLE.................................................12
           8.2 SELFTEST...............................................12
           8.3 XMR, XMS, YMR, YMS.....................................12
           8.4 FINDER.................................................13
           8.5 ECHOPORT...............................................13
           8.6 DIALER.................................................13
           8.7 RS485.C................................................13
       9.0 Legal Issues...............................................14
           9.1 Registration...........................................14
           9.2 Academic Discount......................................14
           9.3 License................................................15
           9.4 Warranty...............................................15
      10.0 Summary....................................................16
           10.1 Revision History......................................16
           10.2 WSC Function Summary..................................16
           10.3 Further Reading.......................................17
      11.0 Other MarshallSoft Computing Products for PowerBASIC.......17
           11.1 Personal Communications Library for PowerBASIC........17
           11.2 Personal Protocol Library for PowerBASIC..............17
           11.3 Serial Libraries for Other Languages..................17
           11.4 Internet Libraries....................................18








     WSC4PB Users Manual                                       Page 2

      1.0 Introduction

      The Windows Standard Serial Communications Library for PowerBASIC
      (WSC4PB) is an asynchronous communications dynamic link library
      (DLL) which uses the standard Windows serial communications API.
      Since it uses the Windows API, programs using the WSC library are
      fully compatible with other Window applications which also use the
      Windows serial communications API.

      The WSC4PB dynamic link library (WSC32.DLL) can be called from any
      WIN32 application capable of calling Windows API functions, including
      those written in C/C++, Delphi, Visual Basic, MS Access/EXcel/Word,
      Fortran, COBOL, PowerBuilder, Visual FoxPro, Visual dBase, etc. The
      library runs under NT 4.0 and Windows 95/98.

      Using WSC is very straight-forward. For example, to write "HELLO" to
      the serial port COM1:

           Dim Text As Asciiz * 5
           Dim Code As Long
           Text = "HELLO"

           Code = SioReset(%COM1,512,512)  'open COM1 with 512 KB buffers
           Code = SioPuts(%COM1,Text,6)    'write "HELLO" to COM1
           Code = SioDone(%COM1)           'close COM1

      Several PowerBASIC example programs with full source code are included.
      Refer to Chapter 8 for more details on each of the example programs.

             SIMPLE : A simple terminal emulator.
           SELFTEST : Performs COM port functionality testing.
                XMR : Receives files via XMODEM protocol.
                YMR : Receives files via YMODEM protocol.
                XMS : Sends files via XMODEM protocol.
                YMS : Sends files via YMODEM protocol.
             FINDER : Finds a modem connected to one of your serial ports.
           ECHOPORT : Multi-threaded console mode program echoes all input.
             DIALER : Modem dialer.
              RS485 : RS485 example program.

      WSC4PB contains 27 functions. All functions return a negative number
      if an error condition is detected.  For more details, consult the
      WSC4PB Reference Manual (WSC4PB_R.TXT) and the RS232/422/485 Serial
      Communications Users Manual (ASYNC.TXT).

      Our goal is to provide a robust serial communications library that
      you and your customers can depend upon. Contact us if you have any
      questions.

      The shareware and registered versions are identical except that the
      shareware version displays the "shareware" screen when first
      starting, after 20 minutes of run time, and every 10 minutes after
      that. The registered version also includes source code.





     WSC4PB Users Manual                                       Page 3

      1.1 User Support

      We want you to be successful in developing your applications using
      WSC4PB! We depend upon our customers to let us know what they need in
      a communications library. If you have any suggestions or comments,
      please let us know.

      If you are having a problem using WSC4PB, email us at

         support@marshallsoft.com

      You can also reach us at 256-881-4630 between 7:00 AM and 7:00 PM CST
      Monday through Friday. You can also often get us on the weekend.

      The latest versions of our products are available on our web site at

         http://www.marshallsoft.com

      and on our anonymous FTP site at

         ftp://ftp.marshallsoft.com/marshallsoft

      The MarshallSoft Computing newsletter "Comm Talk" is published
      quarterly on our web site.  It discusses various communications
      problems and solutions using our products as well as related
      information.

      1.2 ASP Ombudsman

      MarshallSoft Computing, Inc. is a member of the Association of
      Shareware Professionals (ASP).  ASP wants to make sure that the
      shareware principle works for you.  If you are unable to resolve a
      shareware-related problem with an ASP member by contacting the member
      directly, ASP may be able to help. The ASP Ombudsman can help you
      resolve a dispute or problem with an ASP member, but does not provide
      technical support for members' products. Please write to the ASP
      Ombudsman at 157-F Love Ave., Greenwood, IN 26142 USA, FAX
      317-888-2195, or send email to omb@asp-shareware.org.

      1.3 Awards

      WSC4PB has been rated 4 stars by Ziff Davis on the web at
      http://www.hotfiles.com. The Visual Basic version (which uses the
      same DLLs) has been rated 5 stars, their highest rating.

      WSC4PB is also one of the most popular PowerBASIC downloads in the
      software tools section of many web download sites.











     WSC4PB Users Manual                                       Page 4

      1.4 Installation

      Installation of WSC4PB is very straight-forward. Unzip the archive
      and go! The windows registry is not written to, nor are any hidden
      files created. That is,

      (1) Before installation of WSC4PB, your PowerBASIC Console Compiler
      should already be installed on your system and tested.

      (2) Start a console (command line) window.

      (3) Delete all old versions (if any) of WSC32.DLL from your system.

      (4) Create your WSC project directory, copy the WSC archive, then
      unzip the archive. For example:

                MKDIR   WSC
                PKUNZIP WSC4PB24.ZIP WSC

      Run INSTALL.BAT to copy the DLL's to your Windows directory. You are
      now ready to compile and run a test program. Refer to Section 3.0
      "Compiling Programs" for details.

      1.5 Uninstalling

      Uninstalling WSC4PB is very easy. WSC4PB does NOT modify the
      registry. First, delete the WSC4PB project directory created when
      installing WSC4PB. Second, delete WSC32.DLL from your Windows
      directory, typically C:\WINDOWS for Windows 95/98 or C:\WINNT for
      Windows NT.

      Running the UINSTALL.BAT batch file will also delete WSC32.DLL as
      described above.

      1.6 Limitations on COM Ports

      WSC4PB can use any port from COM1 to COM20, provided that the port is
      known to Windows and there is physical hardware present. More ports
      can easily be added by recompiling WSC32.C.



















     WSC4PB Users Manual                                       Page 5

      2.0 Library Overview

      2.1 Dynamic Link Libraries

      WSC4PB uses a Win32 dynamic link library (WSC32.DLL). A DLL is
      characterized by the fact that it need not be loaded until required
      by an application program and that only one copy of the DLL is
      necessary regardless of the number of application programs that use
      it. Contrast this to the traditional static library which is bound to
      each and every application that uses it at link time.

      Since WSC4PB is a DLL, only one copy of the WSC4PB code is loaded
      into memory regardless of the number of applications programs that
      use it. For example, more than one instance of the test program
      SIMPLE can be started.  All copies of SIMPLE can run concurrently as
      long as each uses a different COM port.

      An important advantage that DLLs have over other "popular" library
      formats such as VBX or OCX is that DLLs are callable by all Windows
      applications. And, since DLLs are the building blocks of the Windows
      Operating System, they will not be replaced by a "newer" technology.

      2.2 Using the Library

      The WSC4PB has been tested on multiple computers running Windows
      95/98 and Windows NT 4.0.

      Please examine the WSC32.BAS file. Note that %COM1 is defined as port
      zero, not port one.  The user must assume the responsibility for
      passing the correct information when calling WSC4PB functions.

      2.3 Win32 STDCALL and DECLSPEC

      WSC32 is written in ANSI C and is compiled using the _stdcall and
      _declspec keywords. This means that WSC4PB uses the same calling
      conventions and file naming conventions as the Win32 API. In
      particular, function names are NOT decorated. There is no leading
      underscore nor trailing "@size" added to function names.

      The WSC32.DLL functions may be called by any Windows application
      program capable of calling the Windows API provided the proper
      declaration file is used.

      2.4 Using Threads

      WSC4PB is thread safe. Refer to the ECHOPORT example program, which
      demonstrates the use of multiple threads. ECHOPORT also demonstrates
      the use of the WIN32 Sleep() function.










     WSC4PB Users Manual                                       Page 6

      3.0 Compiling Programs

      Compiling programs using the PowerBASIC Console Compiler is very
      easy. For example, to compile SIMPLE.BAS, type

         PBCC SIMPLE.BAS

      at the command prompt. If your program requires access to any Windows
      API functions, you must include the path on the command line. For
      example, assuming that you have installed PBCC at C:\PBCC10, to
      compile the ECHOPORT.BAS program, type

         PBCC ECHOPORT.BAS -IC:\PBCC10\WINAPI

      Refer to section 8.0 "Example Programs" for more information on the
      example programs.

      3.1 Compiling WSC

      WSC32.DLL is written in standard ANSI C (WSC32.C), and has been
      compiled using Microsoft Visual C/C++ with the STDCALL and DECLSPEC
      compiler keywords.

      WSC32.C may also be compiled using Borland C/C++ or Watcom C/C++
      compilers. If you recompile WSC32.C using Borland or Watcom
      compilers, the resulting WSC32.DLL can only be used by applications
      compiled with the same compiler, unless the "_stdcall" and
      "_declspec" keywords are specified.

      For more information on the C/C++ version of WSC, download the latest
      version of WSC4C from our web site at www.marshallsoft.com.



























     WSC4PB Users Manual                                       Page 7

      4.0 MODEM I/O (MIO)

      4.1 MIO Introduction

      The file MIO32.BAS contains prototypes for using the Modem I/O DLL.
      These functions ease communicating with modems using AT commands.

      The MIO functions are broken down into parts called states, and
      control is returned to Windows between executing each state.

      For example:

      (1) Send the string to the MIO driver by executing:

      Code = mioSendTo(Port,100,"!ATDT1,256,880,9748")

      The '!' characters are converted to carriage returns.  The text
      string is copied into the driver's data area.

      (2) Call mioDriver (typically based on a timer) until MIO_IDLE is
      returned. Each time mioDriver is called, it will send another
      character to the modem provided the required delay (since the
      previous character was sent) has passed.  If the delay has not
      passed, the driver simply returns MIO_RUNNING, but without actually
      sending a character to the modem.  Once all characters have been
      sent, mioDriver will return MIO_IDLE, indicating it is done and is
      ready to accept another function.

      mioDriver will return MIO_RUNNING if it is still processing. Any
      other return value indicates that it is still processing and the
      returned value is a character from the modem that can be displayed if
      wanted.

      (3) Once mioDriver returns MIO_IDLE, call mioResult to get the
      result of the mioSendTo call.

      4.2 MIO Function Summary

       mioDriver : Drives the execution of mioSendTo, mioWaitFor, or
                   mioQuiet once they have been started.
        mioBreak : Forces the MIO driver to IDLE state.
       mioSendTo : Sends a string (including control chars) to the modem.
      mioWaitFor : Waits  for a particular string from the modem, passing
                   all else through.
        mioQuiet : Waits for continuous quiet of a specified duration.
        mioBreak : Breaks further modem I/O activity.

      Refer to the WSC4PB Reference Manual (WSC4PB_R.TXT) for more
      detailed information.









     WSC4PB Users Manual                                       Page 8

      5.0 XMODEM & YMODEM


      5.1 XYDRIVER Introduction

      The XMODEM & YMODEM functions are implemented in XYDRV as a DLL
      (Dynamic Link Library), and are state driven like the Modem I/O
      functions described in the previous section. The XMR, XMS, YMR, and
      YMS programs provide an example of using XYDRV.

      Files can be sent and received using XMODEM, XMODEM/CRC, XMODEM/1K,
      and YMODEM. The basic procedure used to run XMODEM or YMODEM is as
      follows:

      (1) Call xyAcquire() immediately after calling SioReset().

      (2) To receive a file, call xyStartRx(), then call xyDriver()
          repeatedly until XY_IDLE is returned.

      (3) To send a file, call xyStartTx(), then call xyDriver() repeatedly
          until XY_IDLE is returned.

      (4) Call xyRelease() immediately before calling SioDone().

      Refer to the XMR, XMS, YMR, and YMS programs for examples of calling
      the XYDRV functions.

      5.2 XYDRIVER Function Summary

             xyAbort : Abort driver at any time.
           xyAcquire : Acquire a port.
             xyDebug : Set the debug level.
            xyDriver : Executes the next state or states.
        xyGetMessage : Get the next debug message.
      xyGetParameter : Get a driver parameter.
       xyGetFileName : Get name of file being sent or received.
           xyRelease : Release a port.
           xyStartRx : Start a receive.
           xyStartTx : Start a transmit.

      Refer to the WSC4PB Reference Manual (WSC4PB_R.TXT) for more detailed
      information.
















     WSC4PB Users Manual                                       Page 9

      6.0 ASCII File Transfer

      6.1 ASCII Protocol

      The "ASCII Protocol" is not a defined protocol, but rather it is a
      loose set of conventions developed over a period of years by BBS
      operators. Because XON/OFF flow control is used, only ASCII text can
      be transferred. The ASCII protocol is implemented as a DLL and is
      state driven like the MIO and XYDRIVER code.

      (1) Call ascInit(Port,RxQueSize,xFlag) to do initialization, where

            Port = The connected port (COM1, COM2, etc).
       RxQueSize = The size of the Rx Queue as passed to SioReset().
           xFlag = 1 if this module will perform XON/XOFF flow control.
                   Set to FALSE if flow control is being performed by the
                   WSC code (you called SioFlow()).

      (2) To send an ASCII file, call

      ascStartTx(FileName,CharPace,TermChar,EchoFlag), where
         FileName = The path & name of the file to send.
         CharPace = The delay in milliseconds between characters.
         TermChar = The termination character to send after the file
                    has been sent. If none, use 0x00.
         EchoFlag = 1 if screen echo is desired.

      Then call ascDriver() until it returns IDLE (1).

      (3) To receive an ASCII file, call

      ascStartRx(FileName,TermChar,FirstWait,CharWait,EchoFlag), where
         FileName = The path & name of the file to send.
         TermChar = The termination character. If none, use 0x00.
        FirstWait = The maximum number of seconds to wait for the
                    first incoming character.
         CharWait = The maximum number of seconds after which it is
                    assumed that the other side has completed sending.
                    If unsure, set this to 3 seconds.
         EchoFlag = 1 if screen echo is desired.

      Then call ascDriver() until it returns IDLE (1).

      6.2 ASCII Function Summary

             ascAbort : Abort driver at any time.
            ascDriver : Executes the next state or states.
        ascGetMessage : Get the next debug message.
      ascGetParameter : Get a driver parameter.
       ascGetFileName : Get name of file being sent or received.
              ascInit : Initialize the driver.
           ascStartRx : Start a receive.
           ascStartTx : Start a transmit.





     WSC4PB Users Manual                                       Page 10

      7.0 Problems

      If you cannot get your application to run properly, first compile and
      run the example program SIMPLE.BAS. Test SIMPLE by connecting two
      computers with a null modem cable or by connecting a modem to a
      serial port.

      Once SIMPLE runs, compile and run the SELFTEST program.  This
      program will test your serial ports' functionality.

      If your application does not run but SIMPLE and SELFTEST run
      correctly, then you have most likely made a programming mistake in
      your application. MarshallSoft Computing cannot debug your
      application, especially over the telephone!  However, consider each
      of the following when searching for an error in your application.

      1.  Have you included the file WSC32.BAS in your application ?

      2.  Are your receive and transmit buffers large enough ? Use a buffer
      size that is twice the size of the largest expected block.

      3.  Have you selected too high a baud rate? Windows can multitask
      many tasks at once. You may have to lower your baud rate (or get
      16550 UARTS).

      4.  Did SioReset return a zero value ?  If not, then you must call
      SioReset again. See SIMPLE.BAS for an example.

      5.  Did you send the proper initialization string to your modem ?
      Did you set DTR and RTS? (you should).

      7. Are you trying to link a 32-bit DLL to a 16-bit program (or vice
      versa)? Keep Win16 & Win32 development separate.

      8.  If you are using the registered version of WSC and you are still
      getting the shareware screen, make sure you have deleted all copies
      of the WSC shareware DLL's in the Windows search path.

      We recommend the following steps if you believe that you have
      discovered a bug in the library: (1) Create the smallest, simplest
      test program possible that demonstrates the problem.  (2) Document
      your exact machine configuration and what error the test program
      demonstrates.  (3) Email us the example source.

      If the problem can be solved with an easy work-around, we will
      publish the work-around.  If the problem requires a modification to
      the library, we will make the change and make the modified library
      available to our customers without charge.










     WSC4PB Users Manual                                       Page 11

      8.0 Example Programs

      The example programs are designed to demonstrate the various
      capabilities of WSC4PB. The best way to become familiar with WSC4PB
      is to study and run the example programs.

      8.1 SIMPLE

      SIMPLE is a very simple communications program using WSC4PB.
      Everything typed on the keyboard is sent to the serial port, and
      everything incoming from the serial port is displayed on the screen.

      For example, to start SIMPLE on COM1 at 38500 baud, type

         SIMPLE 1 38400

      The easiest way to test SIMPLE is to connect to a modem.  Typing "AT"
      should result in an "OK" being displayed.

      8.2 SELFTEST

      SELFTEST performs a serial port I/O functionality test using a
      loopback adapter. Refer to LOOPBACK.TXT for an explanation of how to
      make a loopback adapter (without tools!).

      To start SELFTEST on COM2 at 115200 baud, type

         SELFTEST 2 115200

      8.3 XMR, XMS, YMR, YMS

      The XMR.BAS example program receives file using the XMODEM protocol.
      To start, the other side must be running XMODEM send, such as the XMS
      program. Type

         XMR <port> <baudrate> <filename>

      to start the XMODEM receive on your end. For example,

         XMR 1 19200 hello.txt

      will receive (provided the other side sends it) a file on COM1 at
      19200 baud and will save it in the current directory as "hello.txt".

      The other 3 example programs work similarly. XMS sends a file using
      XMODEM protocol. YMR receives using the YMODEM protocol. YMS sends
      using the YMODEM protocol.

         XMS <port> <baudrate> <filename>
         YMR <port> <baudrate>
         YMS <port> <baudrate> <filename>

      Note that YMODEM receive (YMR) does not specify the filename since it
      is received along with the file from the sender.




     WSC4PB Users Manual                                       Page 12

      8.4 FINDER

      The FINDER program searches for a connected modem. Your modem must be
      connected to one of COM1, COM2, COM3, or COM4, and must be turned on.

      FINDER takes no arguments. After connecting your modem to one of your
      serial ports, type

         FINDER

      8.5 ECHOPORT

      The ECHOPORT console mode program demonstrates the use of threads.
      Connect COM1 and COM2 to another computer or serial device using a
      NULL modem cable. ECHOPORT will echo back to the remote anything it
      receives on the serial port.

      ECHOPORT takes no arguments. To start ECHOPORT, type

         ECHOPORT

      8.6 DIALER

      DIALER is similar to the SIMPLE example program, except that it dials
      a remote computer using the modem connected to your serial port. For
      example, to dial the number 880-9748 on COM1 at 19200 baud, type

         DIALER 1 19200 880,9748

      DIALER is also an example of using the Modem I/O functions. Refer to
      the WSC4PB Reference Manual (WSC4PB_R.TXT) for information on the
      Modem I/O functions.

      8.7 RS485

      The RS485 example program operates like SIMPLE, except that it
      assumes an RS485 port. RTS is set before transmitting data, and
      cleared after the last bit of the last byte has been sent.




















     WSC4PB Users Manual                                       Page 13

      9.0 Legal Issues

      9.1 Registration

      WSC4PB may be registered for $85 plus $7 S&H ($12 outside of North
      America).

      To order, contact us as shown on the title page of this manual. All
      prices are guaranteed for one year from the release date.

      Multiple copy discounts (3 or more) and site licenses are available.
      Please call for details.

      We accept American Express, VISA, MasterCard, Discover, checks in US
      dollars drawn on a US bank, International Postal Money Orders,
      purchase orders (POs) from recognized US schools and companies listed
      in Dun & Bradstreet, and COD (street address and phone number
      required) within the USA (plus a $5 COD charge).

      For credit card orders, be sure to include the account number, the
      expiration date, the exact name on the card, and the complete card
      billing address (address to which the credit card bill is mailed).

      Print the file INVOICE.TXT if a "Pro Forma" invoice is needed. Note
      that all ordering information collected, including email addresses,
      is kept strictly confidential.

      If you wish to update from an older version of WSC4PB, updates are
      $30 plus $7 S&H ($12 S&H outside of North America). The registered
      package includes:

           o  Win32 WSC4PB Libraries w/o shareware screens.
           o  Win32 source code for WSC, MIO, and XYDRIVER.
           o  Printed Users Manual, Reference Manual, and RS232 Manuals.
           o  Telephone and email support for one year.

      The registered user will receive the latest version of WSC4PB shipped
      by US Priority mail (packet airmail overseas).  A 3.5" HD diskette is
      provided.

      9.2 Academic Discount

      We offer an "academic price" of 40% off the normal price for prepaid
      email orders to faculty and students currently enrolled in any
      accredited high school, college, or university. To qualify for the
      discount, your school must have a web site and you must have an email
      address at your school.

      When ordering, ask for the "academic discount", or enter "student at"
      (or "faculty at") and your schools web site address (URL) in the
      comments field of the order form on our web site order page.

      This offer is not retroactive and cannot be used with any other
      discount. Products bought with academic pricing can not be used for
      any commercial purpose.



     WSC4PB Users Manual                                       Page 14

      9.3 License

      MarshallSoft Computing, Inc. grants the registered user of WSC4PB the
      right to use one copy of the WSC4PB library (in object form) on a
      single computer in the development of any software product (other
      than libraries such as WSC4PB). The user may not use the library on
      more than one computer at the same time.  The source code for the
      library (WSC16.C, WSC32.C, MIO.C, XYDRV.C, ASDRV.C) is copyrighted by
      MarshallSoft Computing and may not be released in whole or in part.
      The registered DLLs may be distributed (without royalty) in object
      form only, as part of the user's compiled application.  The
      registered DLL's may NOT be distributed as part of any software
      development system (compiler or interpreter) without our express
      written permission.

      9.4 Warranty

      MARSHALLSOFT COMPUTING, INC.  DISCLAIMS ALL WARRANTIES RELATING TO
      THIS SOFTWARE, WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
      LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
      A PARTICULAR PURPOSE, AND ALL SUCH WARRANTIES ARE EXPRESSLY AND
      SPECIFICALLY DISCLAIMED. NEITHER MARSHALLSOFT COMPUTING, INC.  NOR
      ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION, OR
      DELIVERY OF THIS SOFTWARE SHALL BE LIABLE FOR ANY INDIRECT,
      CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING OUT OF THE USE OR
      INABILITY TO USE SUCH SOFTWARE EVEN IF MARSHALLSOFT COMPUTING, INC.
      HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR CLAIMS. IN NO
      EVENT SHALL MARSHALLSOFT COMPUTING, INC.'S LIABILITY FOR ANY SUCH
      DAMAGES EVER EXCEED THE PRICE PAID FOR THE LICENSE TO USE THE
      SOFTWARE, REGARDLESS OF THE FORM OF THE CLAIM. THE PERSON USING THE
      SOFTWARE BEARS ALL RISK AS TO THE QUALITY AND PERFORMANCE OF THE
      SOFTWARE.

      Some states do not allow the exclusion of the limit of liability for
      consequential or incidental damages, so the above limitation may not
      apply to you.

      This agreement shall be governed by the laws of the State of Alabama
      and shall inure to the benefit of MarshallSoft Computing, Inc.  and
      any successors, administrators, heirs and assigns.  Any action or
      proceeding brought by either party against the other arising out of
      or related to this agreement shall be brought only in a STATE or
      FEDERAL COURT of competent jurisdiction located in Madison County,
      Alabama. The parties hereby consent to in personam jurisdiction of
      said courts.













     WSC4PB Users Manual                                       Page 15

      10.0 Summary

      10.1 Revision History

      Versions 1.0, 2.0, 2.1, and 2.2:

         No PowerBASIC version.

      Version 2.3: August 3, 1998.

         Initial release of PowerBASIC version.

      Version 2.4: May 24, 1999.

         o SioEvent function efficiently blocks waiting for event.
         o XYDRV can send multiple files in YMODEM. XYDRV is thread safe.
         o Specify default DTR and RTS behavior with SioReset.
         o New example programs (RS485,XMS,XMR,YMS,YMS).

      10.2 WSC Function Summary

      Refer to the WSC4PB Reference Manual (WSC4PB_R.TXT) for detailed
      information.  Refer to the RS232/422/485 Serial Communications Users
      Manual (ASYNC.TXT) for technical information on UARTs, modems, and
      other RS232 issues.

      +-------------+-----------------------------------------------------+
      | SioBaud     |  Sets the baud rate of the selected port.           |
      | SioBrkSig   |  Asserts, cancels, or detects BREAK signal.         |
      | SioCTS      |  Reads the Clear to Send (CTS) modem status bit.    |
      | SioDCD      |  Reads the Data Carrier Detect (DCD) modem status.  |
      | SioDone     |  Terminates further serial processing.              |
      | SioDSR      |  Reads the Data Set Ready (DSR) modem status bit.   |
      | SioDTR      |  Set, clear, or read the Data Terminal Ready (DTR). |
      | SioEvent    |  Efficiently waits for serial event.                |
      | SioFlow     |  Enables / disables hardware flow control.          |
      | SioGetc     |  Reads the next character from the serial line.     |
      | SioGets     |  Receives a string of characters.                   |
      | SioInfo     |  Returns information such as library version.       |
      | SioParms    |  Sets parity, stop bits, and word length.           |
      | SioPutc     |  Transmit a character over a serial line.           |
      | SioPuts     |  Transmits a string of characters.                  |
      | SioRead     |  Reads any UART register.                           |
      | SioReset    |  Initialize a serial port for processing.           |
      | SioRI       |  Reads the Ring Indicator (RI) modem status bit.    |
      | SioRTS      |  Sets, clears, or reads the Request to Send (RTS).  |
      | SioRxClear  |  Clears the receive buffer.                         |
      | SioRxQue    |  Returns the number of characters in the RX queue.  |
      | SioStatus   |  Returns the serial port line status.               |
      | SioTimer    |  Returns the system times in milliseconds.          |
      | SioTxClear  |  Clears the transmit buffer.                        |
      | SioTxQue    |  Returns the number of characters in the TX queue.  |
      | SioUnGetc   |  "Ungets" (puts back) a specified character.        |
      | SioWinError |  Returns Win32 error message as text.               |
      +-------------+-----------------------------------------------------+



     WSC4PB Users Manual                                       Page 16

      10.3 Further Reading

      The best way to learn about serial communications is to read a good
      book on the subject. Several good texts are available.  Two that I
      like are:

      (1) C Programmer's Guide to Serial Communications by Joe Campbell
      (SAMS) (2) Mastering Serial Communications by Peter Gofton (SYBEX).

      Don't forget to read over the RS232/485 Serial Communications Users
      Manual (ASYNC.TXT). For more detailed information on XMODEM, YMODEM,
      and ZMODEM, download PPL4PB (see 11.2 below).

      11.0 Other MarshallSoft Computing Products for PowerBASIC

      Several shareware products are available from MarshallSoft Computing.

      11.1 The Personal Communications Library for PowerBASIC / DOS

      Personal Comm Library for PowerBASIC. (PCL4PB62.ZIP), Jan 99, Ver
      6.2, [ASP]. Supports COM1 thru COM20 to 115200, 4 plus ports
      concurrently, many dumb multiport boards, 16550, 16650, 16750 UARTs,
      interrupt driven, RTS/CTS flow control, any UART address and IRQ.
      Requires PowerBASIC compiler (ver 3.0c or higher). $85 + S&H.

      11.2 The Personal Protocol Library for PowerBASIC / DOS

      Personal Protocol Library for PowerBASIC (PPL4PB10.ZIP), April 95,
      Ver 1.0, [ASP]. PPL4PB is a protocol library supporting ASCII,
      XMODEM, XMODEM-CRC, XMODEM-1K, YMODEM, YMODEM-G, and ZMODEM
      protocols. Requires the Personal Communications Library for Power
      BASIC (PCL4PB). $40.

      11.3 Serial Libraries for Other Languages

      We have DOS and Windows communications libraries for C/C++, Turbo
      Pascal, Visual Basic, and PowerBASIC. All PCL libraries support the
      8250, 16450, 16550, 16650, and 16750 UARTs. Check our WEB site.

        PCL4C : C/C++, DOS (includes 16-bit protected mode).
        PCL4P : Turbo Pascal, DOS (includes 16-bit protected mode).
       PCL4VB : Visual Basic, DOS (VBDOS). Also supports Quick Basic.
       PCL4PB : PowerBASIC, DOS.

        WSC4C : C/C++, Win 3.1/95/98/NT. Uses Windows API.
       WSC4VB : Visual Basic, Win 3.1/95/98/NT. Uses Windows API.
        WSC4D : Borland Delphi, Win 3.1/95/98/NT. Uses Windows API.
       WSC4PB : PowerBASIC Console Compiler, Win 95/98/NT. Uses Win API.










     WSC4PB Users Manual                                       Page 17

       11.4 Internet Libraries

        WIL4C : C/C++, Win 3.1/95/98/NT. The "Winsock Interface Library"
                supports TCP,SMTP,POP3,TELNET,FTP, etc.

                WINSOCK INTERFACE LIBRARY for C/C++. Win16 & Win32 DLLs.
                (WIL4C20.ZIP). Feb 14, 1998. Version 2.0, [ASP]. The
                Winsock Interface Library simplifies winsock network
                communications programming and provides support for the
                most common Internet protocols such as Finger, SMTP, POP3,
                FTP, NNTP, and HTTP. Requires windows C compiler.
                Registration is $95 + $7 S&H ($12 overseas).

        SEE4C : C/C++, Win 3.1/95/98/NT. The simplest way to email from your
                C/C++ application, including MIME attachments.

                SMTP/POP3 Email Engine for C/C++. Ver 3.0. Win16 and Win32
                DLLs. (SEE4C30.ZIP) 4/1/99. Email from your C/C++
                application. Simple API allows sending & receiving email,
                including MIME attachments. Knowledge of Winsock and TCP/IP
                is not needed. Includes multiple C/C++ examples. Requires
                windows C/C++ compiler. Registration is $95.

       SEE4VB : Visual Basic, Win 3.1/95/98/NT.

       SEE4PB : PowerBASIC, Windows 95/98/NT.

        SEE4D : Delphi, Win 3.1/95/98/NT.

       SEE4DB : Visual dBase, Windows 95/98/NT.

       SEE4FP : Visual FoxPro, Windows 95/98/NT.

        SEE4F : ABSOFT Fortran, Windows 95/98/NT.

       SEE4CB : Fujitsu COBOL, Windows 95/98/NT.






















     WSC4PB Users Manual                                       Page 18

