Date: Mon, 23 Feb 1998 19:19:53 +0200 (IST) From: Eli Zaretskii To: John Welter cc: djgpp AT delorie DOT com Subject: Re: Newbie Question..... In-Reply-To: <34f1997c.0@news.oanet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.