ericco@ssl.berkeley.edu (Eric C. Olson) (05/06/91)
I'm looking for some simple C code that implements modem communication. Thanks, Eric -- Eric ericco@ssl.berkeley.edu
hunt@jjmhome.UUCP (Tad J. Hunt) (05/06/91)
(note: the following code is what I recieved when I asked a similar question..)
( i think its by wolfgang.... i left the name at the bottom)
terminal()
{
int c;
long w;
for(;;)
{
c=Bconin(1); /* read from aux */
Cconout(c); /* output read char */
if (Cconis()) /* only if key was pressed */
{
w=Cnecin(); /* read from con */
if ((w>>16)==EXIT)
break; /* terminal exit condition */
Bconout(1,(int)w);/* output to aux */
}
}
}
EXIT should be #defined to be the scancode of the key you want to exit the
terminal with (UNDO for instance).
I am using Gemdos for console I/O so it can be redirected.
CU
Wolfram
well, that should help. one thing, you need to #include osbind.h
<grin> BTW, thanks for the help on the term program guys!!!