Mail Archives: djgpp/1997/06/11/04:32:50
Chris Mills wrote:
>
> Dear sir,
> I am create a program for my university third year project using
> djgpp and DPMI v1.0. My question is does djgpp initialise the DPMI client,
> or is this to be done by the programmer.
DPMI initialization is handled in two parts. First, by the 2k real mode
stub that is attached to all DJGPP executables. This takes care of
detecting DPMI and switching the CPU into protected mode. Second, by
the startup code itself, which handles setting up exception handling,
interrupts, descriptors, and all the other messiness involved.
Once control gets to your code, you have a 32-bit flat model address
space with a size potentially as large as the total physical and virtual
memory that your DPMI host will provide. But you must watch out for
code that accesses memory outside of your program's data segment,
because under protected mode such code will crash the program.
Specifically, you cannot directly access memory-mapped devices in
conventional memory. Setting up interrupt handlers also works
differently.
The Frequently Asked Questions list (v2/faq210b.zip) has lots of
information on what you can and cannot do in protected mode, and how to
work around it for the latter. Pay particular attention to chapters 10,
17, and 18.
hth!
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com |
| Plan: To find ANYONE willing to | http://www.cs.com/fighteer |
| play Descent 2 on DWANGO! | Tagline: <this space for rent> |
---------------------------------------------------------------------
- Raw text -