Skip to main content

Module disasm

Module disasm 

Source
Expand description

A minimal 65C816 disassembler for human-facing debug output.

Decode-only: disassemble_one takes a byte-peek closure (FnMut, so a caller may plug in a real Bus::read24 when a side-effect-free peek accessor isn’t convenient) and does nothing but decode the bytes it’s handed — it never touches CPU state and has no connection to crate::exec, the real cycle-accurate interpreter, so a bug here can never affect emulation correctness, only what a debugger prints. Prefer a genuinely read-only peek where one exists; the closure type doesn’t enforce that, it only enables it. Built for the frontend’s debugger overlay (docs/frontend.md §Debugger overlay) and for ad hoc instruction-level tracing (e.g. docs/audit/’s boot investigations).

Functions§

disassemble_one
Disassemble one instruction at pbr:pc.