Chapter 5: Programming
Sample Programs
There are sample programs provided with the card in C, Pascal, QuickBASIC, and several Windows
languages. DOS samples are located in the DOS directory and Windows samples are located in the
WIN32 directory.
Windows Programming
The card installs into Windows as COM ports. Thus the Windows standard API functions can be used. In
particular:
►
CreateFile() and CloseHandle() for opening and closing a port.
►
SetupComm(), SetCommTimeouts(), GetCommState(), and SetCommState() to set and
change a port’s settings.
►
ReadFile() and WriteFile() for accessing a port.
See the documentation for your chosen language for details.
Under DOS, the process is very different. The remainder of this chapter describes DOS programming.
Manual PCI-COM-422/4
14