annotate python/asm.py @ 387:34ac19044b8a
Hello world with paging in emulator
author |
Windel Bouwman |
date |
Thu, 01 May 2014 22:09:18 +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'])
|