comparison python/zcc.py @ 237:81752b0f85a5

Added burn led test program
author Windel Bouwman
date Wed, 17 Jul 2013 22:31:54 +0200
parents 1fa3e0050b49
children 90637d1bbfad
comparison
equal deleted inserted replaced
236:8786811a5a59 237:81752b0f85a5
39 obj = cg.generate(ircode) 39 obj = cg.generate(ircode)
40 40
41 if args.dumpir: 41 if args.dumpir:
42 outs.dump() 42 outs.dump()
43 43
44 code_bytes = outs.sections['code'].to_bytes()
45 print('bytes:', code_bytes)
44 if args.output: 46 if args.output:
45 output_filename = args.output 47 output_filename = args.output
46 else: 48 else:
47 output_filename = 'lc.output' 49 output_filename = 'b.output'
48 50 with open(output_filename, 'wb') as f:
49 # TODO: store data 51 f.write(code_bytes)
50 52
51 if __name__ == '__main__': 53 if __name__ == '__main__':
52 arguments = parser.parse_args() 54 arguments = parser.parse_args()
53 main(arguments) 55 main(arguments)
54 56