X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: <401228B4.7030402@hccnet.nl> Date: Sat, 24 Jan 2004 09:11:32 +0100 From: Rob Hamerling User-Agent: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en, fr, nl, de-de MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: error 4 with write to serial port References: <40101D96 DOT 8070103 AT hccnet DOT nl> <4011e2d0 DOT 2230942 AT news DOT voyager DOT net> In-Reply-To: <4011e2d0.2230942@news.voyager.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Hello Chris, [RobH] >>>I have built a DOS program with DJGPP to access a serial port. >>>This program works fine under plain DOS (ic IBM PC/DOS 6.3). >>>However when I boot from a bootable diskette created with >>>WinXP and start the program it returns error 4 with a write() >>>to the serial port. Chris Giese wrote: > Does it return error 4 from write() or from open()? > I think DOS error 4 is "too many open files". Try increasing > the FILES=nnn value in CONFIG.SYS It is indeed the write() which returns error 4. If '4' would mean "too many files" open() would fail, and since the mode command, which is called before to set port speed, etc doesn't fail, it can't be that problem. I think the default is 20 files, but I tried it (config.sys didn't contain a 'Files=" setting) and it didn't help. Thanks for your attempt to help anyway! Regards, Rob. -- Rob Hamerling, Vianen, NL phone +31-347-322822 homepage: http://www.robh.nl/