delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/06/07:46:57

Date: Mon, 6 Dec 1999 12:25:52 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Prashant TR <prashant_news AT yahoo DOT com>
cc: Gareth Williams <ghw2002tii AT hotmail DOT com>,
DJGPP Mailing list <djgpp AT delorie DOT com>
Subject: Re: Setting a variable's selector? - Clarification - I hope.
In-Reply-To: <005a01bf3f4a$248ccbc0$21f838ca@home-computer>
Message-ID: <Pine.SUN.3.91.991206122530.19715G-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 5 Dec 1999, Prashant TR wrote:

> Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
> 
> >This probably means that you should use the real-mode interface, since
> >mixing 16-bit code with 32-bit code in the DPMI environment is tricky,
> >if not impossible.
> 
> Out of curiosity, could you give me a brief idea of how it works?
> If I ever need to do this, should I first create a descriptor and then
> try changing the access rights, or is it something totally different?

I suggest to begin by looking at the DJGPP startup code (crt0.S).  It
includes some code for the 16-bit setup (required by the DPMI spec and
to free the selectors that are used as long as 32-bit code runs).

In general, the DPMI 0.9 spec disallows mixing 16-bit and 32-bit DPMI
programs in the same virtual machine, so you cannot set up a 16-bit
code and data segments and then run 16-bit code that uses them from a
normal (i.e. 32-bit) DJGPP program.

- Raw text -


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