Switching from text mode to graphics mode from c in 32 bit protected mode

1.5k views Asked by At

I am creating a small 32 bit operating system. I have written the boot loader in assembly language, written the kernel's entry in assembly and I am currently writing the kernel in c. In the bootloader, I have already switched to 32 bits protected mode. After that I called my kernel from memory address 0x1000. Everything is working perfectly as I can even print text to the screen by writing to memory address 0xb8000.My main question is this:
How do I switch to video(pixel plotting) mode from my kernel in protected mode. I know how to do this from 16 bits real mode from my boot loader by setting register ah to 0x00 and al to 0x13 then calling interrupt 0x10 but I have no idea of how to go about this from c code in protected mode. Help of any kind would be greatly appreciated. Thanks in advance
Additional information: I am using NASM to compile assembly code and Cygwin gcc to compile c code.

0

There are 0 answers