Date: Sun, 24 Oct 1999 09:50:43 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Martin Stromberg cc: djgpp AT delorie DOT com Subject: Re: far call In-Reply-To: <7up5hv$p47$1@antares.lu.erisoft.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.