From 931e6e7a563566e994040a7e1afb0ec806b0e6fa Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 21 Nov 2023 11:19:47 -0500 Subject: [PATCH] Add, disable, logging detritus. --- Machines/PCCompatible/PCCompatible.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Machines/PCCompatible/PCCompatible.cpp b/Machines/PCCompatible/PCCompatible.cpp index c46acca41..724d065e4 100644 --- a/Machines/PCCompatible/PCCompatible.cpp +++ b/Machines/PCCompatible/PCCompatible.cpp @@ -23,6 +23,7 @@ #include "../TimedMachine.hpp" #include +#include namespace PCCompatible { @@ -675,6 +676,8 @@ class ConcreteMachine: } // MARK: - TimedMachine. +// bool log = false; +// std::string previous; void run_for(const Cycles cycles) override { auto instructions = cycles.as_integral(); while(instructions--) { @@ -712,10 +715,20 @@ class ConcreteMachine: } context.registers.ip() += decoded.first; + +// log |= decoded.second.operation() == InstructionSet::x86::Operation::STI; } else { context.flow_controller.begin_instruction(); } +// if(log) { +// const auto next = to_string(decoded, InstructionSet::x86::Model::i8086); +// if(next != previous) { +// std::cout << next << std::endl; +// previous = next; +// } +// } + // Execute it. InstructionSet::x86::perform( decoded.second,