mirror of
https://github.com/mnaberez/py65.git
synced 2025-03-05 09:30:23 +00:00
Add test that fails when disassembling wraps around memory
This commit is contained in:
parent
efd289a9c6
commit
585ce9b4ac
@ -7,6 +7,17 @@ from py65.utils.addressing import AddressParser
|
||||
|
||||
|
||||
class DisassemblerTests(unittest.TestCase):
|
||||
def test_disassemble_wraps_after_top_of_mem(self):
|
||||
mpu = MPU()
|
||||
mpu.memory[0xFFFF] = 0x20 # JSR
|
||||
mpu.memory[0x0000] = 0xD2 #
|
||||
mpu.memory[0x0001] = 0xFF # $FFD2
|
||||
|
||||
dis = Disassembler(mpu)
|
||||
length, disasm = dis.instruction_at(0xFFFF)
|
||||
self.assertEqual(3, length)
|
||||
self.assertEqual('JSR $ffd2', disasm)
|
||||
|
||||
def test_disassembles_00(self):
|
||||
length, disasm = self.disassemble([0x00])
|
||||
self.assertEqual(1, length)
|
||||
|
Loading…
x
Reference in New Issue
Block a user