delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/11/04:32:50

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DPMI initialisation
Date: Tue, 10 Jun 1997 21:46:09 +0000
Organization: Two pounds of chaos and a pinch of salt
Lines: 35
Message-ID: <339DCB21.630F@cs.com>
References: <Pine DOT SUN DOT 3 DOT 95 DOT 970610123715 DOT 23277A-100000 AT sgsscsc1 DOT reading DOT ac DOT uk>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp213.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


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