There wew bugfixes to dcc6502 since the version I had installed.
Chris Pressey
3 years ago
18 | 18 |
|
19 | 19 |
lines = [line for line in check_output("dcc6502 -o 2061 {}".format(filename), shell=True).split('\n') if line and not line.startswith(';')]
|
20 | 20 |
lines = [re.sub(r'\s*\;.*$', '', line) for line in lines]
|
21 | |
if "BRK" in lines[-1]:
|
22 | |
lines.pop()
|
23 | 21 |
sys.stdout.write('\n'.join(lines))
|