> Why is it not just as important to CLI and STI when saving the
> registers?
Because any interrupt that can occur wont assume anything about the contents
of those registers.
However, interrupts DO assume something about SS and SP. Before the interrupt
even begins to perform its function, the processor pushes your old CS:IP, and
flags onto the stack. This is so the processor knows where to return to later
and doesn't "muck up" your flags.
In a case such as:
mov ss, ds:[foo]
mov sp, ds:[bar]
The "stack" is invalid inbetwen the two instructions. Any attempts to use
it will result in bad ju-ju.
--- GEcho 1.02+
---------------
* Origin: Midnight Madness Hartford, CT (1:142/8076)
|