Mail Archives: djgpp/1995/08/07/20:10:24
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
- Raw text -