delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/28/05:06:04

Date: Thu, 28 Jan 1999 09:50:02 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: suryani lim <s DOT lim AT psych DOT unimelb DOT edu DOT au>
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: <Pine.SUN.3.91.990128094939.2355R-100000@is>
MIME-Version: 1.0
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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019