diff --git a/CHANGES.txt b/CHANGES.txt index f0a1026..61613bb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,9 @@ - Reformatted source code to comply with PEP8. + - Fixed a bug where the MPU status display would wrap unexpectedly + on some terminals. + 0.13 (2012-11-15) - Fixed a bug where negative numbers could be entered diff --git a/py65/devices/mpu65org16.py b/py65/devices/mpu65org16.py index 4fab41c..b72b9ca 100644 --- a/py65/devices/mpu65org16.py +++ b/py65/devices/mpu65org16.py @@ -44,5 +44,5 @@ class MPU(mpu6502.MPU): disassemble = mpu6502.MPU.disassemble[:] def reprformat(self): - return ("%s PC AC XR YR SP NV---------BDIZC\n" + + return ("%s PC AC XR YR SP NV---------BDIZC\n" + "%s: %08x %04x %04x %04x %04x %s") diff --git a/py65/monitor.py b/py65/monitor.py index 596c303..e31b63f 100644 --- a/py65/monitor.py +++ b/py65/monitor.py @@ -43,9 +43,10 @@ class Monitor(cmd.Cmd): argv = sys.argv self._reset(self.mpu_type) self._width = 78 - self._update_prompt() + self.prompt = "." self._add_shortcuts() cmd.Cmd.__init__(self, completekey, stdin, stdout) + self._output_mpu_status() self._parse_args(argv) def _parse_args(self, argv): @@ -109,7 +110,7 @@ class Monitor(cmd.Cmd): error = 'Error: %s, %s: file: %s line: %s' % (t, v, file, line) self._output(error) - self._update_prompt() + self._output_mpu_status() return result def _reset(self, mpu_type): @@ -211,8 +212,8 @@ class Monitor(cmd.Cmd): self._mpu.memory = m - def _update_prompt(self): - self.prompt = "\n%s\n." % repr(self._mpu) + def _output_mpu_status(self): + self._output("\n" + repr(self._mpu)) def _output(self, stuff): if stuff is not None: