Reliable MS-DOS Serial Communication Under Windows

You can extend the life of your MSDOS serial communication (RS232 / RS485 /RS422) application with minimal investment in time or engineering. It is not difficult but may require minimal changes to your application.

When running an MSDOS serial communication application under Windows, the serial port (UART) is emulated. In other words, every byte written or read to/from the UART with the generic OUT/IN instructions generates a page fault and generates hundreds of CPU instructions. Given that reading and writing bytes to the UART may require several additional reads and writes to other control registers on the UART, this generally means that serial communication becomes erratic, non-deterministic, slow, and outright unreliable as thousand of CPU instructions must be executed for simple data access.

Ultimately the solution to the problem is to have a kernel driver that will handle all communication to the UART in the Windows kernel domain. Additionally a method to connect to the kernel driver must be established. WCSC tools are designed to solve this problem in a simple, efficient, programmer friendly way. The solution to the problem is dependent on the type of MSDOS application that you have.

Many MSDOS serial communication applications can be made to work reliably under Windows XP, Windows 2003, Windows 2000, and Windows NT with our high speed kernel driver/DLL COMM-DRV/NT with minor modifications to the application. In fact we have tested applications that ran effectively at 460 KBaud successfully on COM1 – COM4 or our PCI multiport cards in combination with our  COMM-DRV/NT WDM product.

Modifying a 16 bit MSDOS application to effect COMM-DRV/NT WDM usage is rather simple. The basic steps for a C/C++ MSDOS application are:

  • Isolate all serial communication calls. These could be calls to some other third party library or your own.
  • Map isolated calls to COMM-DRV/NT WDM calls. Our API supports a myriad of calls that will easily map to the previous calls.
  • Recompile and re-link the application.

Modifying a DOS extended 16 or 32 bit application requires, COMM-DRV/Dos in addition to COMM-DRV/NT. After installation of the drivers, the same steps listed for 16 bit MSDOS applications apply.

Note that these tools can also integrate with your QuickBasic 4.x, Professional Basic, and Visual Basic for DOS applications as well as all of your Windows applications.

Send email to [email protected] if you need additional information on leveraging your products by integrating them with our offerings.