Mail Archives: djgpp/1995/08/14/14:12:32
In article <408or5$bk0 AT st-james DOT comp DOT vuw DOT ac DOT nz>,
Malcolm Taylor <empty AT sans DOT vuw DOT ac DOT nz> wrote:
> Charles Sandmann (sandmann AT clio DOT rice DOT edu) wrote:
>>> buffer gets trashed. So, I execute a PUSHF; CLI at the beginning of
>>> the loop to turn off interrupts and a POPF at the end of the loop to
>
>> Okay, this is a BAD THING. Read the DPMI spec. It clearly says that
>> CLI should be assumed to be very slow. Problem two: PUSHF is not
>> guaranteed to push the virtualized interrupt flag, and POPF may not
>> restore it. Aren't you glad Intel and MS gave us such brain damage?
>
> If CLI is so slow then how are interrupts disabled inside interrupt
> routines normally? Or do they just take the performance hit.
Interrupt routines are normally run in an environment where a real
CLI can be executed -- then the CLI is fast. However, CLI is an
instruction that isn't always allowed in protected mode -- attempting
to execute it will then generate an exception. The environment may then
choose to "virtualize" the CLI -- it then makes it appear as if the CLI
was executed althiguh there can be other stuff going on "behind the
scenes". DPMI sometimes does this.
Thus it's a virtualized CLI, not a real CLI, that's slow. And the difference
between a virtualized and a real CLI is that the virtualized CLI is a CLI
executed in an environment where it's not really allowed, but where the
environment makes it appear as if it did execute anyway.
--
----------------------------------------------------------------
Paul Schlyter, Swedish Amateur Astronomer's Society (SAAF)
Nybrogatan 75 A, S-114 40 Stockholm, SWEDEN
e-mail: pausch AT saaf DOT se paul DOT schlyter AT ausys DOT se
- Raw text -