1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-17 10:06:21 +00:00

Add, disable, logging detritus.

This commit is contained in:
Thomas Harte 2023-11-21 11:19:47 -05:00
parent 058080f6de
commit 931e6e7a56

View File

@ -23,6 +23,7 @@
#include "../TimedMachine.hpp" #include "../TimedMachine.hpp"
#include <array> #include <array>
#include <iostream>
namespace PCCompatible { namespace PCCompatible {
@ -675,6 +676,8 @@ class ConcreteMachine:
} }
// MARK: - TimedMachine. // MARK: - TimedMachine.
// bool log = false;
// std::string previous;
void run_for(const Cycles cycles) override { void run_for(const Cycles cycles) override {
auto instructions = cycles.as_integral(); auto instructions = cycles.as_integral();
while(instructions--) { while(instructions--) {
@ -712,10 +715,20 @@ class ConcreteMachine:
} }
context.registers.ip() += decoded.first; context.registers.ip() += decoded.first;
// log |= decoded.second.operation() == InstructionSet::x86::Operation::STI;
} else { } else {
context.flow_controller.begin_instruction(); 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. // Execute it.
InstructionSet::x86::perform( InstructionSet::x86::perform(
decoded.second, decoded.second,