annotate python/asm.py @ 386:2a970e7270e2
Added repeat assembler macro
author |
Windel Bouwman |
date |
Thu, 01 May 2014 17:40:59 +0200 |
parents |
6df89163e114 |
children |
|
rev |
line source |
303
|
1 #!/usr/bin/env python3
|
|
2
|
318
|
3 import argparse
|
381
|
4 from ppci.target.target_list import targets
|
|
5 from ppci.buildfunctions import assemble
|
196
|
6
|
|
7 if __name__ == '__main__':
|
|
8 # When run as main file, try to grab command line arguments:
|
|
9 parser = argparse.ArgumentParser(description="Assembler")
|
318
|
10 parser.add_argument('sourcefile', type=argparse.FileType('r'),
|
|
11 help='the source file to assemble')
|
196
|
12 args = parser.parse_args()
|
381
|
13 obj = assemble(args.sourcefile, targets['arm'])
|