diff options
Diffstat (limited to 'kernel/main.cpp')
| -rw-r--r-- | kernel/main.cpp | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/kernel/main.cpp b/kernel/main.cpp deleted file mode 100644 index 0dec7e0..0000000 --- a/kernel/main.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//To load GDT -#include "GDT/gdt.hpp" -#include "./Helpers/memPrint.hpp" - - -//----- Global Definition ----- -memPrint VideoRam; //Used to print data on screen -//----------------------------- - - - -//----- PiegOS kernel main ----- -int main(){ - - //Welcome - VideoRam.print("Welcome to PiegOS"); - - //Infinite loop - while(1); - - //Exit code - return 0; -} - - - -//----- PiegOS kernel boot ----- -//Mangling the _boot function -extern "C" void _boot(){ - - //Create Gdt instance - Gdt gdt; - - //Load Gdt into memory - gdt.loadGdt(); - - //Init all segments and stack - __asm__("\ - movw $0x10, %ax; \n \ - movw %ax, %ds; \n \ - movw %ax, %es \n \ - ljmp $0x08, $updateDS;\ - updateDS: \n\ - movw $0x18, %ax \n \ - movw %ax, %ss \n \ - movl $0x00B00000, %esp \n\ - "); - - //Call main function after stack pointer changing (due to C++ optimisation) - main(); -} - |
