1
0
mirror of https://github.com/mnaberez/py65.git synced 2024-11-19 06:31:08 +00:00

Updated monitor with new ObservableMemory interface

Signed-off-by: Mike Naberezny <mike@naberezny.com>
This commit is contained in:
offe 2009-04-03 16:21:00 +08:00 committed by Mike Naberezny
parent f128be6e5b
commit 2b8f58fb07

View File

@ -85,12 +85,12 @@ class Monitor(cmd.Cmd):
self.stdout.write(chr(value))
self.stdout.flush()
def getc(operation, address, value):
def getc(operation, address):
return getch(self.stdin)
m = ObservableMemory()
m.subscribe(m.WRITE, [0xF001], putc)
m.subscribe(m.READ, [0xF004], getc)
m.register_listener([0xF001], putc)
m.register_provider([0xF004], getc)
self._mpu.memory = m