Date: Sun, 26 Sep 1999 08:46:54 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Prashant TR cc: djgpp AT delorie DOT com, nicolas DOT gasnier AT wanadoo DOT fr Subject: Re: Protected Mode problem (note: Eli Zaretskii) In-Reply-To: <19990925165811.11399.rocketmail@web1406.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sat, 25 Sep 1999, Prashant TR wrote: > The program I'm trying to spawn is a 16-bit real mode > program, not a program written with DJGPP. Now I'm confused. In your other message you told that this program switches to protected mode. Now you are telling it's a real-mode program. Which is true? > I'm already > in MSDOS mode (I have to be if I need to access the > GDT, etc) and there are no memory managers. You might be in real mode, but the DPMI server is still active, and so you cannot do anything that it won't let you do. > Why I want to do is because I'm trying to get direct > access to the extended memory (which may be any > portion of extended memory; not just the portion of my > DS). If I did that in DJGPP, my program would crash > with a SIGSEGV. You can use the nearptr method to gain access to the entire 4GB address space from a DJGPP program. This seems like an easier way than to mess with protected mode from a real-mode program that runs under a DPMI server, since you automatically get compatibility with the parent DJGPP program and the DPMI host. > But I don't think merely accessing > registers like CR0, etc. should affect anything as > long as I set them back to what they were. I even > disable interrupts to make sure the control never goes > to the DPMI. Privileged instructions trigger exceptions, not interrupts. Disabling interrupts doesn't affect exceptions. So you will still crash. > It seems that CWSDPMI reprograms the PICs to > accomodate IRQ0-7 starting at INT 78-7fh. I'm not sure > about this and I need clarification. The CWSDPMI sources should tell. I don't remember by heart.