From 2b8f58fb07ba25002714c4eee9cd7bc689fdd999 Mon Sep 17 00:00:00 2001 From: offe Date: Fri, 3 Apr 2009 16:21:00 +0800 Subject: [PATCH] Updated monitor with new ObservableMemory interface Signed-off-by: Mike Naberezny --- src/py65/monitor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/py65/monitor.py b/src/py65/monitor.py index 00eb602..cccf692 100644 --- a/src/py65/monitor.py +++ b/src/py65/monitor.py @@ -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