comparison python/asm.py @ 159:5e1dd04cb61c

Added attempt to assembler
author Windel Bouwman
date Fri, 08 Mar 2013 17:16:22 +0100
parents
children
comparison
equal deleted inserted replaced
158:9683a4cd848f 159:5e1dd04cb61c
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