1
0
mirror of https://github.com/mnaberez/py65.git synced 2026-04-22 05:16:28 +00:00

Fixed assembling relative branches in the monitor. Closes #10.

This commit is contained in:
Mike Naberezny
2009-08-15 17:21:49 -07:00
parent b28bbe787a
commit 2c1614c82c
3 changed files with 12 additions and 1 deletions
+3
View File
@@ -3,6 +3,9 @@ Next Release
- When using the monitor, the nonblocking character input at
$F004 should now work on the Microsoft Windows platform.
- Fixed that relative branch calculations would not use the correct
start address when assembling in the monitor. Closes #10.
0.6 (2009-08-11)
- Added monitor shortcut "a" for "assemble".
+1 -1
View File
@@ -173,7 +173,7 @@ class Monitor(cmd.Cmd):
self._output("Bad label: %s" % start)
return
bytes = self._assembler.assemble(statement)
bytes = self._assembler.assemble(statement, start)
if bytes is None:
self._output("Assemble failed: %s" % statement)
else:
+8
View File
@@ -59,6 +59,14 @@ class MonitorTests(unittest.TestCase):
out = stdout.getvalue()
self.assertEqual("Assemble failed: foo\n", out)
def test_do_assemble_passes_addr_for_relative_branch_calc(self):
stdout = StringIO()
mon = Monitor(stdout=stdout)
mon.do_assemble('4000 bvs $4005')
out = stdout.getvalue()
self.assertEqual("$4000 70 03 BVS $4005\n", out)
def test_help_assemble(self):
stdout = StringIO()
mon = Monitor(stdout=stdout)