delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/14/14:12:32

Xref: news-dnh.mv.net comp.os.msdos.djgpp:1523
Path: news-dnh.mv.net!mv!news.sprintlink.net!EU.net!dkuug!Norway.EU.net!nac.no!news.kth.se!admin.kth.se!merope.saaf.se!electra.saaf.se!not-for-mail
From: pausch AT electra DOT saaf DOT se (Paul Schlyter)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: CLI asm instruction
Date: 10 Aug 1995 18:36:16 +0200
Organization: Svensk Amat|rAstronomisk F|rening
Lines: 35
References: <DCyttJ DOT A0L AT jade DOT mv DOT net> <30275d24 DOT sandmann AT clio DOT rice DOT edu> <408or5$bk0 AT st-james DOT comp DOT vuw DOT ac DOT nz>
Nntp-Posting-Host: electra.saaf.se
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


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