Mercurial > lcfOS
annotate python/asm.py @ 195:37ac6c016e0f
Expanded asm subsystem
author | Windel Bouwman |
---|---|
date | Fri, 31 May 2013 21:06: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 |