Topic: How to I/O COM2


Author: Eddy@VAX2.Concordia.CA (Nelson Eddy)
Date: 12 Jan 94 21:54:34 GMT
Raw View
In article <1994Jan6.051855.16576@cs.uwp.edu>, yusuf@cs.uwp.edu (Muhammad
Yusuf) wrote:

>
> Hi,
>
> I need help.  I want access COM2: port on my pc from my Turbo C/C++
> program, but I don't know how to associate a file stream with
> it.  I checks several manuals but not talks of access COM2 or
> above.  I know you use stdaux to access COM1, that's exactly
> what I want to be able to do with COM2.
>
> Any help will be appreciated. Please respond to yusuf@cs.uwp.edu
> Thanks in advance.

Read about bioscom() in your manual. It looks like the C++ equivalent of
MSDOS interrupt 14, which gives you legal, albeit slow access to COM1 or
COM2.

For high speed stuff, learn to call an assembler routine from C++ (it's not
hard, but you need a good book/manual).  This is absolutely necessary if
you need to implement hardware handshaking (DTR/DSR, CTS/RTS, etc.).

An excellent book: Serial Communications in C and C++ w/disk by Mark
Goodwin (MIS Press, a subsid. of Holt).

Cheers!
Nelson Eddy
Eddy@VAX2.Concordia.CA




Author: yusuf@cs.uwp.edu (Muhammad Yusuf)
Date: Thu, 6 Jan 1994 05:18:55 GMT
Raw View
Hi,

I need help.  I want access COM2: port on my pc from my Turbo C/C++
program, but I don't know how to associate a file stream with
it.  I checks several manuals but not talks of access COM2 or
above.  I know you use stdaux to access COM1, that's exactly
what I want to be able to do with COM2.

Any help will be appreciated. Please respond to yusuf@cs.uwp.edu
Thanks in advance.