www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/08/05:25:36

Date: Tue, 8 Aug 1995 11:12:14 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Kevin Baca <kbaca AT skygames DOT com>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: CLI asm instruction

On Mon, 7 Aug 1995, Kevin Baca wrote:

> This works great under plain DOS, but under Windows it's about 20%
> slower.  If I remove the CLI, the performance goes back up, but then 
> my buffer gets trashed.  Anyone have any idea why the CLI slows 
> performance under Windows?

CLI is a privileged instruction under Windows (disabling interrupts in a 
multitasked environment is a risky business), so Windows traps it and 
does what in effect disables interrupts for the task which asked for it.  
This inflicts runtime penalty.

- Raw text -


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