Hi, I am Lukas,
and I am writing my operating system but I have problem with switching video modes ( switching to VESA modes too ) because I don't know how to do it and I don't found any tutorial on it so I need help. I know that in real mode it can by done by using ah = 0x00 and with interruption 0x10, but I am in protected mode so I don't know how to do it. Can someone help me please?
Thanks for any help!
That's because the interrupts work differently in protected mode. In protected mode the CPU ignores the IVT (interrupt vector table) that was used in 16bit real mode, and instead requires you to set up an IDT (interrupt descriptor table). In 16bit protected mode, you might be able to (if you're lucky) get away with pointing the IDT to the same interrupt functions that the IVT originally pointed to (but if not, then you'll need to take the same steps as if you were working with 32bit protected mode). But if you mean 32bit protected mode, then that's not a possible shortcut at all, because the functions pointed to by the IVT are all written in 16bit code, not 32bit code. So you will need to write your own 32bit functions (or 16bit functions if you are talking about 16bit protected mode) for EVERY SINGLE FUNCTION that exists in the IVT. That's 256 functions you will need to write! Not worth the effort, if you are doing anything other than writing an entire operating system. Since I assume you are writing software, not an OS, I would advise you to not bother with this effort, unless you really just want to go through with it for the sake of learning how to do it (maybe as a project in a programming class at a university or something).