diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2025-07-14 21:08:02 +0000 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2025-07-14 21:08:02 +0000 |
| commit | 3a47a8bd0edcfa3aa03562d0a5c390ef85ad0c6b (patch) | |
| tree | 8fe6e1227a38f507f3424d858c83351557b52860 /arch/x86_64/src/io.cpp | |
| parent | 71bb11508020a55c5636f05136bd03059ddc33ed (diff) | |
| download | teachos-3a47a8bd0edcfa3aa03562d0a5c390ef85ad0c6b.tar.xz teachos-3a47a8bd0edcfa3aa03562d0a5c390ef85ad0c6b.zip | |
x86_64: move basic text output implementation
Diffstat (limited to 'arch/x86_64/src/io.cpp')
| -rw-r--r-- | arch/x86_64/src/io.cpp | 28 |
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 |
