mirror of
https://github.com/mnaberez/py65.git
synced 2024-11-07 21:05:41 +00:00
Improve error messages for "assemble" command.
This commit is contained in:
parent
d43cda43b5
commit
1c3c70c459
@ -137,11 +137,15 @@ class Monitor(cmd.Cmd):
|
||||
return self.help_assemble()
|
||||
|
||||
start, statement = split
|
||||
try:
|
||||
start = self._address_parser.number(start)
|
||||
except KeyError:
|
||||
self._output("Bad label: %s" % start)
|
||||
return
|
||||
|
||||
bytes = self._assembler.assemble(statement)
|
||||
if bytes is None:
|
||||
self._output("Statement could not be assembled.")
|
||||
self._output("Assemble failed: %s" % statement)
|
||||
else:
|
||||
end = start + len(bytes)
|
||||
self._mpu.memory[start:end] = bytes
|
||||
|
Loading…
Reference in New Issue
Block a user