Skip to content
Snippets Groups Projects
Commit 43a4e07d authored by Taddeus Kroes's avatar Taddeus Kroes
Browse files

Added option to save original assembly for easy comparison.

parent f60673bd
No related branches found
No related tags found
No related merge requests found
......@@ -7,11 +7,20 @@ if __name__ == '__main__':
from sys import argv, exit
if len(argv) < 2:
print 'Usage: python %s FILE' % argv[0]
print 'Usage: python %s SOURCE_FILE [ OUT_FILE [ SOURCE_OUT_FILE ] ]' \
% argv[0]
exit(1)
# Parse File
original = parse_file(argv[1])
if len(argv) > 3:
# Save input assembly in new file for easy comparison
out = write_statements(original)
f = open(argv[3], 'w+')
f.write(out)
f.close()
optimized = optimize(original, verbose=1)
if len(argv) > 2:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment