Mail Archives: djgpp/1997/03/03/15:28:20
>
> ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) writes:
> > 0004 is general protection fault.
Ptttt! Not bloody likey! Get a 386, 486, or Pentium developers manual
and READ it, then make statements on what's what. DONT GUESS, it causes
more trouble than its worth (been there, done that:)
> > void main (void) {
> > int a;
> > a= *((int *)0);
> > }
> >
> > This will cause a GPF.
Wrong, this will cause a page fault under cwsdpmi and a being filled
with garbage under windows.
> > Beware dereferencing NULL!
>
Gisle Vanem wrote:
[some very good discriptions snipped]
> The opposite mode (bit 2=0) is supervisor mode. AFAIK, the CPU is always
> in user-mode (except for when e.g. laptops/green-PC's shuts down).
> Maybe the real experts out there care to comment.
Almost: there is user mode (ring 3) and supervisor mode (rings 0-2).
(most) DJGPP apps run in user mode, as do most windows/linux/os2/...
apps. The KERNELS (cwsdpmi, windows ... (basicly the dpmi servers)) run
in supervisor mode (usually only ring 0, 1-2 are usually ignored).
These modes have absolutly nothing to do with power savers and other
such filth ;) (don't get me wrong, I'm not in for wasting resources, but
I hate it when those things cut in at the worst possible moment (which
is what they always do)).
Bill
--
Leave others their otherness.
- Raw text -