Mercurial > lcfOS
view python/asm.py @ 169:ee0d30533dae
Added more tests and improved the diagnostic update
author | Windel Bouwman |
---|---|
date | Sat, 23 Mar 2013 18:34:41 +0100 |
parents | 5e1dd04cb61c |
children |
line wrap: on
line source
#!/usr/bin/python # Assembler import sys, argparse import pdb import libasm parser = argparse.ArgumentParser(description="Assembler") pdb.set_trace() parser.add_argument('sourcefile', type=argparse.FileType('r'), help='the source file to assemble') args = parser.parse_args() a = libasm.Assembler() obj = a.assemble(args.sourcefile.read()) print('object:', obj)