Question: Turbo C and communication

mccaugh at s.cs.uiuc.edu mccaugh at s.cs.uiuc.edu
Fri Aug 25 17:17:00 AEST 1989


Responding to: thomas at mvac23.UUCP  re: Turbo-C and comm

>However, when the program exits, it lowers DTR as part of it's cleanup (I'm 
>talking previously hacking in BASIC).  This is no good, since the dial command 
>goes out and before anything happens, DTR goes low killing the modem.

>Background:  I am using a terminal emulator which operates in block mode.
>However the modem can't handle a string which ends in an XOFF rather than 
>a carriage return.  So.... I though I would write a 'dialer' program which
>would dial the modem, then exit and start the emulation program so that it
>is ready by the time the modem connects.  So while going from the dialer
>program to the emulator, DTR has to stay high (so that the modem doesn't 
>hang up).

> The question:  Can I do this with Turbo C?  Do I have control over those
> bits in the 'modem port' of the PC?

 The answer is definitely yes, you can do this in Turbo-C, but first, what
 confuses me is that you say: "I thought I would write a 'dialer' program
 which would ... then exit and start the (terminal) emulation program...";
 then later on: "so while going from the dialer ..., DTR has to stay high",
 but initially, you reported: "when the program exits, it lowers DTR". It
 sounds like your own 'dialer' program is lowering the DTR upon exit to the
 emulator...what are you doing to make this happen?



More information about the Comp.lang.c mailing list