added __repr__ to CPU class
This commit is contained in:
parent
d56dca3ff4
commit
4b26ab6774
@ -372,3 +372,9 @@ class CPU:
|
||||
for method in vars(CPU):
|
||||
if method.startswith('instruction_'):
|
||||
yield method[12:]
|
||||
|
||||
def __repr__(self):
|
||||
return "CPU(pc=0x{:08X}, cycle={})".format(
|
||||
self.pc,
|
||||
self.cycle
|
||||
)
|
Loading…
Reference in New Issue
Block a user