comparison util/serve_arm_as.py @ 340:c7cc54c0dfdf devel

Test featurebranch
author Windel Bouwman
date Sun, 23 Feb 2014 16:24:01 +0100
parents 6f2423df0675
children 3bb7dcfe5529
comparison
equal deleted inserted replaced
339:6ee17c4dd6b8 340:c7cc54c0dfdf
8 import tornado.ioloop 8 import tornado.ioloop
9 import io 9 import io
10 10
11 def mangle(inp, outstream): 11 def mangle(inp, outstream):
12 print('assembling...', file=outstream) 12 print('assembling...', file=outstream)
13 p_as = subprocess.Popen(['arm-elf-as', '-mthumb'], stdin=subprocess.PIPE) 13 p_as = subprocess.Popen(['arm-elf-as'], stdin=subprocess.PIPE)
14 p_as.communicate(input=inp.encode('ascii')) 14 p_as.communicate(input=inp.encode('ascii'))
15 15
16 p_objdump = subprocess.Popen(['arm-elf-objdump', '-d'], stdout=subprocess.PIPE) 16 p_objdump = subprocess.Popen(['arm-elf-objdump', '-d'], stdout=subprocess.PIPE)
17 output = p_objdump.communicate()[0].decode('ascii') 17 output = p_objdump.communicate()[0].decode('ascii')
18 print(output, file=outstream) 18 print(output, file=outstream)