Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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.

Files for z80dis, version 1.0.5
Filename, size File type Python version Upload date Hashes
Filename, size z80dis-1.0.5-py3-none-any.whl (7.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size z80dis-1.0.5.tar.gz (6.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page