SM> *** Glen McNabb wrote in a message to Scott McNay:
SM>
SM> GM> Actually, (and I checked) it can happen on all of them.
SM> GM> Changing the the location of the stack (to a different
SM> GM> segment) involves changing the SS and the SP. (usually) If
SM> GM> the interupt occurs between loading those two registers the
SM> GM> stack's location is undefined for that period of time.
SM> You sure of this? Last I heard, as of the 80C86/80C88, that had been
SM> fixed, so that interrupts would not occur until after the instruction
SM> after a load of SS. If you run DEBUG and single-step through MOV SS,AX /
SM> MOV SP,BX (or something similar), you'll find that the single-step jumps
SM> from the MOV SS,?? to the instruction following MOV SP,??, unless you
SM> explicitly force a breakpoint at the MOV SP,??.
I checked my Intel Handbook on these processors and up to 386DX and they
all can be interupted between those two instructions... As for testing
that in Debug.EXE that's another matter. Remember, Debug uses that same
stack. When single tracing, Debug pokes the trap byte into the next
following instruction. Then it sets the registers to the last saved
values from a previous single trace and jumps to that address. Once
that instruction is completed it hits the trap instruction next. The
trap interupt occures. It saves the values of the current registers and
then fallows the routine to display them to you. Odviously, if Debug is
using that same stack when doing a trap interupt it had better check
ahead and make sure the stack is a valid one. Debug itself jumps over
them two instructions in a trace trap. Forcing a breakpoint overrides
that.
SM> GM> In the case of the NMI, it's used for parity checking. The
SM> GM> NMI should never activate unless you have a parity error. If
SM> GM> you have a failed parity, a stack is gonna be the least of
SM> GM> your problems.
SM> Hmm, isn't it also used for pre-emptive multitasking? If it's not NMI,
SM> then what is it?
There are a number of ways to do that. In multitasking on a PC is not
possible. It's a single tasking processor. Basically, it task switches
very quickly from one task to the next in a daisy chain fashion but
it does not do two or more tasks at one time. Keeping this in mind,
there are a number of ways to interupt a processer every so many
clocks, instructions, or time intervals to make it switch from one
task to the next. While on SOME motherboards it is possible to use
the NMI for a multitasking interupt, it's not an absolute for all of
them...
If your curious, try using debug to INT 02h from plain MSdos.
(NMI interupt vector) If you don't get a reboot, look at what
it says on the screen. I bet you'll find those words in BIOS rom
somewhere.
Glen...
--- ProBoard v2.16 [Reg]
---------------
* Origin: NC/NEC SEWAnet, Bucolic Fair (1:3407/25)
|