aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/io.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/src/io.cpp')
-rw-r--r--arch/x86_64/src/io.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/x86_64/src/io.cpp b/arch/x86_64/src/io.cpp
index 8808dbb..5fb1c85 100644
--- a/arch/x86_64/src/io.cpp
+++ b/arch/x86_64/src/io.cpp
@@ -1,22 +1,22 @@
+#include "kern/print.hpp"
+#include "x86_64/vga/text.hpp"
+
namespace teachos::arch::io
{
- // using x86_64::vga::text_mode::attributes;
- // using x86_64::vga::text_mode::color;
-
- // namespace
- // {
- // auto constexpr error_attributes =
- // attributes{.foreground = color::light_gray, .bright = true, .background = color::red, .blink = true};
- // } // namespace
-
auto init() -> void
{
- // kernel::set_print_handler([](auto text) { return x86_64::vga::text_mode::print(text); });
- // kernel::set_println_handler([](auto text) { return x86_64::vga::text_mode::println(text); });
- // kernel::set_print_error_handler([](auto text) { return x86_64::vga::text_mode::print(text, error_attributes); });
- // kernel::set_println_error_handler(
- // [](auto text) { return x86_64::vga::text_mode::println(text, error_attributes); });
+ teachos::set_print_handler(
+ [](auto text) { return x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::green_on_black); });
+ teachos::set_println_handler(
+ [](auto text) { return x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::green_on_black); });
+
+ teachos::set_print_error_handler(
+ [](auto text) { return x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::red_on_black); });
+ teachos::set_println_error_handler(
+ [](auto text) { return x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::red_on_black); });
+
+ teachos::println("[x86-64] Basic VGA text output initialized.");
}
} // namespace teachos::arch::io