28std::span<uint8_t>
fetchInstruction(
const MSXCPUInterface& interface, uint16_t addr,
29 std::span<uint8_t, 4> buffer, EmuTime::param time);
40unsigned dasm(std::span<const uint8_t> opcode, uint16_t pc, std::string& dest,
52unsigned dasm(
const MSXCPUInterface& interface, uint16_t pc, std::span<uint8_t, 4> buf,
53 std::string& dest, EmuTime::param time,
86 EmuTime::param time,
int n);
This file implemented 3 utility functions:
std::span< uint8_t > fetchInstruction(const MSXCPUInterface &interface, uint16_t addr, std::span< uint8_t, 4 > buffer, EmuTime::param time)
std::optional< unsigned > instructionLength(std::span< const uint8_t > bin)
Calculate the length of the instruction at the given address.
uint16_t instructionBoundary(const MSXCPUInterface &interface, uint16_t addr, EmuTime::param time)
This is only an heuristic to display instructions in a debugger disassembly view.
uint16_t nInstructionsBefore(const MSXCPUInterface &interface, uint16_t addr, EmuTime::param time, int n)
Get the start address of the 'n'th instruction before the instruction containing the byte at the give...
void appendAddrAsHex(std::string &output, uint16_t addr)
unsigned dasm(std::span< const uint8_t > opcode, uint16_t pc, std::string &dest, function_ref< void(std::string &, uint16_t)> appendAddr)
Disassemble.