CPU::Z80::Assembler::AsmTable - Z80 assembly/disassembly table
use CPU::Z80::Assembler::AsmTable; asm_table()->{asm}{"adc"}{"a"}{","}{"("}{"hl"}{")"}{""} is [0x8E] asm_table()->{disasm}{0x8E}{""} is ["adc", "a", ",", "(", "hl", ")"]
This module provides a single function that returns a complete Z80 assembly / disassembly hash table.
By default the "asm_table" subroutine is exported.
This function returns the assembly/disassembly hash table.
Starting at the "asm" key, and following one sub-hash table for each token, with an empty token at the end of the list produces an array of opcode bytes of the corresponding Z80 assembly.
Starting at the "disasm" key, and following one sub-hash table for each opcode byte, with an empty byte at the end of the list, produces an array of tokens of the corresponding disassembled Z80 instruction.
The following special tokens are defined:
One byte;
One word;
The low byte of the word;
The high byte of the word;
The offset byte of a JR/DJNZ instruction that is converted to NN by adding address + 1;
The offset of a (ix+DIS) expression;
The offset of a (ix-NDIS) expression.
See CPU::Z80::Assembler.
CPU::Z80::Assembler
To install CPU::Z80::Assembler, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPU::Z80::Assembler
CPAN shell
perl -MCPAN -e shell install CPU::Z80::Assembler
For more information on module installation, please visit the detailed CPAN module installation guide.