[comp.os.msdos.programmer] Help needed on serial port programming

skgupta@iastate.edu (Gupta Sharad Kumar) (03/19/91)

I am building an electronic bulletin board for a research project. I have
a modem connected to one serial port(COM1) of my Zenith 386 machine and a
device called DECtalk (converts text to speech) to the other port(COM2).
I have written an interrupt driven program to handle the incoming calls.
My question is that is it possible to connect both the devices to the same
phone line (i.e. is it possible to distinguish whether the incoming phone 
call is for device connected to COM1 or for the device connected to COM2)? 
If yes, then how can I do this? I will greatly appreciate any help in this
context.

                                                   Sharad Gupta
                                                   skgupta@iastate.edu

markh@csd4.csd.uwm.edu (Mark William Hopkins) (03/29/91)

In article <1991Mar19.052603.8737@news.iastate.edu> skgupta@iastate.edu (Gupta Sharad Kumar) writes:
>I am building an electronic bulletin board for a research project. I have
>a modem connected to one serial port(COM1) of my Zenith 386 machine and a
>device called DECtalk (converts text to speech) to the other port(COM2).
>I have written an interrupt driven program to handle the incoming calls.
>My question is that is it possible to connect both the devices to the same
>phone line (i.e. is it possible to distinguish whether the incoming phone 
>call is for device connected to COM1 or for the device connected to COM2)? 

The question's ambiguous.

Under one interpretation, you're asking if it's possible to distinguish COM1
and COM2 when they are being used at the same time on the same machine, and
the answer is yes, because they use different interrupts (and different
interrupt handlers).

Under another interpretation, you're asking if it's possible to send mixed data
from COM1 and COM2 over the phone line and have the other end segregate the
data out.  The answer's yes, if you do it in software by making up a packet
protocol for all parties involved to use.

Under a third interpretation you're wrongly assuming that the DECtalk needs
to be connected to the phone line because of a lack of knowledge of COM1 and
COM2 being able to use separate interrupts, in which case the answer's the
same as the first given.