Re: [PATCH] NMI trap revised (was Re: NMI errors in 2.0.30??)

Riccardo Facchetti (
Thu, 8 May 1997 20:39:33 +0200 (MET DST)

On Thu, 8 May 1997, Martin Mares wrote:
> Hi,
> > I was following the NMI discussion and today I have fond, under a pile of
> > old DDJ issues, an old manual which explain something (really not much)
> > about NMI on the old 80286 PC/XT. Supposing the NMI mechanism is not
> > changed for (23456)86, this is a patch that can help detect if the NMI is
> > a real hardware failure or triggered by something else.
> The NMI status bits certainly didn't exist on the XT as XT has its keyboard
> disable bit here.

Hmmm ... according to this tech ref, there are two ways to disable the
keyboard (Ctrl Cmd Byte == Keyboard Controller's Command Byte):

write 0xAD to port 0x64 (set bit 4 of the Ctrl Cmd Byte, the same
as the second way, but in one
write 0x20 to port 0x64 (get Ctrl Cmd Byte, command)
read from port 0x60 (read the Ctrl Cmd Byte)
set bit 4 of Ctrl Cmd Byte (disable keyboard)
write 0x60 to port 0x64 (set Ctrl Cmd Byte, command)
write Ctrl Cmd Byte to port 0x60

To re-enable the keyboard, set the 4th byte of Ctrl Cmd Byte to 0 (or
write 0xAE to port 0x64, the same but in one instruction).

So as you can see the 0x61 register was not used to disable the keyboard.
May be you are referring to the 8086 PC/XT.

> But it should exist on the AT and all newer PC's. Intel Triton
> documentation mentions the status bits, too, although AMD 640 Chipset docs
> don't (but they miss the 0x61 register at all).
> I'll test it today and let's see if the bits work or not.

Yes ... but ... err ... do you have some buggy parity memory ? :)))