mirror of
https://github.com/mnaberez/py65.git
synced 2025-04-06 20:37:18 +00:00
Fixed assembling relative branches in the monitor. Closes #10.
This commit is contained in:
parent
b28bbe787a
commit
2c1614c82c
@ -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".
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user