openMSX
Namespaces | Functions
Dasm.hh File Reference
#include "EmuTime.hh"
#include "function_ref.hh"
#include <cstdint>
#include <functional>
#include <span>
#include <string>
Include dependency graph for Dasm.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  openmsx
 This file implemented 3 utility functions:
 

Functions

void openmsx::appendAddrAsHex (std::string &output, uint16_t addr)
 
std::optional< unsigned > openmsx::instructionLength (std::span< const uint8_t > bin)
 Calculate the length of the instruction at the given address.
 
std::span< uint8_t > openmsx::fetchInstruction (const MSXCPUInterface &interface, uint16_t addr, std::span< uint8_t, 4 > buffer, EmuTime::param time)
 
unsigned openmsx::dasm (std::span< const uint8_t > opcode, uint16_t pc, std::string &dest, function_ref< void(std::string &, uint16_t)> appendAddr=&appendAddrAsHex)
 Disassemble.
 
unsigned openmsx::dasm (const MSXCPUInterface &interface, uint16_t pc, std::span< uint8_t, 4 > buf, std::string &dest, EmuTime::param time, function_ref< void(std::string &, uint16_t)> appendAddr=&appendAddrAsHex)
 Disassemble.
 
uint16_t openmsx::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 openmsx::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 given address 'addr'.