LLM Outperforms Legacy Tools in Building Custom Disassembler for Undocumented CPUs
A developer exploring custom disassembly for undocumented or legacy CPU architectures found that obtaining a structured opcode-to-instruction mapping table is the core challenge, not writing the decoding logic itself. Existing tools like Ghidra embed instruction definitions deep within its SLAgh engine, making raw opcode table export impractical without parsing a complex domain-specific language or running heavy Java frameworks. Traditional CLI disassemblers such as dis51 hardcode mappings into compiled logic and rely on recursive traversal, causing them to stall when encountering return instructions or inline data blocks. As an alternative, the author used Google's Gemini LLM to reconstruct and normalize a complete opcode lookup table for the 8051 architecture into a clean Python structure within minutes. The resulting lightweight linear-sweep disassembler achieved 100% binary coverage on a test ROM, outperforming both Ghidra and dis51 in this specific use case.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in