Xref: news-dnh.mv.net comp.os.msdos.djgpp:1433 Path: news-dnh.mv.net!mv!news.sprintlink.net!newsfeed.internetmci.com!news.uoregon.edu!news.u.washington.edu!uw-beaver!uw-coco!nwfocus.wa.com!news.telebyte.com!usenet From: jhunter AT kendaco DOT telebyte DOT com (Joel Hunter) Newsgroups: comp.os.msdos.djgpp Subject: Re: CLI asm instruction Date: Fri, 04 Aug 1995 06:36:08 GMT Organization: Telebyte North West Silverdale, Wa Lines: 21 References: Nntp-Posting-Host: kendaco.telebyte.com To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp Kevin Baca wrote: [SNIP] >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? If I remember correctly, under DPMI executing the CLI instruction causes an exception. The exception handler then goes and calls DPMI function 0900h which disables the virtual interrupt state (hey, the interrupt flag is privelaged and not just any application can mess with it.) If you know you are going to be running under DPMI, I think it will be considerable faster executing DPMI function 0900 -- of course, a good chunk of that %20 could be just that Windows is a resource hog. -- jhunter AT kendaco DOT telebyte DOT com