delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/23/12:21:43

Date: Mon, 23 Feb 1998 19:19:53 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: John Welter <jwelter AT nwgeo DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Newbie Question.....
In-Reply-To: <34f1997c.0@news.oanet.com>
Message-ID: <Pine.SUN.3.91.980223191030.26566B-100000@is>
MIME-Version: 1.0

On Mon, 23 Feb 1998, John Welter wrote:

> 1) I understand programs written with it run in protected mode.  Under what
> circumstances do they switch back to real mode?  Ie: when doing screen or
> file I/O?

Any call to a DOS or BIOS function requires a mode switch.  Screen I/O 
can avoid it if you write directly to the video RAM with special conio 
functions (like cputs, cprintf etc.) instead if stdio functions.

> I'm trying to come to some understanding as to how much time is still spent
> in real mode

It depends on how much does the program call DOS/BIOS functions.  When 
the program doesn't call real-mode services, it stays in protected mode 
at all times, except that a timer tick, if not hooked by your handler, 
causes a mode switch 18 times a second.

> 4) Are bi-mode ISR's supported?

If you mean installing both real-mode and protected-mode handlers for a 
hardware interrupt, then yes, you can do that, but some assembly code is 
required.

I'd suggest to download the DJGPP FAQ list from the DJGPP sites, e.g.
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/faq210b.zip, and read 
section 18.9 there.  This should supply some necessary background, and 
you will be able to ask more specific questions after that.

> Basically, I'd much rather use DJGPP then PharLap's stuff as the price is
> certainly better and having full access to source is always a good thing but
> I'm not sure if there are any gotcha's with DJGPP.

After reading the FAQ, it might be useful to tell more about your 
application, so people could see if there will be any gotchas.

- Raw text -


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