Mail Archives: djgpp/1999/09/26/08:48:52
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.
- Raw text -