Mercurial > lcfOS
annotate python/asm.py @ 346:3bb7dcfe5529
expanded arm target
author | Windel Bouwman |
---|---|
date | Fri, 07 Mar 2014 17:05:32 +0100 |
parents | 6f4753202b9a |
children | 6df89163e114 |
rev | line source |
---|---|
303 | 1 #!/usr/bin/env python3 |
2 | |
318 | 3 import argparse |
334 | 4 from ppci.assembler import Assembler |
196 | 5 |
6 if __name__ == '__main__': | |
7 # When run as main file, try to grab command line arguments: | |
8 parser = argparse.ArgumentParser(description="Assembler") | |
318 | 9 parser.add_argument('sourcefile', type=argparse.FileType('r'), |
10 help='the source file to assemble') | |
196 | 11 args = parser.parse_args() |
12 a = Assembler() | |
13 obj = a.assemble(args.sourcefile.read()) |