X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Andrew Cottrell Newsgroups: comp.os.msdos.djgpp Subject: Re: error 4 with write to serial port Date: Fri, 23 Jan 2004 19:18:33 +1100 Organization: HOME Message-ID: References: <40101D96 DOT 8070103 AT hccnet DOT nl> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 32 NNTP-Posting-Host: 202.154.115.197 X-Trace: 1074845623 news.syd.swiftdsl.com.au 10531 202.154.115.197 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com >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. You don't mention the comms method you used. be aware that under XP using a 16 bit app you cannot access the hardware, but with DJGPP beign 32 bit DPMI you can and do have access to the hardware under XP. This is not to say that when performing int21 or other intxx calls that they work correctly due to XP puting in hooks and redirecting the call!!!!! >What could be the reason? Any solution/circumvention?? Reasons:- 1) You may be using BIOS calls and as such these get redirected under XP. Solution:- 1) Use a comms library that directly writes to the UART (and uses the FIFO). There are a number of comms libraries in the V2TK directory with varying features, so have a look a good look at your requirements before you start. I have data sniffer that I can send to you with full source code (relased under GPL by me) that works under XP if you need to see how it can be done. Andrew