Mail Archives: djgpp/1998/03/11/07:15:25
From: | michael DOT mauch AT gmx DOT de (Michael Mauch)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Overflow error on serial port with bioscom
|
Date: | Wed, 11 Mar 1998 13:03:19 +0100
|
Organization: | Gerhard-Mercator-Universitaet -GH- Duisburg
|
Lines: | 27
|
Message-ID: | <6e5uhh$sqh$1@news-hrz.uni-duisburg.de>
|
References: | <6e49ku$pp6$1 AT clarknet DOT clark DOT net>
|
NNTP-Posting-Host: | ppp94.uni-duisburg.de
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
On 10 Mar 1998 21:00:14 GMT, kfl AT clark DOT net (Keith Lynch) wrote:
> I am able to talk to COM1: using bioscom. But with COM2:, on which I
> have an internal "Aspen Technologies" 28.8 modem, I always instantly
> get 0x200 back from bioscom, an overflow error.
bioscom() is crap, because the underlying BIOS routines are crap. If you
really want to use that function, try the DOS command `mode´ before you
start your program, or better load a FOSSIL driver (e.g. X00 or BNU)
before you start your program.
Real programs that talk to the serial port use at least an
interrupt-driven input buffer. Whenever a character from the serial line
arrives, an interrupt is triggered so that the CPU calls an interrupt
function which grabs the character from the serial port and stores it
away in a buffer. The main program simply reads that buffer when it has
time to do so.
There are several libraries for DJGPP that do interrupt drive serial
i/o: dzcomm, bcserio and svasync are the ones that I remember.
If you don't need to support FOSSIL or Int14h (or if you don't know what
these are and just want to talk to the serial port), forget about
bioscom() as soon as possible and choose one of the serial libs.
Regards...
Michael
- Raw text -