Skip to main content

SH4 disassembler library

Project description

sh4dis

A python disassembler library for SH4

Use

>>> 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)
2

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.

Source Distribution

sh4dis-1.0.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

sh4dis-1.0.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file sh4dis-1.0.0.tar.gz.

File metadata

  • Download URL: sh4dis-1.0.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.0

File hashes

Hashes for sh4dis-1.0.0.tar.gz
Algorithm Hash digest
SHA256 11b391ca3402c9cd3feaf8d21e1a47c0201e052903d5422cef2d6787de5a847a
MD5 2055605bbe53157de9b098c227d503ee
BLAKE2b-256 dacf8a376aedef1dceeec36683c3a944918307e6c0522b2570e066f3ba323352

See more details on using hashes here.

File details

Details for the file sh4dis-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sh4dis-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.0

File hashes

Hashes for sh4dis-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 130131e74f37807ec274d5ada231db10ae7c4d2b9d29850dc549103264f04c7e
MD5 40d569dd9b9b285767ad022105550a77
BLAKE2b-256 5e19155a723419df53b6453059df5bf4b43218aac773f28cef867ba2ad158fad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page