I am writing a GDT for a Kernel and all is going well, I\'m following this tutorial.
http://www.osdever.net/bkerndev/Docs/gdt.htm
When link the C code to the
In addition to Michael's answer, which definitely out-informs mine, this would be my translation:
.global gdt_flush gdt_flush: movl 4(%esp),%eax lgdt (%eax) movw $0x10, %ax movw %ax, %ds movw %ax, %es movw %ax, %fs movw %ax, %gs movw %ax, %ss jmp $0x08,$flush flush: ret