X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: David Bolen Newsgroups: comp.os.msdos.djgpp Subject: Re: serial port interaction Date: 29 Dec 2004 14:46:25 -0500 Organization: Fitlinxx, Inc. - Stamford, CT Lines: 25 Sender: db3l AT CTWD0222 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: individual.net m/yeYgk99r6OKlbMOuvUkwaaPLwPAi35BVdIsElC8XAYjuCPgF User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com chus writes: > (...) > PD: I dont know if pmcom could be a solution. I tried to compile it, but it > failed. We use pmcom for our serial handling and find it works very nicely. Unless you use something like this, the odds are very good that you'll lose serial data since BIOS won't buffer any information but must be polled to ensure you receive all data. While it doesn't directly integrate into the filesystem layer in DJGPP, by and large COMPortOpen, COMWriteBuffer and COMReadBuffer are pretty easy replacements for open(), write() and read(). Of course it also supports a more async approach via interrupt handlers if you want, but I'm guessing to port your existing code over the simpler approach is best. You may be getting compilation errors due to some older preprocessor string concatenation stuff that was in the source (at least in the 1.0 version we use). In our case it was fixable by editing com.c and replacing instances of "##x" with just "x" (not including quotation marks) - I think there were six instances of that. I think that older GCC versions handled this syntax whereas the behavior changed somewhere around GCC 3.3 I think. -- David