Update cpu.cc

This commit is contained in:
MrKOSMOS 2021-12-03 20:34:03 +00:00 committed by GitHub
parent f19d1d0304
commit 9f0c11c6e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,8 +61,9 @@ void CPU::service_interrupt(Interrupts::Type interrupt, bool brk /* = false */)
switch (interrupt) {
case Interrupts::IRQ:
if (brk || !this->reg.p.i)
if (brk || !this->reg.p.i) {
this->reg.pc = this->read16(0xFFFE);
}
break;
case Interrupts::RESET: this->reg.pc = this->read16(0xFFFC); break;
case Interrupts::NMI: this->reg.pc = this->read16(0xFFFA); break;