Date: Thu, 28 Jan 1999 09:50:02 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: suryani lim cc: djgpp AT delorie DOT com Subject: Re: Hard disk error after running djgpp program In-Reply-To: <36AFE549.AA1B644D@psych.unimelb.edu.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Thu, 28 Jan 1999, suryani lim wrote: > The program also uses milisecond timing routine from PCTimer14 (Chih-Hao > Tsai). > > My question is : is it possible for a program to cause physical error > on the harddisk (at least as detected by scan disk) ? It's possible, if the program has bugs in handling hardware interrupts. The problem is that some CPU exceptions, like GPF, Stack Fault, etc. have the same numbers as low-level interrupts generated by IRQs connected to disk and other devices, so a bug that causes an exception in protected mode can cause spurious low-level disk operations to be performed. Btw, HP machines are known for their non-standard IRQ usage; that might be the reason that other systems don't see the problem. Does this problem happen with other DJGPP programs, like the compiler? If not, you need to look for a bug in your program. In particular, either PCTimer14 could be the culprit (try running the test program from the package, without any add-on code), or the code you have added to it.