//! Disassembly for traces and listings: decode the instruction at an
//! address and render it in HP SASM syntax (see the CPU's disassembler
//! for the conventions). The instruction set itself stays internal; an
//! [`Instruction`] is only its length and its text.
use fmt;
use cratecpu;
/// One decoded instruction.
;
/// The SASM text, e.g. `A=A+B W` or `GOTO #0A3F2`; an undefined
/// encoding renders as `NIBHEX` of the nibbles read.
/// Decode the instruction at nibble address `pc`; `fetch` returns the
/// nibble at a 20-bit address (only its low 4 bits are used), addresses
/// wrap at 20 bits ([`ADDR_MASK`](crate::ADDR_MASK)). For a running
/// machine, `fetch` is [`Machine::peek`](crate::Machine::peek).