Mercurial > lcfOS
view python/asm.py @ 367:577ed7fb3fe4
Try to make thumb work again
author | Windel Bouwman |
---|---|
date | Fri, 21 Mar 2014 10:27:57 +0100 |
parents | 6f4753202b9a |
children | 6df89163e114 |
line wrap: on
line source
#!/usr/bin/env python3 import argparse from ppci.assembler import Assembler if __name__ == '__main__': # When run as main file, try to grab command line arguments: parser = argparse.ArgumentParser(description="Assembler") parser.add_argument('sourcefile', type=argparse.FileType('r'), help='the source file to assemble') args = parser.parse_args() a = Assembler() obj = a.assemble(args.sourcefile.read())