Microsoft KB Archive/60230

= How MS-DOS Communicates with Serial Ports =

Article ID: 60230

Article Last Modified on 11/26/2003

-

APPLIES TO


 * Microsoft MS-DOS 3.3 Standard Edition
 * Microsoft MS-DOS 3.3a
 * Microsoft MS-DOS 4.0 Standard Edition
 * Microsoft MS-DOS 4.01 Standard Edition
 * Microsoft MS-DOS 5.0 Standard Edition

-



This article was previously published under Q60230



SUMMARY
The information listed below describes how MS-DOS communicates with the serial ports.



MORE INFORMATION
The traditional MS-DOS method of reading from and writing to the serial ports is done through Interrupt 21H, Function 3 for AUX input. Interrupt 21H, Function 4 is used for AUX output. In MS-DOS Versions 2.00 and later, the handle-based Read File or Write File, or Device Functions (Interrupt 21H, Functions 3fH and 40H) can be used to read from or write to the auxiliary device. MS-DOS support for the serial communications port is inadequate in several respects for high-performance serial I/O applications. See &quot;Article 5: Character Device Input and Output&quot; on Pages 161-162 of the &quot;Microsoft MS-DOS Encyclopedia&quot; for a complete discussion of these limitations.

Whereas MS-DOS supports only two serial ports via COM1 and COM2, the BIOS also provides support for RS-232C asynchronous communications via Interrupt 14H for up to four serial ports. However, this service is not &quot;interrupt-driven&quot; and also is limited. Telecommunication application programs commonly take complete control of the serial ports and supply their own interrupt handler and internal buffering for character read and write operations. See &quot;Article 6: Interrupt-Driven Communications&quot; on Pages 167-246 of the &quot;Microsoft MS-DOS Encyclopedia&quot; for complete details and examples.

The industry COMx standard for ports, I/O addresses, and interrupt request lines is as follows:   I/O PORT    Address    IRQ ---   ---

COM1       3F8 HEX    4 COM2       2F8 HEX    3 COM3       3E8 HEX    4 COM4       2E8 HEX    3

Additional query words: 3.30 3.30a 4.00 4.01 5.00 noupd

Keywords: KB60230

-

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

© Microsoft Corporation. All rights reserved.