// snapshot.cpp — RamSnapshot: a plain, target-independent RAM image. #include "core/internal.hpp" #include "core/target.hpp" #include #include #include #include namespace mf { RamSnapshot::RamSnapshot(uint32_t base, std::span bytes) : base_(base), data_(bytes.begin(), bytes.end()) {} RamSnapshot RamSnapshot::from_file(const std::string &path) { return RamSnapshot(0, detail::read_file(path, 0)); } void RamSnapshot::to_file(const std::string &path) const { detail::write_file(path, data_); } } // namespace mf