Talk:NES CPU

From NESdevWiki

Jump to: navigation, search
PHP and BRK push the current status with bits 4 and 5 set on the stack, then set the I flag.

Umm... shouldn't the I flag only be set on the BRK instruction? PHP shouldn't modify flags on the standard 6502, and I don't know why the NES's CPU would be different. - Furrykef 19:27, 30 March 2007 (PDT)

Actually, the standard 6502 doesn't set the I flag at all for these instructions... is this an NES-specific quirk, or just an oversight? - Furrykef 23:06, 30 March 2007 (PDT)

As I recall, PHP does not set the I flag. Why would it? As for BRK, it's basically just an unmaskable IRQ that sets bit 4 in the status reg copy written to the stack. That being the only difference between the IRQ and BRK, BRK sets the I flag just like an actual hardware interrupt. --Doppelganger 21:22, 17 July 2008 (PDT)

  • Both PHP and BRK push flags with the B flag (bit 4) set to 1; said flag is only pushed with a value of 0 during hardware interrupts. --Quietust 10:10, 21 July 2008 (PDT)
Personal tools