Comments: Authenticated sender is From: Kevin Baca Organization: BlueSky Software To: djgpp AT sun DOT soe DOT clarkson DOT edu Date: Mon, 7 Aug 1995 16:22:50 +0000 Subject: CLI asm instruction Here's another assembly question. I have an inner loop portion of my code in assembly (inline). For lack of registers I use the stack pointer (SS:ESP) to point to one of the buffers I need to update. This works fine until an interrupt hits and saves the register state on the "stack" which now points to my buffer. Then a portion of my 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 restore the previous interrupt mask state. 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? Here's my config: DJGPP 1.12 m4, Pentium 90, Windows 3.11 -Kevin kbaca AT skygames DOT com