Skip to main content

ez80dis — eZ80 disassembler

A Python disassembler for the Zilog eZ80 CPU, extending z80dis with full eZ80 instruction set support.

Found a bug? → Open an issue!

Features

  • All standard Z80 instructions
  • All eZ80 additions: LEA, PEA, MLT, TST, TSTIO, IN0, OUT0, SLP, STMIX, RSMIX, extended block I/O (INIM/OTIM/INI2/… families)
  • eZ80 16-bit LD variants
  • ADL mode: 24-bit immediates and addresses
  • .lil/.lis/.sil/.sis prefixes

Installation

pip install ez80dis

API

from ez80dis import decode, disasm, Decoded, DECODE_STATUS

# Quick string — one call
print(disasm(bytes([0xDD, 0x54])))          # ld D,IXH

# Structured result
dec = decode(bytes([0x5B, 0xCD, 0x00, 0x10, 0x00]), addr=0x1000, adl=True)
print(dec.status)       # DECODE_STATUS.OK
print(dec.len)          # 5  (mode-prefix byte + CALL Opcode + 3-byte CALL target)
print(disasm(dec))      # call.lil 0x001000

# ADL mode active by default
dec = decode(bytes([0xC3, 0x00, 0x10, 0x00]), adl=True)
print(disasm(dec))      # jp 0x001000

decode(data, addr=0, adl=False) -> Decoded

Decodes one instruction from data (bytes or list of ints).

Field Type Description
status DECODE_STATUS OK, INVALID_INSTRUCTION, or ERROR
len int Number of bytes consumed
op OP Opcode enum value
operands list List of (OPER_TYPE, value) tuples
typ INSTRTYPE Instruction category
mode_suffix str '.lil' / '.lis' / '.sil' / '.sis' / ''
long_op bool True when 24-bit operands are active

disasm(data_or_decoded, pc=0, adl=False) -> str

Convenience wrapper — accepts raw bytes or an already-decoded Decoded object.

FLAGS — F-register decoder

FLAGS is an IntFlag enum for unpacking the Z80/eZ80 flags register:

Bit Name Meaning
0 C Carry
1 N Add/subtract (set after SUB, cleared after ADD; used by DAA)
2 PV Parity / Overflow
3 F3 Undocumented copy of result bit 3
4 H Half-carry (carry from bit 3 to 4)
5 F5 Undocumented copy of result bit 5
6 Z Zero
7 S Sign (MSB of A)
from ez80dis import FLAGS

f = FLAGS(0x45)          # e.g. value read from the F register
print(f.name)            # 'C|PV|Z'
print(FLAGS.Z in f)      # True
print(f & FLAGS.C)       # FLAGS.C

License

Based on z80dis by lwerdna.
z80dis was released under The Unlicense. I decided to use the same for ez80dis.

Metadata

Release files for ez80dis 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ez80dis 1.0.4
File Size Uploaded Provenance Actions
ez80dis-1.0.4.tar.gz 10.4 kB With provenance Details for ez80dis-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ez80dis 1.0.4
File Interpreter ABI Platform Actions
ez80dis-1.0.4-py3-none-any.whl Python 3 none any Details for ez80dis-1.0.4-py3-none-any.whl

Total release size: 20.8 kB

Release files / ez80dis-1.0.4.tar.gz

Download URL ez80dis-1.0.4.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
35809217866e00c68acbd9fbfa39888b54c454d7ebc0ca2155ad7bd32311adea
BLAKE2b-256 checksum
How to use checksums
6c742dac59f6d4a1e64bf80a78b5eb4ddd30d3158e33670aa65f8521a8352d46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.

Transparency log

Release files / ez80dis-1.0.4-py3-none-any.whl

Download URL ez80dis-1.0.4-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a1c71d3c8bae4f0c28cc0ac2149c64e0300e7d1491973915fc697f8068d00b1
BLAKE2b-256 checksum
How to use checksums
edec708bbfb0803a915d89845abf416275e52a51197b5ef2bc2152d1f85dcd6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.

Transparency log

Security for ez80dis 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ez80dis-1.0.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page