#include "arch/debug/qemu_output.hpp" #include "kapi/cio.hpp" #include #include namespace arch::debug { qemu_output::qemu_output(output_device & lower) : m_lower{lower} , m_present{port::read() == port::address} {} auto qemu_output::write(kapi::cio::output_stream stream, std::string_view text) -> void { if (m_present) { std::ranges::for_each(text, port::write); } m_lower.write(stream, text); } } // namespace arch::debug