#include "arch/video/vga/text.hpp" #include "arch/boot/pointers.hpp" #include "memory/asm_pointer.hpp" #include #include namespace teachos::arch::video::vga::text { namespace { auto constinit text_buffer = teachos::boot::asm_pointer{boot::vga_buffer_pointer}; auto write(char character, std::byte color) -> void { auto & p = *text_buffer; (*p++) = static_cast(character); (*p++) = color; }; } // namespace auto write(std::string_view text, std::byte color) -> void { std::ranges::for_each(text, [&](auto character) { write(character, color); }); } } // namespace teachos::arch::video::vga::text