Skip to content

Commit

Permalink
Workaround for in-line literals with spaces
Browse files Browse the repository at this point in the history
v2a.py now simply ignores any literals with embedded spaces.

dvasm.py still cannot handle such literals, and most likely never will.

Note: this goes only for in-line literals. Using the old behaviour of
using numbers in the code section to refer to a specific literal still
works, and since the literal section doesn't split on spaces, you can
still use literal strings with embedded spaces.
  • Loading branch information
gvx committed Dec 17, 2013
1 parent e887cfe commit f78ce97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v2a.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def make_line_00(i, op, arg, labels, literals):
prefix = '{0:6}'.format(labels.get(i, ''))
if op in positional_instructions:
arg = labels[i + arg]
elif op in valued_opcodes:
elif op in valued_opcodes and ' ' not in literals[arg]:
arg = '%' + literals[arg]
elif op not in ops_with_arg:
arg = ''
Expand Down

0 comments on commit f78ce97

Please sign in to comment.