delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/25/07:21:31

Date: Tue, 25 May 1999 14:19:01 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Oscar Almer <firstcheesemaster AT netscape DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: BIOS problem
In-Reply-To: <19990525084445.23813.qmail@www0b.netaddress.usa.net>
Message-ID: <Pine.SUN.3.91.990525141535.8830A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 25 May 1999, Oscar Almer wrote:

> could someone tell me if a c program written with djgpp could corrupt the
> settings in BIOS? This happened to me: i wrote a small communications program,
> wich used __djgpp_nearptr_enable() and _djgpp_conventional_base
> to adress the interrupt register and install a small interrupt to catch
> characters received.

It's rather unusual, but it can happen, especially if you use the
nearptr facility which effectively disables memory protection.

I would suggest to rewrite your program using farptr and see if it still 
works.  If it crashes due to GPF or Page Fault, it means that it was 
accessing invalid addresses, and that could damage your CMOS settings.
Also, make sure you are using DJGPP v2.02, where the low memory is better 
protected when farptr is used.

- Raw text -


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