delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/05/04:18:28

Date: Wed, 5 Mar 1997 11:04:35 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Paul Derbyshire <ao950 AT FreeNet DOT Carleton DOT CA>
cc: djgpp AT delorie DOT com
Subject: Re: Ring 0?
In-Reply-To: <5fivnk$cfc@freenet-news.carleton.ca>
Message-ID: <Pine.SUN.3.91.970305105931.14799M-100000@is>
MIME-Version: 1.0

On 5 Mar 1997, Paul Derbyshire wrote:

> What exactly is "ring 0"? A page on optimizing code using CWSDPR0
> mentioned it. But it's not clear to me what it is. I assume it isn't a
> modem thing...:)

No, ring 0 is about privileges that programs have when running in 
protected mode on Intel CPUs.  Ring 0 is the highest level (you can do 
anything), while ring 3 is the lowest.  DJGPP programs run in ring 3.  
The privileges are checked when you issue priviledged instructions, such 
as INT, STI, and instructions which load descriptor tables (GDT, LDT< 
etc.).  If you have the priviledge, the instruction is executed as usual, 
but if you don't, this causes an exception.  The exception typically goes 
to the DPMI host and/or the memory manager (EMM, QEMM, Windows) which may 
elect to let your instruction be executed, emulate it, ignore it, or 
abort your program.

- Raw text -


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