[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is NMI under Emulator?



Bryan Parkoff wrote:


What is NMI under Emulator?

    I have noticed that several emulator projects include hardware
manipulation such as IRQ and NMI.  I know that IRQ is used to interrupt 6502
CPU such as keyboard and I/O controller cards.  What about NMI?  Please
advise.

Basically on the 6502 an NMI is almost the same as an IRQ. There are two differences:

1.) An NMI cannot be prevented with a STI command, it gets through anyway. NMI means "Non Maskable Interrupt".

2.) The vector to jump to is read from $FFFA/FFFB instead of $FFFE/FFFF.

An NMI can be used if you need a higher priority interrupt that can interrupt a running IRQ handler again.

--

Linards Ticmanis

 The Master said, "The business of laying on the colors follows the
preparation of the plain ground."