I've already managed to get the bootstrap and the loader working, and I'm writing the kernel in C now. I loaded the IDT and a basic GDT with 3 descriptors (a null descriptor, a code desc and a data/stack code - I' m using the Flat Mode) in the loader(asm), and I have a gdt pointer in the kernel code (the address of this pointer is obtained during compilation with another program) that looks like this:
Code: Select all
dword _gdt;
Code: Select all
struct TSS mytss[3];
Code: Select all
((tssdesc*)_gdt + 0x03)->base = &mytss[0];
(Sorry for my bad english, and if the question is too stupid - I'm new at this)