old-MTGos-old/kernel/hal/x86/asm/snippets.S
2015-10-10 19:34:31 +02:00

14 lines
246 B
ArmAsm

.global loadGDT
//void _stdcall loadGDT(struct gdtp* ptr);
loadGDT:
mov 0x4(%esp), %eax // Load argument
lgdt (%eax)
//GDT is loaded now
mov $0x10, %ax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
mov %ax, %ss
ljmp $0x8, $.1
.1: