aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/video/vga
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/src/video/vga')
-rw-r--r--arch/x86_64/src/video/vga/text.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/x86_64/src/video/vga/text.cpp b/arch/x86_64/src/video/vga/text.cpp
index f1e7412..bf60410 100644
--- a/arch/x86_64/src/video/vga/text.cpp
+++ b/arch/x86_64/src/video/vga/text.cpp
@@ -17,12 +17,6 @@ namespace teachos::arch::video::vga::text
extern "C" std::pair<char, attribute> * vga_buffer_pointer;
auto constinit text_buffer = teachos::memory::asm_pointer{vga_buffer_pointer};
-
- auto write(char code_point, attribute attribute) -> void
- {
- auto & p = *text_buffer;
- (*p++) = std::pair{code_point, attribute};
- };
} // namespace
auto clear(attribute attribute) -> void
@@ -39,9 +33,14 @@ namespace teachos::arch::video::vga::text
crtc::data_port::write(vga::crtc::data_port::read() | cursor_disable_byte);
}
+ auto write_char(char code_point, attribute attribute) -> void
+ {
+ auto & p = *text_buffer;
+ (*p++) = std::pair{code_point, attribute};
+ };
+
auto write(std::string_view code_points, attribute attribute) -> void
{
- std::ranges::for_each(code_points, [&](auto code_point) { write(code_point, attribute); });
+ std::ranges::for_each(code_points, [&](auto code_point) { write_char(code_point, attribute); });
}
-
} // namespace teachos::arch::video::vga::text