Mercurial > lcfOS
annotate python/asm.py @ 160:10330be89bc2
Started from scratch with code edit
author | Windel Bouwman |
---|---|
date | Sat, 09 Mar 2013 11:56:48 +0100 |
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 |