Just a quick word about the 6502' interrupts. If an interrupt happens during an opcode (lets say cycle 3 of 6 ASL ZPX) is the opcode finished before the interrupt is executed? Also apparently the BRK opcode's breakpoint is ignored if the occurs, doe anyone have any more information regarding this?
Interrupts are not handled until after an instruction has finished executing. NMI/IRQ during BRK is a special case because the 6502 handles interrupts by literally executing a BRK instruction with special flags active to specify which vector to load (and to push the 'B' flag in the proper state).
Thanks for letting me know that. Just to clarify about the BRK bug. If an interrupt occurs during the BRK opcode then the opcode is not finished at all?
If an interrupt happens during a BRK, then the end of the BRK will be replaced with the end of the interrupt.