Mail Archives: djgpp/1997/03/05/04:18:28
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 -