aboutsummaryrefslogtreecommitdiff
path: root/kernel/boot
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-02-02 09:01:29 -0500
committerRaghuram Subramani <raghus2247@gmail.com>2025-02-02 09:01:29 -0500
commitc216a2000179a133e1e38852f55261f4bf9f08f6 (patch)
tree5598723901bfc557169a0d5294f411294662af10 /kernel/boot
parentf9d0734cf87f5ed03a57fdd994067dd5f872de78 (diff)
misc: gcc->clang && gas->nasm
Diffstat (limited to 'kernel/boot')
-rw-r--r--kernel/boot/gdt/gdt.s20
1 files changed, 9 insertions, 11 deletions
diff --git a/kernel/boot/gdt/gdt.s b/kernel/boot/gdt/gdt.s
index ee50e4e..d1d768c 100644
--- a/kernel/boot/gdt/gdt.s
+++ b/kernel/boot/gdt/gdt.s
@@ -1,26 +1,24 @@
-.intel_syntax noprefix
-
.global _GDT_flush
.type _GDT_flush, @function
_GDT_flush:
/* First Argument (Pointer to the GDT) */
- mov eax, [esp + 4]
+ movl 4(%esp), %eax
/* Load GDT */
- lgdt [eax]
+ lgdt (%eax)
/* Offset For Kernel Data Segment (16 bits) */
- mov eax, 0x10
+ mov $0x10, %eax
/* Set the Data Segment Selectors */
- mov ds, ax
- mov es, ax
- mov fs, ax
- mov gs, ax
- mov ss, ax
+ mov %ax, %ds
+ mov %ax, %es
+ mov %ax, %fs
+ mov %ax, %gs
+ mov %ax, %ss
/* Set the Code Segment Selector */
- jmp 0x08:.flush
+ jmp $0x08, $.flush
.flush:
ret