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/include | |
| parent | 71bb11508020a55c5636f05136bd03059ddc33ed (diff) | |
| download | teachos-3a47a8bd0edcfa3aa03562d0a5c390ef85ad0c6b.tar.xz teachos-3a47a8bd0edcfa3aa03562d0a5c390ef85ad0c6b.zip | |
x86_64: move basic text output implementation
Diffstat (limited to 'arch/x86_64/include')
| -rw-r--r-- | arch/x86_64/include/x86_64/vga/io.hpp (renamed from arch/x86_64/include/arch/video/vga/io.hpp) | 12 | ||||
| -rw-r--r-- | arch/x86_64/include/x86_64/vga/text.hpp (renamed from arch/x86_64/include/arch/video/vga/text.hpp) | 16 |
2 files changed, 16 insertions, 12 deletions
diff --git a/arch/x86_64/include/arch/video/vga/io.hpp b/arch/x86_64/include/x86_64/vga/io.hpp index c399fad..803dc21 100644 --- a/arch/x86_64/include/arch/video/vga/io.hpp +++ b/arch/x86_64/include/x86_64/vga/io.hpp @@ -1,11 +1,11 @@ -#ifndef TEACHOS_ARCH_X86_64_VIDEO_VGA_IO_HPP -#define TEACHOS_ARCH_X86_64_VIDEO_VGA_IO_HPP +#ifndef TEACHOS_X86_64_VGA_IO_HPP +#define TEACHOS_X86_64_VGA_IO_HPP #include "arch/io/port_io.hpp" #include <cstddef> -namespace teachos::arch::video::vga +namespace teachos::x86_64::vga::io { namespace crtc { @@ -29,11 +29,11 @@ namespace teachos::arch::video::vga /** * @brief The address of the Cursor End register of the CRTC. */ - [[maybe_unused]] auto constexpr curser_end = std::byte{0x0b}; + [[maybe_unused]] auto constexpr cursor_end = std::byte{0x0b}; } // namespace registers }; // namespace crtc -} // namespace teachos::arch::video::vga +} // namespace teachos::x86_64::vga::io -#endif // TEACHOS_ARCH_X86_64_VIDEO_VGA_IO_HPP +#endif
\ No newline at end of file diff --git a/arch/x86_64/include/arch/video/vga/text.hpp b/arch/x86_64/include/x86_64/vga/text.hpp index cfbf98f..267eae9 100644 --- a/arch/x86_64/include/arch/video/vga/text.hpp +++ b/arch/x86_64/include/x86_64/vga/text.hpp @@ -1,14 +1,12 @@ -#ifndef TEACHOS_ARCH_X86_64_VIDEO_VGA_TEXT_HPP -#define TEACHOS_ARCH_X86_64_VIDEO_VGA_TEXT_HPP +#ifndef TEACHOS_X86_64_VIDEO_VGA_TEXT_HPP +#define TEACHOS_X86_64_VIDEO_VGA_TEXT_HPP #include <cstdint> #include <string_view> #include <type_traits> -namespace teachos::arch::video::vga::text +namespace teachos::x86_64::vga::text { - auto constexpr DEFAULT_VGA_TEXT_BUFFER_ADDRESS = 0xB8000; - /** * @brief The colors available in the standard VGA text mode. */ @@ -79,6 +77,12 @@ namespace teachos::arch::video::vga::text attribute{color::green, foreground_flag::none, color::black, background_flag::none}; /** + * @brief Make the affected cell display with a green foreground and black background. + */ + [[maybe_unused]] auto constexpr red_on_black = + attribute{color::red, foreground_flag::none, color::black, background_flag::none}; + + /** * @brief Make the affected cell display with a white (gray + intense) foreground and red background. */ [[maybe_unused]] auto constexpr white_on_red = @@ -164,6 +168,6 @@ namespace teachos::arch::video::vga::text } } -} // namespace teachos::arch::video::vga::text +} // namespace teachos::x86_64::vga::text #endif // TEACHOS_ARCH_X86_64_VIDEO_VGA_TEXT_HPP
\ No newline at end of file |
