#include "arch/kernel/main.hpp" #include "arch/exception_handling/assert.hpp" #include "arch/memory/frame_allocator.hpp" #include "arch/memory/multiboot/reader.hpp" #include "arch/video/vga/text.hpp" #include namespace teachos::arch::kernel { auto main() -> void { using namespace video::vga; text::clear(); text::cursor(false); text::write("TeachOS is starting up...", text::common_attributes::green_on_black); auto memory_information = memory::multiboot::read_multiboot2(); auto allocator = memory::area_frame_allocator(memory_information); auto last_allocated = allocator.allocate_frame(); auto allocated = last_allocated; do { last_allocated = allocated; allocated = allocator.allocate_frame(); } while (allocated.has_value()); video::vga::text::write("Allocated Frames", video::vga::text::common_attributes::green_on_black); video::vga::text::write_number(allocated.value().frame_number, video::vga::text::common_attributes::green_on_black); } } // namespace teachos::arch::kernel