Re: Question about 65816

From: Marko Mäkelä (msmakela_at_cc.hut.fi)
Date: 1998-07-12 23:48:43

On Wed, 8 Jul 1998, Ethan Dicks wrote:

> Check the B bit in the status byte on the stack to see if the IRQ was
> triggered by a BRK instruction or a real hardware interrupt.

Check the B bit also in the NMI handler, if the system uses lots of NMIs. 
There is a bug/feature in the NMOS 6502: an NMI can interrupt a BRK
instruction if the NMI occurs before the 4th (or so) cycle of the BRK's
execution (I've documented it in the 64doc file), and the B flag will be
set in the P register value pushed onto the stack.

	Marko

-
This message was sent through the cbm-hackers mailing list.
To unsubscribe: echo unsubscribe | mail cbm-hackers-request@dot.tcm.hut.fi.

Archive generated by hypermail 2.1.1.