X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Andrew Cottrell Newsgroups: comp.os.msdos.djgpp Subject: Re: strange problem with dos DPMI Date: Fri, 18 Jan 2002 18:18:55 +1100 Organization: ihug (Sydney) Lines: 30 Message-ID: References: NNTP-Posting-Host: bugstomper.ihug.com.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: lust.ihug.co.nz 1011338324 29709 203.109.250.24 (18 Jan 2002 07:18:44 GMT) X-Complaints-To: abuse AT ihug DOT co DOT nz NNTP-Posting-Date: Fri, 18 Jan 2002 07:18:44 +0000 (UTC) X-Newsreader: Forte Agent 1.8/32.548 Cache-Post-Path: bugstomper.ihug.com.au!unknown AT p490-apx1 DOT syd DOT ihug DOT com DOT au X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Is the probelm that your program appears to stop and start? >The program installs protected mode driver for serial port, tries to >sends some bytes over it, but wve it also writes/reads from disk during >it, the program frees for several seconds (cca 30 secs) and then runs >agains. When saving to disk the BIOS will hog the CPU and as such you may lose incoming charaters. I have use PMCOM and other DJGPP comms libraries and I found that saving about 1024 chars at a time seems to be the optimal length. This does depend on the incoming rate, CPU and hard drive access time. The shorter the buffer to save the more times the more overhead there will be on saveing charaters as an overall percentage. The larger the block saved the longer the BIOS will hog the CPU and therefore you may (will) miss characters. >The same program runs under win95 without any problems and the same >variation >of this program build by borland runs without any problems. Windows usually caches writes to the hard drive. >I am looking for some tips as I have tried several test without success. >I even created a small version of this program, but it works without any >problems >also in DOS. Does it use the same comms library and save algorithm? Are you using an interrupt driven comms library? Which one are you using? Andrew