Capstone: Disassembly framework (library) for XCore

Technical questions regarding the XTC tools and programming with XMOS.
capstone
Newbie
Posts: 1
Joined: Wed May 28, 2014 3:07 am

Capstone: Disassembly framework (library) for XCore

Post by capstone »

Hi,

We have developed a disassembly library for XCore, and released it as open source project at http://capstone-engine.org/.

Find the source at https://github.com/aquynh/capstone

Capstone is friendly & simple to use. Written in C, but it supports bindings for all popular programming languages. Example: the below Python code disassemble 4 bytes:

Code: Select all

from capstone import *

CODE = “\x9e\xff\xec\x17”

md = Cs(CS_ARCH_XCORE, 0)
for i in md.disasm(CODE, 0x1000):
    print "0x%x:\t%s\t%s" % (i.address, i.mnemonic, i.op_str)
Below is the output when running the sample code above:

Code: Select all

$ python testxcore.py
0x1000:	get	r3, ps[r6]
Let us know if you find this useful. We can be reached via contacts at http://capstone-engine.org/contact.html

Thanks.