Fix asm/dasm bugs

This commit is contained in:
Patrick Surry 2023-09-11 20:46:31 -04:00
parent add9d783f8
commit 18859c908d
2 changed files with 3 additions and 3 deletions

View File

@ -167,7 +167,7 @@ class MPU(mpu6502.MPU):
def inst_0x5a(self):
self.stPush(self.y)
@instruction(name="STZ", mode="imp", cycles=3)
@instruction(name="STZ", mode="zpg", cycles=3)
def inst_0x64(self):
self.opSTZ(self.ZeroPageAddr)
self.pc += 1

View File

@ -102,8 +102,8 @@ class Disassembler:
elif addressing == 'zpi':
zp_address = self._mpu.ByteAt(pc + 1)
address_or_label = self._address_parser.label_for(
zp_address, '($' + self.byteFmt % zp_address + ')')
disasm += ' %s' % address_or_label
zp_address, '$' + self.byteFmt % zp_address)
disasm += ' (%s)' % address_or_label
length = 2
elif addressing == 'zpg':