Metadata-Version: 2.1
Name: z80dis
Version: 1.0.2
Summary: Z80 disassembler library
Home-page: https://github.com/lwerdna/z80dis
Author: Andrew Lamoureux
Author-email: foo@bar.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: Public Domain
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown

# 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'
```



