6502-reasm
6502 disassembler and (re)assembler
Allows disassembling any sequence of bytes to a unique disassembly text, and
reassembling the assembly text to the same bytes (fully roundtrippable). Includes
support for illegal opcodes with multiple mneumonic aliases, and truncated operands
represented by xx
.
Intended for disassembling a ROM (or a part of a ROM), editing the assembly to patch it, and reassembling with the changes. See also: nes-game-genie and nes-file.
Example:
const disasm formatDisasm reasm = ; // returns an array, one element per instruction const lines = ; // returns a verbosely formatted text string, same as passed below const formattedDisassembly = ; // returns an array of bytes, identical as passed to disasm() above ;
License
MIT