


                  Windows Standard Serial Communications

                          Library for Delphi

                                 (WSC4D)


                               USERS MANUAL



                                Version 2.4

                                June 7, 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.



     WSC4D 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 WSC...........................................7
           3.2 Compiling Example Programs..............................7
           3.3 Using WSC with Others Applications......................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 EASY...................................................12
           8.2 SELFTEST...............................................12
           8.3 MODEM..................................................12
           8.4 TERM...................................................13
           8.5 FINDER.................................................13
           8.6 EVENT..................................................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..................................17
           10.3 Further Reading.......................................18
      11.0 Other MarshallSoft Computing Products for Delphi...........18
           11.1 Personal Communications Library for Pascal............18
           11.2 Personal Protocol Library for Pascal..................18
           11.3 Serial Libraries for Other Languages..................18
           11.4 Internet Libraries....................................19








     WSC4D Users Manual                                        Page 2

      1.0 Introduction

      The Windows Standard Communications Library for Delphi (WSC4D) 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 WSC4D DLLs (WSC16.DLL and WSC32.DLL) can be called from any
      application capable of calling Windows API functions, including those
      written in C/C++, Delphi, Visual Basic, MS Access, MS Excel, Fortran,
      COBOL, etc. The library runs under Windows NT, Windows 95/98, and
      Windows 3.1.

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

           Code := SioReset(COM1,128,128);    (* open COM1 *)
           Code := SioPuts(COM1,'HELLO',5);   (* write 'HELLO' to COM1 *)
           Code := SioDone(COM1);             (* close COM1 *)

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

              EASY  : A simple terminal emulator.

           SELFTEST : Performs COM port functionality testing.

              MODEM : Same as EASY but controls flow control, modem lines,
                      etc.

               TERM : Terminal emulator with XMODEM & YMODEM.

             FINDER : Searches for an attached modem.

              EVENT : Blocking version of EASY. Uses SioEvent.

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

      WSC4D uses the same functions and DLLs as our C/C++ product (WSC4C),
      our Power Basic Console Compiler product (WSC4PB), and our Visual
      Basic product (WSC4VB).

      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.



     WSC4D Users Manual                                        Page 3

      1.1 User Support

      We want you to be successful in developing your applications using
      WSC4D! We depend upon our customers to let us know what they need in
      a communications library.  This means we are committed to providing
      the best communications library that we can. If you have any
      suggestions or comments, please let us know.

      If you are having a problem using WSC4D, 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

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

      Our Windows Standard Serial Communications Library for C/C++ is one
      of the more popular downloads and a reviewers pick in the shareware
      libaries category.







     WSC4D Users Manual                                        Page 4

      1.4 Installation

      Installation of WSC4D 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 WSC4D, your Delphi compiler should
      already be installed on your system and tested. Note that
      Delphi 2.0 (or up) is required in order to create Win32 programs.

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

      (3) Delete all old versions (if any) of WSC16.DLL and WSC32.DLL.

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

           MKDIR   WSC
           PKUNZIP WSC4D24.ZIP WSC    'registered users unzip WSC4D.ZIP

      Run the install program INSTALL.BAT which will copy the correct
      files for your installation (Delphi 1.0 or Delphi 2.0 and above).

      If you are using 16-bit Delphi 1, then type:

           INSTALL 16               'for Windows 95/98 or Windows 3.1
           INSTALL 16 NT            'for Windows NT

      If you are using 32-bit Delphi 2 (or above), then type:

           INSTALL 32               'for Windows 95/98/NT

      The install program creates WSC4D.PAS from either WSC16.PAS or
      WSC32.PAS, and copies the proper DLLs. This way, the source code for
      the example programs is identical for both Delphi 1.0 (Win16) and
      Delphi 2.0 and up (Win32).

      1.5 Uninstalling

      Uninstalling WSC4D is very easy. WSC4D does NOT modify the registry.
      First, delete the WSC4D project directory created when installing
      WSC4D. Second, delete WSC16.DLL and WSC32.DLL from your Windows
      directory, typically C:\WINDOWS or C:\WINNT.

      1.6 Limitations on COM Ports

      The 32-bit version of WSC4D (WSC32.DLL) can use any port from COM1
      to COM20, provided that the port is known to Windows 95/98/NT and
      there is physical hardware present. More ports can easily be added by
      recompiling WSC32.C.

      The UART FIFO level can only be set from the Windows Control Panel.
      The recommended receive side trigger level is 8 or 14 for 16550
      UARTs. For more information on UARTS, see the RS232/485 Serial
      Communications Users Manual (ASYNC.TXT).



     WSC4D Users Manual                                        Page 5

      2.0 Library Overview

      2.1 Dynamic Link Libraries

      WSC4D includes both Win16 (WSC16.DLL) and a Win32 (WSC32.DLL)
      dynamic link library (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 WSC4D is a DLL, only one copy of the WSC4D 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 EASY can be
      started.  All copies of EASY 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. Since DLLs are the building blocks of the Windows
      Operations System, they will not be replaced by a "newer technology".

      2.2 Using the Library

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

      Please examine the WSC16.PAS and WSC32.PAS files. Note that COM1 is
      defined as port zero, not port one.  The user must assume the
      responsibility for passing the correct information when calling WSC4D
      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 WSC4D 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 WSC4D 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

      WSC4D is thread safe, and can be used from any Windows Win32
      application capable of using threads.

      Refer to the EVENT program (EVNT_PRJ) for an example of the use of
      threads with WSC4D.






     WSC4D Users Manual                                        Page 6

      3.0 Compiling Programs

      Each of the example programs should be compiled and run. Before
      beginning, be sure to run INSTALL that will copy the proper Win16 (or
      Win32) files.

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

      3.1 Compiling WSC

      Both WSC16.DLL and WSC32.DLL are written in standard ANSI C (WSC16.C
      and WSC32.C) , and has been compiled using Microsoft Visual C/C++
      with the STDCALL and DECLSPEC compiler keywords. Source code for the
      WSC library is provided in the registered version only.

      They 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.

      3.2 Compiling Example Programs

      Delphi project files are provided with all example programs. From the
      Delphi development environment, choose "File", then "Open Project".
      Delphi projects have extenstion ".DPR". All of the example programs
      can be compiled with any version of Delphi, except for the EVENT
      program (EVNT_PRJ) which requires Delphi version 2.0 or above.

      Refer to Section 8 "Example Programs" for more details.

      3.3 Using WSC with Others Applications

      The WSC functions in WSC16.DLL and WSC32.DLL can be called from any
      application capable of calling the Windows API.

      There are declaration files for Power Builder, Visual dBase, and
      Visual FoxPro in the Visual Basic version (WSC4VB) of this product.
















     WSC4D Users Manual                                        Page 7

      4.0 MODEM I/O (MIO)

      4.1 MIO Introduction

      The file MIO.PAS 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 WSC4D Reference Manual (WSC4D_R.TXT) for more
      detailed information.









     WSC4D 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 TERM program
      provides 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 TERM program 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.
      xySetParameter : Set a driver parameter.
           xyStartRx : Start a receive.
           xyStartTx : Start a transmit.

      Refer to the WSC4D Reference Manual (WSC4D_R.TXT) for more detailed
      information.















     WSC4D 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.





     WSC4D Users Manual                                        Page 10

      7.0 Problems

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

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

      If your application does not run but EASY 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.PAS (or WSC16.PAS) 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 EASY_PGM.PAS 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)? The typical error message refers to a "corrupted" DLL file.

      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.

      9. If you do not have the WSC.PAS file, you have not run
      INSTALL.BAT.

      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.




     WSC4D Users Manual                                        Page 11

      8.0 Example Programs

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


      8.1 EASY

      EASY (EASY_PRJ) is a very simple communications program using WSC4D.
      Everything that is typed on the keyboard is sent to the serial port,
      and everthing incoming from the serial port is displayed on the
      screen.

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

      A null-modem cable can also be used to connect two computers together
      with their serial ports. Run EASY on both machines. Whatever is typed
      on one machine will be displayed on the other.

      8.2 SELFTEST

      SELFTEST (SELF_PRJ) performs a serial port I/O functionality test.
      Either a pair of ports on the same computer (using a null modem
      cable) or a single port (using a loopback adapter) can be tested.

      Refer to LOOPBACK.TXT for an explanation of how to make a loopback
      adapter (without tools!).

      8.3 MODEM

      MODEM (MODM_PRJ) is similiar to EASY, but with enhanced capability.
      It can set flow control (hardware, software, or none), DTR line (set
      or clear), RTS line (set or clear), display the transmit & receive
      queue sizes, detect a break signal, detect changes in DSR and CTS, as
      well as check for various line errors (parity error, framing error,
      data overrun, receive queue overflow, and transmit buffer full).




















     WSC4D Users Manual                                        Page 12

      8.4 TERM

      TERM (TERM_PRJ) is a simple terminal emulator suitable for calling up
      a BBS and downloading or uploading files using XMODEM or YMODEM. The
      TERM program uses MIO32.DLL (or MIO16.DLL) for modem control
      commands, and the XYDRV32.DLL (or XYDRV16.DLL) for XMODEM & YMODEM
      file transfer.

      Selecting 'Dial' from the menu bar will result in a pop-up dialog
      requesting the phone number to dial. Once entered, the number is
      dialed, and the program will wait for up to 60 seconds for the
      'CONNECT' string from the modem.  This wait can be terminated at any
      time by choosing 'BREAK' on the menu bar.

      Once logged on, files can be uploaded or downloaded by selecting
      'Send' or 'Receive' from the menu bar. To abort a file transfer,
      choose 'BREAK' from the menu bar then type a series of Ctrl-X (^X)
      characters from the keyboard.

      8.5 FINDER

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


      8.6 EVENT

      The EVENT program (EVNT_PRJ) demonstrates the use of SioEvent in
      efficiently waiting for serial input. No polling or timer is
      required. EVENT operates like EASY.

      The EVENT example program requires Delphi 2.0 or above running under
      Windows 95/98/NT.
























     WSC4D Users Manual                                        Page 13

      9.0 Legal Issues

      9.1 Registration

      WSC4D may be registered for $85 plus $8 S&H ($13 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).
      Note:  All ordering information collected, including email addresses,
      is kept strictly confidential.

      Print the file INVOICE.TXT if a "Pro Forma" invoice is needed.

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

           o  Win16 / Win32 WSC4D Libraries w/o shareware screens.
           o  Win16 / 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 WSC4D shipped
      by US second day 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.



     WSC4D Users Manual                                        Page 14

      9.3 License

      MarshallSoft Computing, Inc. grants the registered user of WSC4D the
      right to use one copy of the WSC4D library (in object form) on a
      single computer in the development of any software product (other
      than libraries such as WSC4D). 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.













     WSC4D Users Manual                                        Page 15

      10.0 Summary

      10.1 Revision History


      Version 2.0: February 17, 1997.

          o  Includes Win16 (Delphi 1) and Win32 (Delphi 2) libraries.
          o  Added XMODEM & YMODEM DLL (XYDRV.DLL).
          o  Added TERM example program.

      Version 2.1: June 9, 1997.

          o  Screen display uses MEMO class.
          o  WIN32 version can display error text from Win32 Windows.
          o  Added FIND example program.
          o  Added SioRead function.
          o  SioInfo can return seconds to expiration [SHAREWARE].

      Version 2.2: October 20, 1997.

          o  New XYDRV code fixes bugs.
          o  Added xyGetFileName function to XYDRV.
          o  Supports up to 16 ports.
          o  WSC4D runs under Windows NT.

      Version 2.3: August 19, 1998

          o  Improvements to XYDRIVER (XMODEM and YMODEM).
          o  SioTimer function added.
          o  SioBaud and SioParms can be called before SioReset.


      Version 2.4: June 7, 1999

          o  Improvements made to XYDRIVER (XMODEM and YMODEM).
          o  Added SioEvent function (Win32 only).
          o  Added EVENT example program (Win32 only).




















     WSC4D Users Manual                                        Page 16

      10.2 WSC Function Summary

      Refer to the WSC4D Reference Manual (WSC4D_R.TXT) for detailed
      information.

      Refer to the RS232/485 Serial Commuications Users Manual (ASYNC.TXT)
      for technical information on UARTs, modems, and other RS232 issues.

      A one line summary of each function follows:

      +-------------+-----------------------------------------------------+
      | 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 specified 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.               |
      +-------------+-----------------------------------------------------+



















     WSC4D Users Manual                                        Page 17

      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 Communication Users
      Manual (ASYNC.TXT). For more detailed information on XMODEM, YMODEM,
      and ZMODEM, download PPL4VB (see 11.2 below).

      11.0 Other MarshallSoft Computing Products for Delphi

      Several shareware products are available from MarshallSoft Computing.

      11.1 The Personal Communications Library for Pascal / DOS

      Personal Comm Library for Pascal. (PCL4P62.ZIP), January 99, Ver 6.2,
      [ASP]. Supports real and 16-bit protected mode, 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 Borland or Turbo Pascal compiler. $85 +
      S&H.

      11.2 The Personal Protocol Library for Pascal / DOS

      Personal Protocol Library for Pascal (PPL4P10.ZIP), Feb 95, Ver 2.0,
      [ASP]. PPL4P is a protocol library supporting ASCII, XMODEM,
      XMODEM-CRC, XMODEM-1K, YMODEM, YMODEM-G, and ZMODEM protocols.
      Requires the Personal Communications Library for Pascal (PCL4P). $40.

      11.3 Serial Libraries for Other Languages

      We have communications libraries for C/C++, Turbo Pascal, Visual
      Basic, and Power Basic. 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).
       PCL4PB : Power Basic, DOS.

        PCL4W : C/C++, Windows 3.1 & Win 95/98, talks to hardware directly.
       PCLVBW : Visual Basic, Win 3.1 & Win 95/98, talks to hardware directly.

        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 : Power Basic Console Compiler, Win 95/98/NT. Uses Win API.







     WSC4D Users Manual                                        Page 18

       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 + S&H.

        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 : Power Basic, 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.






















     WSC4D Users Manual                                        Page 19

