Mercurial > lcfOS
annotate python/asm.py @ 189:5334b86ac1db
Added pyqt unittest
author | Windel Bouwman |
---|---|
date | Sat, 25 May 2013 15:04:44 +0200 |
parents | 5e1dd04cb61c |
children |
rev | line source |
---|---|
159 | 1 #!/usr/bin/python |
2 | |
3 # Assembler | |
4 | |
5 import sys, argparse | |
6 import pdb | |
7 | |
8 import libasm | |
9 | |
10 parser = argparse.ArgumentParser(description="Assembler") | |
11 pdb.set_trace() | |
12 parser.add_argument('sourcefile', type=argparse.FileType('r'), help='the source file to assemble') | |
13 args = parser.parse_args() | |
14 | |
15 | |
16 a = libasm.Assembler() | |
17 obj = a.assemble(args.sourcefile.read()) | |
18 | |
19 print('object:', obj) | |
20 |