Skip to main content

SH4 disassembler library

Project description


A python disassembler library for SH4


>>> from sh4dis import sh4
>>> sh4.disasm(0x1234, 0)
'mov.l r3,@(16,r2)'

Or, if you'd like access to the instruction internals, like opcode identifier and operands:

>>> decoded = sh4.decode(0x1234, 0)
>>> decoded.op
<OP.MOV: 53>
>>> decoded.operands[0]
(<OPER_TYPE.GPREG: 10>, <REG.R3: 4>)
>>> decoded.operands[1]
(<OPER_TYPE.DEREF_REG_IMM: 7>, <REG.R2: 3>, 16)

The decoded structure can still be made into a string:

>>> sh4.disasm(decoded)
'mov.l r3,@(16,r2)'

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sh4dis, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size sh4dis-1.0.0.tar.gz (10.0 kB) File type Source Python version None Upload date Hashes View
Filename, size sh4dis-1.0.0-py3-none-any.whl (10.9 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page