USE THIS MODULES FOR PRIVATE USE
IF YOU PLANNING USE THIS MODULES TO MODIFICATE ringOS AND PUBLISH ringOS PLEASE ASK ringwormGO FOR PERMISSION

THIS IS LEGACY MODULE, CHECK settings.h FOR NEW VERSION OF MODULES

//Welcome Info
    //Welcome
    GlobalRenderer->Colour = 0xff00ffff;
	GlobalRenderer->CursorPosition = {0, 0};
	GlobalRenderer->Print("Welcome to ringOS!!");
	GlobalRenderer->Print(" ");

//Resolution Info
    //Basic system info
	GlobalRenderer->Colour = 0xffffff00;

	GlobalRenderer->CursorPosition = {0, 16};
	GlobalRenderer->Print("Basic System Info:");
	GlobalRenderer->Print(" ");

	GlobalRenderer->Print("Width: ");
	GlobalRenderer->Print(to_string((uint64_t)bootInfo->framebuffer->Width));
	GlobalRenderer->Print(" | ");

	GlobalRenderer->Print("Height: ");
	GlobalRenderer->Print(to_string((uint64_t)bootInfo->framebuffer->Height));
	GlobalRenderer->Print(" | ");

	GlobalRenderer->Print("PixelsPerScanLine: ");
	GlobalRenderer->Print(to_string((uint64_t)bootInfo->framebuffer->PixelsPerScanLine));
	GlobalRenderer->Print(" | ");

// Resolution info 2
	GlobalRenderer->Colour = 0xffffff00;
    GlobalRenderer->CursorPosition = {0, 16};

	//Resolution
    GlobalRenderer->Print("Resolution: ");
    GlobalRenderer->Print(to_string((uint64_t)bootInfo->framebuffer->Width));
    GlobalRenderer->Print(" x ");
    GlobalRenderer->Print(to_string((uint64_t)bootInfo->framebuffer->Height));

    GlobalRenderer->Colour = 0xffffffff;
    GlobalRenderer->CursorPosition = {0, 32};


//RAM Info
    GlobalRenderer->Print(" ");
	GlobalRenderer->Colour = 0xffff0000;

    GlobalRenderer->CursorPosition = {0, GlobalRenderer->CursorPosition.Y + 16};
    GlobalRenderer->Print("Free RAM: ");
    GlobalRenderer->Print(to_string(GlobalAllocator.GetFreeRAM() / 1024));
    GlobalRenderer->Print(" KB ");
    GlobalRenderer->CursorPosition = {0, GlobalRenderer->CursorPosition.Y + 16};

    GlobalRenderer->Print("Used RAM: ");
    GlobalRenderer->Print(to_string(GlobalAllocator.GetUsedRAM() / 1024));
    GlobalRenderer->Print(" KB ");
    GlobalRenderer->CursorPosition = {0, GlobalRenderer->CursorPosition.Y + 16};

    GlobalRenderer->Print("Reserved RAM: ");
    GlobalRenderer->Print(to_string(GlobalAllocator.GetReservedRAM() / 1024));
    GlobalRenderer->Print(" KB ");
    GlobalRenderer->CursorPosition = {0, GlobalRenderer->CursorPosition.Y + 16};

//Horizontal Line
    for(unsigned int x = 0; x < bootInfo->framebuffer->Width / 2 * BBP; x+=BBP) {
		*(unsigned int*)(x + (y * bootInfo->framebuffer->PixelsPerScanLine * BBP) + bootInfo->framebuffer->BaseAddress) = 0xff00ffff;
	}

//Terminal
    GlobalRenderer->Print("ringOS> ");

//RSDP check
    GlobalRenderer->Next();
    GlobalRenderer->Print(to_hstring((uint64_t)bootInfo->rsdp));
    GlobalRenderer->Next();
    GlobalRenderer->PutChar(*((uint8_t*)bootInfo->rsdp));
    GlobalRenderer->PutChar(*((uint8_t*)bootInfo->rsdp + 1));
    GlobalRenderer->PutChar(*((uint8_t*)bootInfo->rsdp + 2));
    GlobalRenderer->PutChar(*((uint8_t*)bootInfo->rsdp + 3));
    GlobalRenderer->PutChar(*((uint8_t*)bootInfo->rsdp + 4));
    GlobalRenderer->PutChar(*((uint8_t*)bootInfo->rsdp + 5));
    GlobalRenderer->PutChar(*((uint8_t*)bootInfo->rsdp + 6));
    GlobalRenderer->PutChar(*((uint8_t*)bootInfo->rsdp + 7));
    GlobalRenderer->Next();

// malloc example - not working properly with GUI
    GlobalRenderer->Next();
    GlobalRenderer->Print(to_hstring((uint64_t)bootInfo->rsdp));  
    GlobalRenderer->Next();
    GlobalRenderer->Print(to_hstring((uint64_t)malloc(0x800)));
    GlobalRenderer->Next();
    void* address = malloc(0x800);
    GlobalRenderer->Print(to_hstring((uint64_t)address));
    GlobalRenderer->Next();
    free(address);

//malloc example 2
    void* test = malloc(0x100);
    free(test);

    WindowStuff->Width(ResoWidth);
    WindowStuff->Height(ResoHeight);

//SMBIOS
    printf("SMBIOS Address: %x\n", bootInfo->SMBIOS);
    printf("SMBIOS Signature: %c%c%c%c\n", bootInfo->SMBIOS->Signature[0], bootInfo->SMBIOS->Signature[1], bootInfo->SMBIOS->Signature[2], bootInfo->SMBIOS->Signature[3]);

    SMBiosParse(bootInfo->SMBIOS);


# ERRORS
// Page Fault
    asm ("int $0x0e");

    int* test = (int*)0x80000000000;
    *test = 2;