Simon Wistow
and 1 contributors


CPU::Emulator::DCPU16::Disassembler - a disassembler for DCPU-16 bytecode


    # Disassemble a single instruction
    my $instruction = CPU::Emulator::DCPU16::Disassembler->disassemble($pc, @memory);

    # Dump a whole program
    my $asm         = CPU::Emulator::DCPU16::Disassembler->dump($bytes);

disassemble <pc> <memory>

Given a program counter and an array of memory words will dissassemble the current instruction.

dump <words>

Given an scalar containing program bytecode will return a string representing the assembler.