beauhefley wrote:
I want to add interrupts because I want to add keyboard input without polling port 0x60. My design for my OS has the kernel parse each executable file. Why do I need a GDT and a TSS? Without one, is it possible to make a good functioning OS and/or implement interrupts?
Yes, you need a GDT. It is required in 32-bit protected mode on the x86 architecture.
You may not think you already have one. But you're probably booting your OS with GRUB. GRUB automatically creates one. When GRUB hands control over to your OS, the old GDT GRUB created still resides within the CPU's internal cache. It's a good idea to replace it with your own one ASAP in the boot process to avoid problems later.
Truth be told, the GDT has few purposes in modern systems that make use of paging. It's a dinosaur of the x86's past, but it's still required for backwards-compatibility.
My advise? Just set one up. It's not as hard as it seems, honest. Provided you know C and some simple ASM, it shouldn't take you long to figure it out from the wiki documentation. If you don't know C and simple ASM, I highly recommend that you put OS development on hold and spend a week teaching yourself C and assembly on your normal operating system before jumping into your own.