From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg) Newsgroups: comp.os.msdos.djgpp Subject: Re: Question about djgpp's int-wrapper Date: 9 Jun 2002 19:09:30 GMT Organization: Ericsson Erisoft AB, Sweden Lines: 32 Message-ID: References: <5 DOT 0 DOT 2 DOT 1 DOT 2 DOT 20020609104552 DOT 009e64e0 AT pop DOT gmx DOT net> NNTP-Posting-Host: lws256.lu.erisoft.se X-Newsreader: TIN [version 1.2 PL2] To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Lawrence Rust (lvr AT nospam DOT softsystem DOT co DOT uk) wrote: : If you look at Intel's IA32 architecture manual: : ftp://download.intel.com/design/pentium4/manuals/24547107.pdf : you'll see on page 3-49 that in protected mode, iret only restores Well, I don't. But perhaps you meant page 3-349 or near that? : EFLAGS(IF) if CPL <= IOPL. This is also true of popf. So if the code is : run on a system such as Windows NT, 2K or XP where CPL is 3 and IOPL is 0 : then the task will be left with virtual interrupts disabled. The system : will remain responsive but the task will not receive any more interrupts : :-(. Ouch! : However, sti signals GP(0) if CPL > IOPL, which on NT is handled by the : NTVDM and will enable virtual interrupts to the task. : IMHO this is a design fault in the IA32. The correct action would have been Yes. I wonder what they were thinking at Intel when they designed this? Those five pages of pseudo-code showing us what is happening is impressive (in a baaaad way). I only wish they could have thought it through a little more before making the chips. Right, MartinS