diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2023-10-11 14:43:50 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2023-10-11 14:43:50 +0200 |
| commit | 74eaee0fcc7390d4290b41a2a92ee34346e2f7c2 (patch) | |
| tree | 3a38f8dbe0c6b757167bc264cb68e3da145bd069 /source/kernel/arch/x86_64/src | |
| parent | f47bee5f51a73593d3594940663f56f2427f480b (diff) | |
| download | teachos-74eaee0fcc7390d4290b41a2a92ee34346e2f7c2.tar.xz teachos-74eaee0fcc7390d4290b41a2a92ee34346e2f7c2.zip | |
teachos: restructure file layout
Diffstat (limited to 'source/kernel/arch/x86_64/src')
| -rw-r--r-- | source/kernel/arch/x86_64/src/entry.cpp | 9 | ||||
| -rw-r--r-- | source/kernel/arch/x86_64/src/vga.cpp | 29 |
2 files changed, 0 insertions, 38 deletions
diff --git a/source/kernel/arch/x86_64/src/entry.cpp b/source/kernel/arch/x86_64/src/entry.cpp deleted file mode 100644 index fd9d9d0..0000000 --- a/source/kernel/arch/x86_64/src/entry.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "kernel/vga.hpp" - -namespace teachos::kernel -{ - extern "C" auto kernel_main() -> void - { - vga::write("TeachOS is starting up...", static_cast<std::byte>(0x4f)); - } -} // namespace teachos diff --git a/source/kernel/arch/x86_64/src/vga.cpp b/source/kernel/arch/x86_64/src/vga.cpp deleted file mode 100644 index efa2848..0000000 --- a/source/kernel/arch/x86_64/src/vga.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "kernel/vga.hpp" - -#include "boot/asm_pointer.hpp" -#include "boot/pointers.hpp" - -#include <algorithm> -#include <string_view> - -namespace teachos::kernel::vga -{ - - namespace - { - auto constinit text_buffer_pointer = boot::asm_pointer{boot::pointers::vga_buffer_pointer}; - - auto write(char character, std::byte color) -> void - { - auto & p = *text_buffer_pointer; - (*p++) = static_cast<std::byte>(character); - (*p++) = color; - }; - } // namespace - - auto write(std::string_view text, std::byte color) -> void - { - std::ranges::for_each(text, [&](auto character) { write(character, color); }); - } - -} // namespace teachos::kernel::vga
\ No newline at end of file |
