1
0
mirror of https://github.com/mnaberez/py65.git synced 2024-06-10 02:29:29 +00:00

break pushes correct pc

This commit is contained in:
Ethan Sifferman 2023-07-29 15:36:24 -07:00
parent b710c742ac
commit e9f2c9398d
2 changed files with 2 additions and 2 deletions

View File

@ -528,7 +528,7 @@ class MPU:
@instruction(name="BRK", mode="imp", cycles=7)
def inst_0x00(self):
# pc has already been increased one
pc = (self.pc + 1) & self.addrMask
pc = (self.pc) & self.addrMask
self.stPushWord(pc)
self.p |= self.BREAK

View File

@ -68,7 +68,7 @@ class MPU(mpu6502.MPU):
@instruction(name="BRK", mode="imp", cycles=7)
def inst_0x00(self):
# pc has already been increased one
pc = (self.pc + 1) & self.addrMask
pc = (self.pc) & self.addrMask
self.stPushWord(pc)
self.p |= self.BREAK