Z80 Disassembler [ TESTED ]

Pseudo-structure in C:

“To disassemble is to understand; to understand is to preserve.” z80 disassembler

def decode_one(pc, memory): op = memory[pc] if op in opcode_map: mnemonic, length = opcode_map[op] if length == 3: operand = memory[pc+1] | (memory[pc+2] << 8) return (mnemonic % operand, length) return (mnemonic, length) else: return (".db $%02X" % op, 1) Pseudo-structure in C: “To disassemble is to understand;

Pseudo-structure in C:

“To disassemble is to understand; to understand is to preserve.”

def decode_one(pc, memory): op = memory[pc] if op in opcode_map: mnemonic, length = opcode_map[op] if length == 3: operand = memory[pc+1] | (memory[pc+2] << 8) return (mnemonic % operand, length) return (mnemonic, length) else: return (".db $%02X" % op, 1)