Skip to main content

Z80 disassembler library

Project description

z80dis

A python disassembler library for Z80

Use

>>> from z80dis import z80
>>> z80.disasm(b'\xCB\xE7', 0)
'set 4,a'

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

>>> decoded = z80.decode(b'\xCB\xE7', 0)
>>> decoded.op
<OP.SET: 58>
>>> decoded.operands[0]
(<OPER_TYPE.IMM: 45>, 4)
>>> decoded.operands[1]
(<OPER_TYPE.REG_A: 1>,)
>>> decoded.len
2

The decoded structure can still be made into a string:

>>> z80.disasm(decoded)
'set 4,a'

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

z80dis-1.0.4.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

z80dis-1.0.4-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file z80dis-1.0.4.tar.gz.

File metadata

  • Download URL: z80dis-1.0.4.tar.gz
  • Upload date:
  • Size: 6.8 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 z80dis-1.0.4.tar.gz
Algorithm Hash digest
SHA256 19e179e802403dbb075e62939a8e58e90b3712a334491ec61dd9c30609959f43
MD5 9a012c0d3ada340b9dfc7ec612b406da
BLAKE2b-256 1cdc71c89c0147b091e12815a0c9bf1d0f2f2279b5db20b115568fbf911c3fcb

See more details on using hashes here.

File details

Details for the file z80dis-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: z80dis-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.8 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 z80dis-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3399f6adf33c242d7ea636987a96deb89db6c6d9a723695214c3ebfe887c3450
MD5 6a26abf9b9bd73ea66b417ceee53709c
BLAKE2b-256 be4c193e7c2a4711096196f2e1e1fba27ed56491cbad9be2416fda6be346e145

See more details on using hashes here.

Supported by

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