[comp.os.msdos.programmer] COM4 in TP5.5 or QC2.0

blk@mitre.org (Brian L. Kahn) (02/06/91)

I want to do some simple serial comm over COM4, but my compilers
(TP5.5 and QC2.0) seem to think there are only two comm ports.
Haven't there been 4 since the AT?  Is there a way to use COM4 from
TP5.5? 

--
B<   Brian Kahn   blk@security.mitre.org   "may the farce be with you"

GJM@SLACVM.SLAC.STANFORD.EDU (Greg Mushial) (02/06/91)

> I want to do some simple serial comm over COM4, but my compilers
> (TP5.5 and QC2.0) seem to think there are only two comm ports.
> Haven't there been 4 since the AT?  Is there a way to use COM4 from
> TP5.5?

The problem/limit is not that of TP or TC, but of DOS - it only knows
of COM1 and COM2. If you wish/need to "talk" to COM3 and COM4, then
you get to do it via the hardware ports - not really a major problem -
30 lines of TP for simple communications, 600 for a COM1-4 supporting
VT100 emulator (i've just finished such).
-greg

bank@lea.ncsu.edu (Dave The DM) (02/11/91)

In article <BLK.91Feb5162321@vanity.mitre.org> blk@mitre.org (Brian L. Kahn) writes:
>
>I want to do some simple serial comm over COM4, but my compilers
>(TP5.5 and QC2.0) seem to think there are only two comm ports.
>Haven't there been 4 since the AT?  Is there a way to use COM4 from
>TP5.5? 
>
>--
>B<   Brian Kahn   blk@security.mitre.org   "may the farce be with you"

    Well, problem #1 arises from the fact that DOS only (normally)
supports two COM ports...COM1 and COM2.
 
    Now you can get around this, by various ways. I knew one person
who managed, via "stacking" interrupts and other devious and arcane
mechanisms, managed to squeeze 16 or so ports into a poor PC.
 
    If you want to use COM3 and higher, I think you'll essentially have

to write your own device driver (either as a .SYS file or as part of
your application). The driver will have to know the base I/O addresses
of the port and talk to the 8253 UART directly.

    Either that, or you'll have to fool DOS a bit. I'm sure that's
possible, but I've never bothered with it (all my applications limit
themselves to "standard" stuff so as to increase portability) so you'll
have to ask someone else.

Dave the DM
bank@lea.csc.ncsu.edu