delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/24/08:42:46

Date: Sun, 24 Oct 1999 09:50:43 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Martin Stromberg <eplmst AT lu DOT erisoft DOT se>
cc: djgpp AT delorie DOT com
Subject: Re: far call
In-Reply-To: <7up5hv$p47$1@antares.lu.erisoft.se>
Message-ID: <Pine.SUN.3.91.991024094942.29385e-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 22 Oct 1999, Martin Stromberg wrote:

> I must be missing something. Suppose I allocate a descriptor and it's
> value is 0x103, which means it's a ring-3 descriptor.

I think you will never see 0x103 in a DJGPP program, because it's a
GDT selector.  0x107 would be a ring-3 LDT selector.

> I then call
> one of those two calls above and try to set its ring to 2. If that
> call succeed, the descriptor value has changed to 0x102?!!!

Yes!  The lower 3 bits of the selector are not part of the index into
the descriptor table, they are the TI (table indicator) bit and the
RPL, the requested privilege level.  So 0x102, 0x103 and 0x107 all
point to the same segment descriptor whose index is 0x20.

- Raw text -


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