home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1996 December / CD_shareware_12-96.iso / WIN / Programa / WSC4VB10.ZIP / WSC4VB_U.DOC < prev    next >
Encoding:
Text File  |  1996-08-26  |  44.8 KB  |  1,361 lines

  1.  
  2.  
  3.                  Windows Standard Communications
  4.  
  5.                      Library for Visual Basic
  6.  
  7.                              (WSC4VB)
  8.  
  9.  
  10.                           USERS MANUAL
  11.  
  12.  
  13.  
  14.                             Version 1.0
  15.  
  16.                            August 25, 1996
  17.  
  18.  
  19.  
  20.  
  21.                  This software is provided as-is.
  22.           There are no warranties, expressed or implied.
  23.  
  24.  
  25.  
  26.  
  27.                        Copyright (C) 1996
  28.                        All rights reserved
  29.  
  30.  
  31.  
  32.                    MarshallSoft Computing, Inc.
  33.                        Post Office Box 4543
  34.                        Huntsville AL 35815
  35.  
  36.                        Voice : 205-881-4630
  37.                          FAX : 205|880|0925
  38.                          BBS : 205-880-9748
  39.                        email : info@marshallsoft.com
  40.                          web : www.marshallsoft.com
  41.  
  42.                            _______
  43.                       ____|__     |                (R)
  44.                    --+       |    +-------------------
  45.                      |   ____|__  |  Association of
  46.                      |  |       |_|  Shareware
  47.                      |__|   o   |    Professionals
  48.                    --+--+   |   +---------------------
  49.                         |___|___|    MEMBER
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  WSC4VB Users Manual                                                Page 1
  69.                        C O N T E N T S
  70.  
  71.  
  72.  
  73.  
  74.  
  75.   Chapter                                                   Page
  76.  
  77.   1.0 Introduction................................................3
  78.       1.1 User Support............................................4
  79.       1.2 ASP Ombudsman...........................................4
  80.       1.3 Determining UART Address & IRQ Settings.................5
  81.       1.4 Installation............................................6
  82.   2.0 [reserved chapter]
  83.   3.0 Library Overview............................................7
  84.       3.1 Dynamic Link Libraries..................................7
  85.       3.2 Using the Library.......................................7
  86.       3.3 Compiling WSC...........................................7
  87.   4.0 Talking to Your Modem.......................................8
  88.       4.1 Modem Standards.........................................8
  89.       4.2 Flow Control............................................9
  90.       4.3 Modem I/O Functions....................................10
  91.       4.4 Modem Initialization...................................12
  92.   5.0 Problems...................................................13
  93.   6.0 Serial Communications......................................14
  94.       6.1 Communications Basics..................................14
  95.       6.2 RS232 Signals..........................................14
  96.   7.0 Example Programs...........................................16
  97.       7.1 SIMPLE.................................................16
  98.       7.2 LOGIN..................................................16
  99.       7.3 SELFTEST...............................................16
  100.       7.4 RS232..................................................16
  101.   8.0 Legal Issues...............................................17
  102.       8.1 Registration...........................................17
  103.       8.2 License................................................18
  104.       8.3 Warranty...............................................18
  105.   9.0 Summary....................................................19
  106.       9.1 Revision History.......................................19
  107.       9.2 Function Summary.......................................19
  108.       9.3 Further Reading........................................20
  109.  10.0 Other MarshallSoft Computing products for Visual Basic.....20
  110.       10.1 The Personal Communications Library for VB / WIN......20
  111.       10.2 The Personal Communications Library for VB / DOS......20
  112.       10.3 Libraries for Other Languages.........................20
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  WSC4VB Users Manual                                                Page 2
  137.   1.0 Introduction
  138.  
  139.  
  140.   The Windows Standard Communications Library for Visual Basic (WSC4VB) is  an
  141.   asynchronous  communications  (16-bit) dynamic link library (DLL) which uses
  142.   the standard Windows serial communications API. Since it  uses  the  Windows
  143.   API,  programs  using the WSC library are fully compatible with other Window
  144.   applications which also use the Windows serial communications API.
  145.  
  146.   Using  WSC  is  very  straight-forward. For example, to write "HELLO" to the
  147.   serial port COM1:
  148.  
  149.       SioReset(COM1,128,128)    'open COM1
  150.       SioPuts(COM1,"HELLO",5)   'write "HELLO" to COM1
  151.       SioDone(COM1)             'close COM1
  152.  
  153.  
  154.   Three  Visual  Basic  example  programs  with full source code are included.
  155.   Refer to chapter 7 for more details on each of the example programs.
  156.  
  157.       SIMPLE : A simple terminal emulator.
  158.  
  159.        LOGIN : Same as SIMPLE but can also dial a modem and log onto a BBS.
  160.  
  161.     SELFTEST : Performs COM port functionality testing.
  162.  
  163.   WSC4VB contains over 25 functions. All functions return a negative number if
  164.   an  error  condition  is  detected.   For  more  details, consult the WSC4VB
  165.   Reference Manual
  166.  
  167.   WSC4VB uses the same function names and  arguments  as  PCL4W  (our  Windows
  168.   Communications  Library  that does NOT use the Windows API) except for a few
  169.   functions.
  170.  
  171.   Our goal is to provide a robust serial communications library that that  you
  172.   and your customers can depend upon. Contact us if you have any questions.
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  WSC4VB Users Manual                                                Page 3
  205.   1.1 User Support
  206.  
  207.  
  208.   We want you to be successful in developing your applications  using  WSC4VB!
  209.   We  depend  upon  our  customers  to  let  us  know  what  they  need  in  a
  210.   communications library.  This means we are committed to providing  the  best
  211.   communications library that we can. If you have any suggestions or comments,
  212.   please let us know.
  213.  
  214.   If you are having a problem using WSC4VB, call  us  at  205-881-4630  between
  215.   1:30PM  and  9:30PM  CST  Monday  through Friday. You can also call at other
  216.   times and leave a message, and call back  later  for  a  reply.   Registered
  217.   users (ONLY) can also FAX us at 205-880-0925 at any time (24 hours).
  218.  
  219.   However,  we  can  only  answer  questions  with  respect to using the WSC4VB
  220.   library.  We cannot help you program your application.
  221.  
  222.   You  may  also  call  our User Support BBS (2400 to 14400 baud, no parity, 8
  223.   data bits, 1 stop bit) at 205-880-9748 and leave a message  (address  it  to
  224.   the SYSOP).  We will usually have a reply ready for you within 24 hours.
  225.  
  226.   The BBS  is  available  24  hours  per  day  except  at  2  PM  Sundays  for
  227.   maintenanace. All files are in standard ZIP format. The BBS will contain the
  228.   latest  shareware  version  of  all MarshallSoft products as well as related
  229.   files such as:
  230.  
  231.        BUGS.ZIP:  Bug report.
  232.        NEWS.ZIP:  Latest news regarding our products.
  233.  
  234.   If you are on the Internet, you can email us at info@marshallsoft.com.   You
  235.   can  also  get  the  latest  versions of our products from our anonymous ftp
  236.   site:
  237.  
  238.         FTP:   ftp.marshallsoft.com
  239.        PATH:   marshallsoft
  240.  
  241.   The MarshallSoft  Computing,  Inc.   newsletter  "Comm  Talk"  is  published
  242.   quarterly.  It discusses various communications problems and solutions using
  243.   WSC4VB  as  well  as related information.
  244.  
  245.   The    latest    copy    of  our newsletter can be found on our User Support
  246.   BBS  (in  file  area  "Newsletters"),  our  anonymous  ftp  site  (directory
  247.   /marshallsoft) as well as our web site.
  248.  
  249.       Web site:  www.marshallsoft.com
  250.  
  251.  
  252.   1.2 ASP Ombudsman
  253.  
  254.  
  255.   MarshallSoft  Computing,  Inc.   is a member of the Association of Shareware
  256.   Professionals (ASP).  ASP wants to make sure that  the  shareware  principle
  257.   works  for  you.   If  you are unable to resolve a shareware-related problem
  258.   with an ASP member by contacting the member directly, ASP  may  be  able  to
  259.   help.  The  ASP  Ombudsman can help you resolve a dispute or problem with an
  260.   ASP member, but does not provide technical support  for  members'  products.
  261.   Please  write  to  the  ASP  Ombudsman  at 545 Grover Road, Muskegon, MI USA
  262.   49442-9427, Fax 616-788-2765, or send a CompuServe  message  via  CompuServe
  263.   Mail to ASP Ombudsman 70007,3536.
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  WSC4VB Users Manual                                                Page 4
  273.   1.3 Determining UART Address & IRQ Settings
  274.  
  275.  
  276.   You  will  not  normally  need to know the port addresses or IRQ assignments
  277.   made by Windows. But this information  is  maintained  by  Windows,  and  is
  278.   available if you need it.
  279.  
  280.   Both Windows 3.X and Windows 95 maintain a list of serial port settings.  On
  281.   Windows  3.X  systems, choose the "Ports" icon in the "Control Panel" in the
  282.   "Main Group".  Select "Settings", and then "Advanced" to view the  COM  port
  283.   UART address and IRQ settings.
  284.  
  285.   In Windows 95, choose "My Computer" icon ("or whatever your computer icon is
  286.   named), select the "Control Panel" folder and then the "System" icon.  Click
  287.   on  the "Device Manager" tab.  Click "Computer" and then click "Properties".
  288.   Click the "View Resources" tab.   To  view  reserved  resources,  click  the
  289.   resource  type at the top of the dialog box (i.e., "Interrupt request (IRQ)"
  290.   or "Input/output (I/O)" ).
  291.  
  292.   The four standard COM ports which Windows typically controls are:
  293.  
  294.         Port  Address  IRQ
  295.         COM1   &H3F8    4
  296.         COM2   &H2F8    3
  297.         COM3   &H3E8    4
  298.         COM4   &H2E8    3
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  WSC4VB Users Manual                                                Page 5
  341.   1.4 Installation
  342.  
  343.   This  shareware  product  may  be  evaluated  for  500  executions (calls to
  344.   SioReset). WSC4C must be installed using the TRIALS manager before it can be
  345.   executed. To install WSC4C:
  346.  
  347.   (1) Before installation of  WSC4VB,  your  (16-bit)  Visual  Basic  compiler
  348.   should  already  be  installed  on your system and tested.  Examine the file
  349.   "FILES.LST" for a list of the distribution files.
  350.  
  351.   (2) Make a backup  copy  of  your  distribution  disk.   Put  your  original
  352.   distribution disk in a safe place.
  353.  
  354.   (3) Exit Windows into DOS, or start a DOS window:
  355.  
  356.   (4) Create a work directory. For example, to create C:\WSC4VB, type:
  357.  
  358.         C:
  359.         CD \
  360.         MKDIR WSC4VB
  361.         CD WSC4VB
  362.  
  363.   (5) Unzip all distribution files to your working directory.
  364.  
  365.         PKUNZIP WSC4VB10.ZIP
  366.  
  367.   If  this  is  a  "Commercial"  registered  version,  skip  to  step 10.  The
  368.   shareware archive must include:
  369.  
  370.         WSC10.TMD  -- The WSC installation data file.  Required  for both
  371.                       shareware installation and "personal" registration.
  372.  
  373.         TRIALS.EXE -- The TRIALS executable used to install WSC4VB.
  374.  
  375.   (6) TRIALS will open WSC10.TMD in order to install WSC. Type:
  376.  
  377.         TRIALS -i WSC10
  378.  
  379.   (7) Once installed, WSC4VB cannot be reinstalled unless  you  reformat  your
  380.   hard drive.  TRIALS does not modify disk formatting or employ other marginal
  381.   procedures.  TRIALS creates a configuration file which it uses to keep track
  382.   of the number of executions.  Do not modify or move this file  or  you  will
  383.   not be able to execute WSC4VB programs.
  384.  
  385.   WSC4VB must be installed on each computer on which WSC4VB programs will run.
  386.  
  387.   (9) The installation can be tested by typing:
  388.  
  389.         TRIALS -L
  390.  
  391.   (10) Copy WSC.DLL, WTMLIB.DLL [Shareware  version  only],  and  MODEM_IO.DLL
  392.   from  your  work  directory  to  the Visual Basic compiler directory.  Start
  393.   Visual Basic and compile SIMPLE.MAK.
  394.  
  395.   (11) The recommended way to test SIMPLE  is  to  run  it  on  two  computers
  396.   connected  by  a null modem cable.  Whatever is typed on one computer should
  397.   be displayed on the other.  If you don't have two  computers,  you  can  use
  398.   SIMPLE to talk to your modem.  Sending an "AT" to the modem should result in
  399.   an "OK" being sent back. See Section 7.1 "SIMPLE" for more information.
  400.  
  401.   (12)  Compile and link LOGIN. Use LOGIN to call a local BBS. See Section 7.2
  402.   "LOGIN" for more information.
  403.  
  404.   (13) Compile and link SELFTEST.  Use SELFTEST to test  one  of  your  serial
  405.   ports. See Section 7.3 "SELFTEST" for more information.
  406.  
  407.  
  408.  WSC4VB Users Manual                                                Page 6
  409.   3.0 Library Overview
  410.  
  411.  
  412.   3.1 Dynamic Link Libraries
  413.  
  414.  
  415.   WSC4VB is provided as a dynamic link library (DLL). A DLL  is  characterized
  416.   by  the  fact  that  it  need not be loaded until required by an application
  417.   program and that only one copy of the DLL is  necessary  regardless  of  the
  418.   number of application programs that use it. Contrast this to the traditional
  419.   static  library which is bound to each and every application that uses it at
  420.   link time.
  421.  
  422.   Since  WSC4VB  is  a  DLL, only one copy of the WSC4VB code & data is loaded
  423.   into memory regardless of the number of applications programs that use it.
  424.  
  425.   For  example,  more  than  one  instance  of  the test program SIMPLE can be
  426.   started.  All copies of SIMPLE can run concurrently as long as each  uses  a
  427.   different COM port.
  428.  
  429.  
  430.   3.2 Using the Library
  431.  
  432.  
  433.   The WSC4VB has been tested on a Gateway 2000 25 MHZ 80386-DX, a Gateway 2000
  434.   66MHZ  80486-DX2  (all  running  Windows  3.1),  and a Mid-West Micro 150MHZ
  435.   Pentium running Windows 95.
  436.  
  437.   WSC4VB  has  also  been  tested  with  both  Microsoft  Visual Basic 3.0 and
  438.   Microsoft Visual Basic 4.0 (16-bit version).
  439.  
  440.   Please examine the WSC4VB.BAS file. Note that COM1 is defined as port  zero,
  441.   not  port  one.   The  user  must  assume  the responsibilty for passing the
  442.   correct information when calling WSC4VB functions.
  443.  
  444.   We recommend that you experiment with the four example programs.
  445.  
  446.  
  447.   3.3 Compiling WSC
  448.  
  449.  
  450.   Registered  users  (commercial  version  only)  can  compile WSC in order to
  451.   create WSC.DLL. The Microsoft C or Borland C windows compiler  is  required.
  452.   Makefiles are provided for each compiler.
  453.  
  454.   For Microsoft C, type:
  455.  
  456.       NMAKE WSC4C._M_
  457.  
  458.   For Borland C, type:
  459.  
  460.       MAKER -fWSC4C._B_
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  WSC4VB Users Manual                                                Page 7
  477.   4.0 Talking to Your Modem
  478.  
  479.  
  480.   A  modem  is  used  to  extend  the distance over which you may communicate.
  481.   Without a modem, your RS232 cable is limited to a maximum  of  approximately
  482.   50 feet.  But with a modem, you can communicate literally around the world.
  483.  
  484.  
  485.   4.1 Modem Standards
  486.  
  487.  
  488.   Two modems can communicate over a telephone line only if they are both using
  489.   the  same  signaling frequencies and modulation, which are determined by the
  490.   the modem standards used.  Modem standards can be divided into  three  sets:
  491.   (1) speed, (2) data compression used, and (3) error control.
  492.  
  493.   The  Bell  standards  (103  &  212A)  are  those  of  AT&T.   The CCITT (The
  494.   International Consultative Committee for Telephone and Telegraph)  standards
  495.   are designated as "V. ".
  496.  
  497.  
  498.   Speed
  499.  
  500.  
  501.        Bell 103  :   300 baud
  502.        Bell 212A :  1200 baud
  503.        V.21      :   300 baud
  504.        V.22bis   :  1200 & 2400 baud
  505.        V.32      :  4800 & 9600 baud
  506.        V.32bis   :  4800, 7200, 9600, 12000, and 14400 baud
  507.        V.34      :  to 28800 baud.
  508.  
  509.   Data Compression
  510.  
  511.  
  512.        MNP 5     :  Microcom Networking Protocol (proprietary).
  513.        V.42bis   :  International data compression standard.
  514.  
  515.  
  516.   Error Control
  517.  
  518.  
  519.        MNP 2,3,4 :  Three level error correction (public domain).
  520.        V.42      :  International error correction standard.
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  WSC4VB Users Manual                                                Page 8
  545.   4.2 Flow Control
  546.  
  547.  
  548.   With  modems  using data compression, the modem to modem connection will run
  549.   at various speeds depending on the quality of the  line.   The  computer  to
  550.   modem  connection  will be at a fixed baud rate. Therefore, a protocol (flow
  551.   control) is necessary to synchronize the data flow between a modem  and  the
  552.   computer  to  which  it  is  connected.   Refer  to  your  modem  manual for
  553.   information on flow control protocols supported.
  554.  
  555.   Two flow control protocols are used by most all modems  which  require  flow
  556.   control.  Software  flow  control  is called "XON/XOFF" (other software flow
  557.   control character pairs are defined but operate the same  as  XON/XOFF)  and
  558.   hardware  flow  control is called "RTS/CTS".  Most modems which require flow
  559.   control enable hardware flow control by default.
  560.  
  561.   In XON/XOFF (software) flow control, the computer suspends transmitting data
  562.   if it receives a XOFF character (13  hex)  from  the  modem,  and  continues
  563.   transmitting  when  it  receives  a XON character (11 hex).  Similiarly, the
  564.   computer can signal the modem not to send any more data  by  transmitting  a
  565.   XOFF  to  it,  and  can tell the modem to continue transmission be sending a
  566.   XON.
  567.  
  568.   In RTS/CTS (hardware) flow control, the RTS line is used by the computer  to
  569.   signal  the  modem  ,  while the CTS line is used by the modem to signal the
  570.   computer.  The RTS line is set OFF by the computer  to  tell  the  modem  to
  571.   suspend  transmission,  and  set  to  ON  to  tell  the  modem  to  continue
  572.   transmission.  The CTS line is set to OFF by the modem to tell the  computer
  573.   to  stop  transmitting,  and  set  to  ON  to  tell the computer to continue
  574.   transmitting.
  575.  
  576.   Given the choice, always choose hardware flow  control  over  software  flow
  577.   control  so  that  all  data  transmission is transparent.  If hardware flow
  578.   control is not the default (which it almost always is),  you  should  modify
  579.   your modem initialization string to turn hardware flow control on.
  580.  
  581.   WSC4VB supports both hardware  and  software  flow  control.  Refer  to  the
  582.   SioFlow function in the WSC4VB Reference Manual.
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  WSC4VB Users Manual                                                Page 9
  613.   4.3 MODEM I/O (MIO)
  614.  
  615.   4.3.1 MIO Introduction
  616.  
  617.   The file MODEM_IO.BAS contains declarations for using  the  Modem  I/O  DLL.
  618.   These functions ease communicating with modems using AT commands.  The LOGIN
  619.   example program code has examples of using the MIO functions.
  620.  
  621.   The Windows "operating system" is what is called "cooperative multitasking".
  622.   This  means  that  the  executing  Windows  task  must voluntarily "give up"
  623.   control before another Windows task (or Windows itself) can execute.
  624.  
  625.   The difficulty  is  how  to  wait  for  a  number  of  seconds  while  still
  626.   relinquishing control periodically before the wait is up. One solution is by
  627.   making  functions that need to wait (such as the MIO functions) into "state"
  628.   machines. A function is broken down into parts called states, and control is
  629.   returned to Windows between executing each state.
  630.  
  631.   For example, to send the string "ATDT1,205,880,9748" to the modem  with  one
  632.   tenth second delay between transmitted characters, the following sequence is
  633.   used:
  634.  
  635.   (1) Send the string to the MIO driver by executing:
  636.  
  637.   Code = mioSendTo(Port,100,"!ATDT1,205,880,9748")
  638.  
  639.   The '!' characters are converted to carriage returns.  The  text  string  is
  640.   copied into the driver's data area.
  641.  
  642.   (2)  Call mioDriver (typically based on a timer) until MIO_IDLE is returned.
  643.   Each time mioDriver is called, it will send another character to  the  modem
  644.   provided  the  required  delay  (since  the previous character was sent) has
  645.   passed.  If the delay has not passed, the driver simply returns MIO_RUNNING,
  646.   but without actually sending a character to the modem.  Once all  characters
  647.   have been sent, mioDriver will return MIO_IDLE, indicating it is done and is
  648.   ready to accept another function.
  649.  
  650.   mioDriver  will return MIO_RUNNING if it is still processing.  Anything else
  651.   received indicates that it is still processing and the returned value  is  a
  652.   character from the modem that can be displayed if wanted.
  653.  
  654.   (3) Once mioDriver returns MIO_IDLE, call mioResult to get the result of the
  655.   mioSendTo call.
  656.  
  657.   The above is rather straight forward in practice.  See the LOGIN application
  658.   for an example of its use.
  659.  
  660.  
  661.   4.3.2 MIO Functions
  662.  
  663.   4.3.2.1 mioDriver
  664.  
  665.   Syntax: int mioDriver(int Port)
  666.  
  667.   mioDriver  executes  the  next  state of any previously started MIO function
  668.   such as mioSendTo, mioWaitFor, and mioQuiet. It returns:
  669.  
  670.   MIO_IDLE    : if the driver is ready for the next mioSendTo, mioWaitFor, or
  671.                 mioQuiet.
  672.   MIO_RUNNING : if the driver is not idle.
  673.   <otherwise> : if the driver is not idle,  and  the  returned  character  was
  674.                 received from the modem.
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  WSC4VB Users Manual                                                Page 10
  681.   4.3.2.2 mioBreak
  682.  
  683.   Forces the MIO driver to the IDLE state, abandoning any work in progress.
  684.  
  685.  
  686.   4.3.2.3 mioSendTo
  687.  
  688.   Syntax:  int mioSendTo(int Port, long Pace, char *String)
  689.  
  690.   The mioSendTo function sends the characters in the string 'Text'  to  serial
  691.   output. There is a delay of 'Pace' milliseconds between characters.
  692.  
  693.  
  694.   4.3.2.4 mioWaitFor
  695.  
  696.   Syntax: int mioWaitFor(int Port, long Wait, int Case, char *String)
  697.  
  698.   The  mioWaitFor  function  waits for characters from serial input that match
  699.   the string 'Text'. A total of 'Wait' milliseconds are allowed before  timing
  700.   out  and  returning  FALSE (0).  If the 'Case' flag is TRUE, then the string
  701.   comparison is NOT case sensitive.
  702.  
  703.   For example, to wait up to one minute for "CONNECT", "NO CARRIER", or "BUSY"
  704.   from the modem after dialing a number (on COM1):
  705.  
  706.   Code = mioWaitFor(COM1,60000,1,"CONNECT|NO CARRIER|BUSY")
  707.  
  708.   The function mioDriver() must be called until MIO_IDLE  is  returned.   Then
  709.   mioResult()  is  called  to  get the result of the mioWaitFor.  A value of 0
  710.   indicates  that  neither "CONNECT", "BUSY", nor "NO CARRIER" was received. A
  711.   non-zero value indicates that one of the three sub-strings was received.   A
  712.   ASC("0")  is  returned  if  "CONNECT"  was seen, ASC("1") is returned if "NO
  713.   CARRIER" was seen, and ASC("2") is returned if "BUSY" was seen.
  714.  
  715.  
  716.   4.3.2.5 mioQuiet
  717.  
  718.   Syntax: int mioQuiet(int Port,long Wait)
  719.  
  720.   The mioQuiet function waits for continuous quiet [no incoming  serial  data]
  721.   of  'Wait'  milliseconds  before  returning.   Any  incoming character while
  722.   mioQuiet is running is flushed.
  723.  
  724.  
  725.   4.3.3 MIO Summary
  726.  
  727.    mioDriver : Allows the execution of mioSendTo, mioWaitFor, or mioQuiet once
  728.                they   have   been   started.   Returns  MIO_IDLE  (defined  in
  729.                MODEM_IO.BAS) if ready not running, MIO_RUNNING if running, and
  730.                anything else is  a  character  from  the  modem  that  can  be
  731.                displayed if wanted.
  732.  
  733.     mioBreak : Forces the  MIO  driver to IDLE state.
  734.  
  735.    mioSendTo : Sends a string (including control chars) to the modem.
  736.  
  737.   mioWaitFor : Waits  for a particular string from the modem, passing all else
  738.                through.
  739.  
  740.     mioQuiet : Waits for continuous  quiet  of  a specified duration.
  741.  
  742.     mioBreak : Breaks further modem I/O activity.
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  WSC4VB Users Manual                                                Page 11
  749.   4.4 Modem Initialization
  750.  
  751.  
  752.   If your application uses a modem (as opposed to using a null  modem  cable),
  753.   then  you should always send an initialization string to your modem if it is
  754.   a programmable modem such as those made by  Hayes.   Communication  programs
  755.   such as PROCOMM and TELIX always send such a string automatically as soon as
  756.   they start up.
  757.  
  758.   The particular initialization string depends on the make of your modem.  For
  759.   Hayes  and  Hayes  AT  command  set  compatible modems, the following string
  760.   (followed by a carriage return) should work:
  761.  
  762.        AT E1 S7=60 S11=60 V1 X1 Q0 S0=0
  763.  
  764.   Refer to your Modem User's Guide for a full discussion of these commands.  A
  765.   brief description is as follows:
  766.  
  767.        AT     Modem attention command.
  768.        E1     Modem will echo what you send to it.
  769.        S7=60  Wait 60 seconds for carrier and/or dial tone.
  770.        S11=60 Use 60 milliseconds for tone dialing duration & spacing.
  771.        V1     Display result code as words (not numbers).
  772.        X1     Use the extended result message (CONNECT XXXX) set.
  773.        Q0     Modem returns result codes.
  774.        S0=0   Do not answer RING.
  775.  
  776.   If  your application will answer incoming calls, then set the S0 register to
  777.   the ring on which to automatically answer.
  778.  
  779.   If you send the above codes by using SioPutc (as opposed to typing them from
  780.   the keyboard), then follow these guidelines:
  781.  
  782.   (1) Send an initial carriage return before the initialization string.
  783.  
  784.   (2) Pause at least 150 milliseconds after each character sent as your  modem
  785.   needs the time to perform its own internal processing. Pause a little longer
  786.   if your modem is not accepting your initialization string.
  787.  
  788.   (3)  Pause  one  and a half seconds after sending any initialization command
  789.   such as ATZ or AT&F since your modem must do quite a bit of processing.
  790.  
  791.   If you experience any problems in initializing your Hayes modem, you  should
  792.   first reset it to factory settings by sending:
  793.  
  794.        AT&F
  795.  
  796.   Refer   to   the   LOGIN  program  (function  SendToModem  is  in  the  file
  797.   MODEM_IO.BAS) for an example of sending an initialization string to a  Hayes
  798.   compatible modem.
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  WSC4VB Users Manual                                                Page 12
  817.   5.0 Problems
  818.  
  819.  
  820.   If  you  cannot  get your application to run properly, first compile and run
  821.   the terminal emulator program SIMPLE provided  on  your  distribution  disk.
  822.   Test  SIMPLE  by  connecting  two  computers  with  a null modem cable or by
  823.   commanding a Hayes AT command set compatible modem.
  824.  
  825.   Once  SIMPLE  runs, compile and run the SELFTEST program.  This program will
  826.   test your serial ports' functionality.
  827.  
  828.   If your application does not run but  SIMPLE  and  SELFTEST  run  correctly,
  829.   then  you  have  most likely made a programming mistake in your application.
  830.   MarshallSoft Computing cannot debug your application,  especially  over  the
  831.   telephone!  However,  consider  each  of the following when searching for an
  832.   error in your application.
  833.  
  834.   1.  Have you included the file WSC4VB.BAS in your application ?
  835.  
  836.   2.  Is your receive buffer large enough ? Use a receive buffer size that  is
  837.   twice the size of the largest expected incoming block.
  838.  
  839.   3.  Have you selected too high a baud rate? Windows can multitask many tasks
  840.   at once. You may have to lower your baud rate (or get 16550 UARTS).
  841.  
  842.   4.  Did SioReset return a zero value ?  If not, then you must call  SioReset
  843.   again. See SIMPLE.BAS for an example.
  844.  
  845.   5.   Did  you  send the proper initialization string to your modem ? Did you
  846.   set DTR and RTS ? (you should).
  847.  
  848.   7.  Do you have more than one COM1 port?  For example, if you  have  a  COM1
  849.   port  on  your  motherboard, you cannot add another COM1 port or modem board
  850.   that uses COM1 without first disabling the COM1 on the motherboard.
  851.  
  852.   We recommend the following steps if you believe that you have  discovered  a
  853.   bug  in  the  library:  (1)  Create  the  smallest,  simpliest  test program
  854.   possible that demonstrates the problem.  (2)  Document  your  exact  machine
  855.   configuration  and  what error the test program  demonstrates.   (3)  Upload
  856.   the example source to our user support BBS, email it or mail us a disk.
  857.  
  858.   If  the  problem can be solved with an easy work-around, we will publish the
  859.   work-around.  If the problem requires a modification to the library, we will
  860.   make the change and make the modified library  available  to  our  customers
  861.   without charge.
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  WSC4VB Users Manual                                                Page 13
  885.   6.0 Serial Communications
  886.  
  887.   6.1 Communications Basics
  888.  
  889.  
  890.   The  heart  of  serial  communications  is  the UART (Universal Asynchronous
  891.   Receiver Transmitter).  The IBM  PC/XT/AT  and  compatibles  use  the  8250,
  892.   16450, or the 16550 UART.  The purpose of the UART is:
  893.  
  894.   (1) To convert bytes from the CPU (Central Processing Unit), into  a  serial
  895.   format  by  adding  the  necessary start, stop, and parity bits to each byte
  896.   before transmission, and to then transmit each bit at the correct baud rate.
  897.  
  898.   (2) To convert the incoming stream (at a specified baud rate) of serial bits
  899.   into bytes by removing the start, stop, and parity bits  before  being  made
  900.   available to the CPU.
  901.  
  902.   The  UART  is part of the serial interface circuitry which allows the CPU to
  903.   send and receive signals over the RS232 lines. This  can  be  diagrammed  as
  904.   follows:
  905.  
  906.  
  907.  
  908.                         Serial Interface
  909.                      +-------------------+
  910.                      |                   |
  911.   +-----+  Data Bus  |     +------+      |    RS232 Signals
  912.   | CPU +------------+     | UART |      +----------------*
  913.   +-----+            |     +------+      |
  914.                      |                   |
  915.                      +-------------------+
  916.  
  917.  
  918.  
  919.   The 8250/16450/16550 UART is capable of  operating  in  one  of  two  modes,
  920.   "polled" and "interrupt driven".  The serial communications functions in the
  921.   BIOS  use  the  polled  method.  In this approach, the CPU is typically in a
  922.   loop asking the UART over and over again if it has  a  byte  ready.  If  its
  923.   does,  the  polling  code  returns the byte.  But, if the next byte comes in
  924.   before the polling code is executing again, then that byte is lost.
  925.  
  926.   In the interrupt driven approach (used by Windows/WSC4VB), when  a  byte  is
  927.   received  by  the  UART,  an  "Interrupt  Service Routine" (ISR) is executed
  928.   immediately, suspending temporarily whatever else is executing. The ISR then
  929.   moves the byte to a buffer so that your application program can  later  read
  930.   it.
  931.  
  932.   Transmitted  bytes are queued up awaiting  transmission.   When  a  byte  is
  933.   moved  from  the  UART  transmitter holding register to the UART transmitter
  934.   shift register, an interrupt is generated and the next byte  is  taken  from
  935.   the  library  transmitter  buffer by the ISR and written to the UART holding
  936.   register.
  937.  
  938.   Up to 16 bytes can be taken from the transmitter buffer while processing one
  939.   transmitter  interrupt  if an 16550 UART is used. The 16550 UART is strongly
  940.   recommended for computers doing serial communications under Windows.
  941.  
  942.   Additional information on serial port hardware can be found  in  the  User's
  943.   manual for our companion product PCLVBW.
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  WSC4VB Users Manual                                                Page 14
  953.   6.2 RS-232 Signals
  954.  
  955.  
  956.   RS-232 is the name of the serial data interface  standard  used  to  connect
  957.   computers  to modems.  Most IBM compatible computers are built with at least
  958.   one serial port and use either DB9 (9 pin) or DB25 (25 pin) connectors.
  959.  
  960.   A summary of these pins and  their  function  follows.   For  more  detailed
  961.   information, refer to one of the many books dealing with RS-232 interfacing.
  962.  
  963.   Signal Ground Pin 7 (DB25), Pin 5 (DB9)
  964.  
  965.   The  SG  line  is  used  as  the  common  signal  ground, and must always be
  966.   connected.
  967.  
  968.   Transmit Data Pin 2 (DB25), Pin 3 (DB9)
  969.  
  970.   The TX line is used to carry data from the computer to the modem.
  971.  
  972.   Receive Data Pin 3 (DB25), Pin 2 (DB9)
  973.  
  974.   The RX line is used to carry data from the modem to the computer.
  975.  
  976.   Data Terminal Ready Pin 20 (DB25), Pin 4 (DB9)
  977.  
  978.   The DTR line is used by the computer to signal the modem that it  is  ready.
  979.   DTR should be set high when talking to a modem.
  980.  
  981.   Data Set Ready Pin 6 (DB25), Pin 6 (DB9)
  982.  
  983.   The DSR line is used by the modem to signal the computer that it is ready.
  984.  
  985.   Request to Send Pin 4 (DB25), Pin 7 (DB9)
  986.  
  987.   The  RTS  line  is used to "turn the line around" in half duplex modems, and
  988.   for hardware flow control in most modems that require flow control.  RTS  is
  989.   controlled by the computer and read by the serial device (modem).
  990.  
  991.   Clear to Send Pin 5 (DB25), Pin 8 (DB9)
  992.  
  993.   The  CTS  line  is used to "turn the line around" in half duplex modems, and
  994.   for hardware flow control in most modems that require flow control.  CTS  is
  995.   controlled by the serial device (modem) and read by the computer.
  996.  
  997.   Data Carrier Detect Pin 8 (DB25), Pin 1 (DB9)
  998.  
  999.   The DCD line is used by the modem to signal the computer that a data carrier
  1000.   signal is present.
  1001.  
  1002.   Ring Indicator Pin 22 (DB25), Pin 9 (DB9)
  1003.  
  1004.   The RI line is asserted when a 'ring' occurs.
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  WSC4VB Users Manual                                                Page 15
  1021.   7.0 Example Programs
  1022.  
  1023.  
  1024.   7.1 SIMPLE
  1025.  
  1026.  
  1027.   SIMPLE   is  a  very  simple  communications   programming   using   WSC4VB.
  1028.   Everything  that  is  typed  on the keyboard is sent to the serial port, and
  1029.   everthing incoming from the serial port is displayed on the screen.
  1030.  
  1031.   The easiest way to test SIMPLE is to connect to a modem.  Typing "AT" should
  1032.   result in an "OK" being displayed.
  1033.  
  1034.   A  null-modem  cable can also be used to connect two computers together with
  1035.   their serial ports. Run SIMPLE on both machines. Whatever is  typed  on  one
  1036.   machine will be displayed on the other.
  1037.  
  1038.  
  1039.   7.2 LOGIN
  1040.  
  1041.  
  1042.   LOGIN  is the same program as SIMPLE but with the addition of "Modem" on the
  1043.   menu bar.  Under "Modem", select "Start", then "Handshake" in order to  send
  1044.   an "AT" to the connected modem, or "Dial" to send a dial string to the modem
  1045.   (which  dials  our  user  support  BBS). Once the dial sequence is sent, the
  1046.   program will wait for up to 60 seconds for the  "CONNECT"  string  from  the
  1047.   modem.  This  wait  can  be terminated at any time by choosing "BREAK" under
  1048.   "Modem".
  1049.  
  1050.   To  test LOGIN, you need a AT command set compatible modem and a BBS to call
  1051.   up. LOGIN will dial our BBS at 205-880-9748, or  edit  the  dial  string  in
  1052.   LINE.BAS to call up a local BBS.
  1053.  
  1054.  
  1055.   7.3 SELFTEST
  1056.  
  1057.  
  1058.   SELFTEST  performs  a  serial port I/O functionality test.  Either a pair of
  1059.   ports on the same computer (using a null  modem  cable)  or  a  single  port
  1060.   (using a loopback adapter) can be tested.
  1061.  
  1062.   Refer  to  LOOPBACK.DOC for an explanation of how to make a loopback adapter
  1063.   (without tools!).
  1064.  
  1065.  
  1066.   7.4 RS232
  1067.  
  1068.  
  1069.   RS232 is similiar to SELFTEST, but with enhanced capability. It can set flow
  1070.   control  (hardware,  software,  or  none), DTR line (set or clear), RTS line
  1071.   (set or clear), display the transmit & receive queue sizes, detect  a  break
  1072.   signal,  detect  changes  in  DSR and CTS, as well as check for various line
  1073.   errors (parity error, framing error, data overrun, receive  queue  overflow,
  1074.   transmit buffer full).
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  WSC4VB Users Manual                                                Page 16
  1089.   8.0 Legal Issues
  1090.  
  1091.   8.1 Registration
  1092.  
  1093.   Two types of registration are provided, (1) Personal and (2) Commercial.
  1094.  
  1095.   (1)  Personal  Registration  is for personal (non-commercial) use of WSC4VB.
  1096.   The registration fee is $39.95. To register, type (from the  DOS  prompt  in
  1097.   the work directory containing WSC10.TMD) :
  1098.  
  1099.        TRIALS -k WSC10
  1100.  
  1101.   The TRIALS program will prompt you for your name, then display three control
  1102.   codes.  You  then  contact  us by phone, mail, email or BBS. We will need to
  1103.   know the exact (case sensitive) name typed into TRIALS as well as the  exact
  1104.   control codes displayed.
  1105.  
  1106.   After  receiving payment, you will be issued an authorization code which you
  1107.   enter into the TRIALS program, which will generate C:\WSC10.KEY.
  1108.  
  1109.   You  can  re-run  TRIALS  to  generate  the  key  file  once  you  have  the
  1110.   authorization code. However, you must run TRIALS on  the  same  machine  the
  1111.   second time in order to get the same control codes.
  1112.  
  1113.   Once WSC10.KEY is created, it can be copied to any machine on which you will
  1114.   use WSC.
  1115.  
  1116.   Personal  registration  does  not include printed manuals or disks.  Printed
  1117.   manuals (they are on the distribution archive) can be ordered  for  $10  per
  1118.   set plus $5 S&H (or $10 S&H outside of North America).
  1119.  
  1120.   (2) Commercial Registration costs $74.95 and includes complete source  code,
  1121.   printed  manuals, no shareware screen of any kind displayed, and no key file
  1122.   required.  A registered archive will be mailed along with printed manuals.
  1123.  
  1124.   To order, contact us as shown on the title page of this manual.
  1125.  
  1126.   Multiple copy discounts (3 or more) and site licenses are available.  Please
  1127.   call for details.
  1128.  
  1129.   We accept American Express, VISA, MasterCard, checks in US dollars drawn  on
  1130.   a  US  bank,  International  Postal Money Orders, purchase orders (POs) from
  1131.   recognized US schools and companies listed in  Dun  &  Bradstreet,  and  COD
  1132.   (street  address and phone number required) within the USA (plus a $4.50 COD
  1133.   charge).
  1134.  
  1135.   For credit  card  orders,  be  sure  to  include  the  account  number,  the
  1136.   expiration  date,  the exact name on the card, and the complete card billing
  1137.   address (the address to which the credit card bill is mailed).
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  WSC4VB Users Manual                                                Page 17
  1157.   8.1 Registration (continued)
  1158.  
  1159.   Print the file WSC4VB.INV if an invoice is needed.
  1160.  
  1161.   If you wish to update from an older version of WSC4VB, send $25 plus  $5  S&H
  1162.   ($10  S&H outside  of  North  America).
  1163.  
  1164.   The commercial registered package includes:
  1165.  
  1166.        o  WSC4VB Library w/o shareware screens.
  1167.        o  C/C++ source code for WSC and MODEM_IO.
  1168.        o  Laser printed Users Manual & Reference Manual.
  1169.        o  Telephone, BBS, and email support for one year.
  1170.  
  1171.   The  registered  user will receive the latest version of WSC4VB shipped by US
  1172.   second day priority mail (packet airmail  overseas).   A  3.5"  diskette  is
  1173.   provided unless a 5.25" diskette is requested.
  1174.  
  1175.   All  prices  are guaranteed for one year from the release date as printed on
  1176.   the title page.
  1177.  
  1178.  
  1179.   8.2 License
  1180.  
  1181.  
  1182.   MarshallSoft  Computing, Inc. grants the registered user of WSC4VB the right
  1183.   to use one copy of the WSC4VB library (in object form) on a single  computer
  1184.   in  the  development  of  any software product (other than libraries such as
  1185.   WSC4VB).  The user may not use the library on more than one computer at  the
  1186.   same  time.   The  source  code  for  the  library (WSC.C) is copyrighted by
  1187.   MarshallSoft Computing and may not be released in whole or in part. Products
  1188.   developed using WSC4VB may be distributed without any royalty.
  1189.  
  1190.  
  1191.   8.3 Warranty
  1192.  
  1193.  
  1194.   MARSHALLSOFT COMPUTING, INC.  DISCLAIMS  ALL  WARRANTIES  RELATING  TO  THIS
  1195.   SOFTWARE,  WHETHER  EXPRESSED  OR  IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
  1196.   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR  PURPOSE,
  1197.   AND  ALL  SUCH WARRANTIES ARE EXPRESSLY AND SPECIFICALLY DISCLAIMED. NEITHER
  1198.   MARSHALLSOFT COMPUTING, INC. NOR ANYONE ELSE WHO HAS BEEN  INVOLVED  IN  THE
  1199.   CREATION,  PRODUCTION,  OR DELIVERY OF THIS SOFTWARE SHALL BE LIABLE FOR ANY
  1200.   INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING OUT  OF  THE  USE  OR
  1201.   INABILITY  TO  USE  SUCH  SOFTWARE EVEN IF MARSHALLSOFT COMPUTING, INC.  HAS
  1202.   BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR CLAIMS. IN NO EVENT SHALL
  1203.   MARSHALLSOFT COMPUTING, INC.'S LIABILITY FOR ANY SUCH  DAMAGES  EVER  EXCEED
  1204.   THE  PRICE  PAID FOR THE LICENSE TO USE THE SOFTWARE, REGARDLESS OF THE FORM
  1205.   OF THE CLAIM. THE PERSON USING THE SOFTWARE BEARS ALL RISK AS TO THE QUALITY
  1206.   AND PERFORMANCE OF THE SOFTWARE.
  1207.  
  1208.   Some states do not allow  the  exclusion  of  the  limit  of  liability  for
  1209.   consequential  or  incidental damages, so the above limitation may not apply
  1210.   to you.
  1211.  
  1212.   This agreement shall be governed by the laws of the  State  of  Alabama  and
  1213.   shall  inure  to  the  benefit  of  Marshallsoft  Computing,  Inc.   and any
  1214.   successors, administrators, heirs and  assigns.  Any  action  or  proceeding
  1215.   brought  by either party against the other arising out of or related to this
  1216.   agreement shall be brought only in a STATE or  FEDERAL  COURT  of  competent
  1217.   jurisdiction  located in Madison County, Alabama. The parties hereby consent
  1218.   to in personam jurisdiction of said courts.
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  WSC4VB Users Manual                                                Page 18
  1225.   9.0 Summary
  1226.  
  1227.  
  1228.   9.1 Revision History
  1229.  
  1230.  
  1231.   Version 1.0: 25 August, 1996.  -  The initial release of WSC4VB.
  1232.  
  1233.  
  1234.   9.2 Function Summary
  1235.  
  1236.   Refer to the WSC4VB Reference Manual (WSC4VB_R.DOC) for detailed information
  1237.   on the communications and support functions.  A one  line  summary  of  each
  1238.   function follows:
  1239.  
  1240.   +--------------+-----------------------------------------------------------+
  1241.   |  SioBaud     |  Sets the baud rate of the selected port.                 |
  1242.   |  SioBrkSig   |  Asserts, cancels, or detects BREAK signal.               |
  1243.   |  SioCTS      |  Reads the Clear to Send (CTS) modem status bit.          |
  1244.   |  SioDCD      |  Reads the Data Carrier Detect (DCD) modem status bit.    |
  1245.   |  SioDone     |  Terminates further serial processing.                    |
  1246.   |  SioDSR      |  Reads the Data Set Ready (DSR) modem status bit.         |
  1247.   |  SioDTR      |  Set, clear, or read the Data Terminal Ready (DTR) bit.   |
  1248.   |  SioFlow     |  Enables / disables hardware flow control.                |
  1249.   |  SioGetc     |  Reads the next character from the serial line.           |
  1250.   |  SioGets     |  Receives a string of characters.                         |
  1251.   |  SioInfo     |  Returns information such as library version.             |
  1252.   |  SioParms    |  Sets parity, stop bits, and word length.                 |
  1253.   |  SioPutc     |  Transmit a character over a serial line.                 |
  1254.   |  SioPuts     |  TRansmits a string of characters.                        |
  1255.   |  SioReset    |  Initialize a serial port for processing.                 |
  1256.   |  SioRI       |  Reads the Ring Indicator (RI) modem status bit.          |
  1257.   |  SioRTS      |  Sets, clears, or reads the Request to Send (RTS) line.   |
  1258.   |  SioRxClear  |  Clears the receive buffer.                               |
  1259.   |  SioRxQue    |  Returns the number of characters in the receive queue.   |
  1260.   |  SioStatus   |  Returns the serial port line status.                     |
  1261.   |  SioTxClear  |  Clears the transmit buffer.                              |
  1262.   |  SioTxQue    |  Returns the number of characters in the transmit queue.  |
  1263.   |  SioUnGetc   |  "Un-gets" (puts back) a specified character.             |
  1264.   +--------------+-----+-----------------------------------------------------+
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  WSC4VB Users Manual                                                Page 19
  1293.   9.3 Further Reading
  1294.  
  1295.  
  1296.   The  best way to learn about serial communications is to read a good book on
  1297.   the subject. Several good texts are available.  Two that I like are:
  1298.  
  1299.   (1) C Programmers's Guide to Serial Communications by  Joe  Campbell  (SAMS)
  1300.   (2) Mastering Serial Communications by Peter Gofton (SYBEX).
  1301.  
  1302.   You  may also want to get a copy of one of our communications products which
  1303.   talks  to  the  hardware  directly.  They  include  more  hardware  specific
  1304.   documentation.
  1305.  
  1306.  
  1307.   10.0 Other MarshallSoft Computing Products
  1308.  
  1309.  
  1310.   The following shareware  libraries  are  also  available  from  MarshallSoft
  1311.   Computing.
  1312.  
  1313.   10.1 The Personal Communications Library for Visual BASIC / WIN
  1314.  
  1315.   The Personal Communications Library for Visual BASIC / WIN  (PCLVBW)  is  a  DOS
  1316.   based  asynchronous communications library designed for experienced software
  1317.   developers  programming   in   Visual Basic / Windows. Unlike WSC4VB, PCLVBW
  1318.   interfaces to the  serial  port  hardware  directly.  PCLVBW  also  supports
  1319.   multiport boards such as those made by DigiBoard and BOCA.
  1320.  
  1321.   The  Personal  Communications Library for Visual BASIC (PCLVBW) is available
  1322.   for $75 plus $5 S&H ($10 S&H overseas).
  1323.  
  1324.   10.2 The Personal Communications Library for Visual Basic / DOS
  1325.  
  1326.   PCL4VB  is  similiar  to  PCLVBW except that it is designed for Visual BASIC
  1327.   applications running under DOS. (Microsoft replaced QuickBasic  with  Visual
  1328.   Basic / DOS).
  1329.  
  1330.   10.3 Libraries for Other Languages
  1331.  
  1332.   We have communications libraries for C/C++, Turbo Pascal, Visual Basic , and
  1333.   PowerBASIC.
  1334.  
  1335.    PCL4C : C/C++, DOS [include ptotected mode].
  1336.    PCL4P : Turbo Pascal, DOS [includes protected mode].
  1337.   PCL4VB : Visual Basic, DOS.
  1338.   PCL4PB : Power Basic, DOS.
  1339.  
  1340.    PCL4W : C/C++, Windows 3.1 & Win 95, talks to hardware directly.
  1341.   PCLVBW : Visual Basic, Win 3.1 & Win 95, talks to hardware directly.
  1342.  
  1343.    WSC4C : C/C++, Win 3.1 & Win 95, uses Windows API.
  1344.   WSC4VB : Visual Basic, Win 3.1 & Win 95, uses Windows API.
  1345.    WSC4D : Borland DELPHI [Sept 96], Win 3.1 & Win 95, uses Windows API.
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  WSC4VB Users Manual                                                Page 20
  1361.