Microsoft KB Archive/21789

= Why Basic Doesn't Support COM3 or COM4 Serial Port =

Article ID: 21789

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft QuickBasic 1.0
 * Microsoft QuickBasic 1.01
 * Microsoft QuickBasic 1.02
 * Microsoft QuickBasic 2.0
 * Microsoft QuickBasic 2.01
 * Microsoft QuickBasic 3.0
 * Microsoft QuickBasic 4.0
 * Microsoft QuickBASIC 4.0b
 * Microsoft QuickBasic 4.5 for MS-DOS
 * Microsoft BASIC Compiler 6.0
 * Microsoft BASIC Compiler 6.0b
 * Microsoft BASIC Professional Development System 7.0
 * Microsoft BASIC Professional Development System 7.1

-



This article was previously published under Q21789



SUMMARY
QuickBasic does not support more than two communications ports. QuickBasic supports serial devices COM1 and COM2, but does not support COM3 or COM4. Some computers supply COM3 and COM4 devices, but these are not supported in QuickBasic.

This information applies to Microsoft QuickBasic versions 1.0, 1.01, 1.02, 2.0, 2.01, 3.0, 4.0, 4.0b, and 4.5; to Microsoft Basic Compiler versions 6.0 and 6.0b; and to Microsoft Basic Professional Development System (PDS) versions 7.0 and 7.1 for MS-DOS.



MORE INFORMATION
QuickBasic and Basic PDS currently support serial communications ports COM1 and COM2 through the use of the OPEN "COM" statement. For more information about using COM1 and COM2, see the OPEN statement in the language reference manual for Microsoft QuickBasic versions 4.0 and 4.0b, for Basic Compiler 6.0 and 6.0b, and for Basic PDS 7.0 and 7.1. See also the OPEN statement in the online Help in QB.EXE for QuickBasic 4.5 and in QBX.EXE in Basic PDS 7.0 and 7.1. See also the TERMINAL.BAS program released with these products.

Why Basic Doesn't Support COM3 or COM4
Adding support for COM3 and COM4 communications ports would require a larger code size in the development environment, compiler, and run-time module. Also, COM3 and COM4 support requires MS-DOS 3.3 or later, plus implementation in the computer's BIOS. Microsoft Basic products are targeted to run on as wide a variety of systems as possible, but COM3 and COM4 have not been widely available on the existing hardware base.

A combination of these and other factors have resulted in Microsoft not currently supporting COM3 and COM4.

COM3 and COM4 Support from Third-Party Developers
To access COM3 and COM4, it may be possible for a compiled Basic program to call third-party library routines listed in catalogs, such as the "Provantage Buyer's Guide," which can be obtained by calling Provantange at (800) 336-1166 in the United States; (800) 225-1166 in Canada; or (216) 494-8899 (customer service).

For example, you can use this catalog to find the number for Software Interphase, (401) 397-2340, to determine if their product QuickComm supports COM3 and COM4 called from a compiled Microsoft Basic program.

Also, Crescent Software (800-35-Basic) offers a product called PDQComm to support COM3 and COM4 from Microsoft QuickBasic versions 4.0, 4.0b, and 4.5, and from Microsoft Basic PDS versions 7.0 and 7.1 for MS-DOS.

When purchasing add-on products, make sure the vendor has tested its product under your version of Basic. For a list of other catalogs, query on the following words:

programmer and tool and catalog

Additional query words: QuickBas BasicCom 7.00 7.10 6.00 6.00b 3.30

Keywords: KB21789

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.