2015-07-21 17:25:36 +04:00
|
|
|
//To load GDT
|
2015-07-20 16:34:46 +04:00
|
|
|
#include "GDT/gdt.hpp"
|
2015-07-22 13:22:53 +04:00
|
|
|
#include "./Helpers/memPrint.hpp"
|
2015-07-21 17:25:36 +04:00
|
|
|
|
2015-07-19 11:52:01 +04:00
|
|
|
|
2015-07-21 16:53:10 +04:00
|
|
|
//----- PiegOS kernel main -----
|
2015-07-20 16:34:46 +04:00
|
|
|
int main(){
|
2015-07-19 11:20:21 +04:00
|
|
|
|
2015-07-22 13:22:53 +04:00
|
|
|
//Test print a char
|
|
|
|
char* letter=(char*)0xB8A00;
|
|
|
|
*letter='H';
|
|
|
|
letter++;
|
|
|
|
*letter=(GREEN << 4) | BLUE;
|
|
|
|
|
2015-07-21 16:53:10 +04:00
|
|
|
//Infinite loop
|
|
|
|
while(1);
|
|
|
|
|
|
|
|
//Exit code
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//----- PiegOS kernel boot -----
|
|
|
|
//Mangling the _boot function
|
|
|
|
extern "C" void _boot(){
|
|
|
|
|
2015-07-21 14:23:57 +04:00
|
|
|
//Create Gdt instance
|
|
|
|
Gdt gdt;
|
|
|
|
|
|
|
|
//Load Gdt into memory
|
2015-07-22 13:22:53 +04:00
|
|
|
//gdt.loadGdt();
|
2015-07-21 14:23:57 +04:00
|
|
|
|
2015-07-21 16:53:10 +04:00
|
|
|
//Call main function
|
|
|
|
main();
|
2015-07-19 11:20:21 +04:00
|
|
|
}
|
2015-07-21 16:53:10 +04:00
|
|
|
|