diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2025-07-24 15:37:36 +0000 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2025-07-24 15:37:36 +0000 |
| commit | c6629ba11c17601695b0542d7d1d1bf5dc036d84 (patch) | |
| tree | 7c0c5fc0f334d92629640b79aee2dc6f0dea03dd /arch/x86_64/kapi/io.cpp | |
| parent | 4edbe94ce1266c9acc6a695fedf1d2edd4ce11cd (diff) | |
| download | teachos-c6629ba11c17601695b0542d7d1d1bf5dc036d84.tar.xz teachos-c6629ba11c17601695b0542d7d1d1bf5dc036d84.zip | |
build: clean up configuration
Diffstat (limited to 'arch/x86_64/kapi/io.cpp')
| -rw-r--r-- | arch/x86_64/kapi/io.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/x86_64/kapi/io.cpp b/arch/x86_64/kapi/io.cpp new file mode 100644 index 0000000..eab6473 --- /dev/null +++ b/arch/x86_64/kapi/io.cpp @@ -0,0 +1,36 @@ +#include "kapi/io.hpp" + +#include "x86_64/vga/text.hpp" + +namespace teachos::io +{ + + auto init() -> void + { + x86_64::vga::text::clear(); + x86_64::vga::text::cursor(false); + } + + auto print(std::string_view text) -> void + { + x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::green_on_black); + } + + auto println(std::string_view text) -> void + { + x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::green_on_black); + x86_64::vga::text::newline(); + } + + auto print_error(std::string_view text) -> void + { + x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::red_on_black); + } + + auto println_error(std::string_view text) -> void + { + x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::red_on_black); + x86_64::vga::text::newline(); + } + +} // namespace teachos::io |
