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 be supplied to disasm() to make 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.6.tar.gz
(7.0 kB
view details)
Built Distribution
File details
Details for the file z80dis-1.0.6.tar.gz
.
File metadata
- Download URL: z80dis-1.0.6.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81ef509cded5d22aa53a52c87cf59cb894d28a717430e1b7b378556f469abff5 |
|
MD5 | 5352ce76d8e6d2ce5483e91d0b02ecdc |
|
BLAKE2b-256 | f14444acf2a5496872c44ab5eef4e1fee4c8f02e20b2384818e2f629d89ca6b6 |
File details
Details for the file z80dis-1.0.6-py3-none-any.whl
.
File metadata
- Download URL: z80dis-1.0.6-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c94db5b0f4e69c3f3252bca30ec8ff5f481cb6f23b5974d4d20a7f129132f6fa |
|
MD5 | 479b6690677804eddc39410cf5a3e4c4 |
|
BLAKE2b-256 | 1bbeb501b94b75f34d9802472574bbf4de9a683180927746b7ce87c4ba067ac3 |