56 lines
1.5 KiB
Plaintext
56 lines
1.5 KiB
Plaintext
|
[1mdiff --git a/kernel/init.asm b/kernel/init.asm[m
|
|||
|
[1mindex ee88f16..798f6c2 100644[m
|
|||
|
[1m--- a/kernel/init.asm[m
|
|||
|
[1m+++ b/kernel/init.asm[m
|
|||
|
[36m@@ -9,13 +9,13 @@[m [mdd -(MAGIC + FLAGS)[m
|
|||
|
section .text[m
|
|||
|
global _start[m
|
|||
|
_start:[m
|
|||
|
[31m- cli[m
|
|||
|
[32m+[m[32m cli[m
|
|||
|
[m
|
|||
|
[31m- ; Check if EAX contains this magic value that our bootloader should've set[m
|
|||
|
[31m- cmp eax, 0x2BADB002[m
|
|||
|
[31m- jne halt[m
|
|||
|
[32m+[m[32m ; Check if EAX contains this magic value that our bootloader should've set[m
|
|||
|
[32m+[m[32m cmp eax, 0x2BADB002[m
|
|||
|
[32m+[m[32m jne halt[m
|
|||
|
[m
|
|||
|
[31m- ; Load GDT[m
|
|||
|
[32m+[m[32m ; Load GDT[m
|
|||
|
lgdt [gdtp][m
|
|||
|
; Offset to kernel data descriptor[m
|
|||
|
mov ax, 0x10 [m
|
|||
|
[36m@@ -24,19 +24,19 @@[m [m_start:[m
|
|||
|
mov fs, ax[m
|
|||
|
mov gs, ax[m
|
|||
|
mov ss, ax[m
|
|||
|
[31m- ; Offset to kernel code descriptor[m
|
|||
|
[32m+[m[32m ; Offset to kernel code descriptor[m
|
|||
|
jmp 0x8:.use_code_seg[m
|
|||
|
.use_code_seg:[m
|
|||
|
mov esp, stack_bottom[m
|
|||
|
mov ebp, esp[m
|
|||
|
push ebx [m
|
|||
|
[31m- and esp, 0xfffffff0[m
|
|||
|
[32m+[m[32m and esp, 0xfffffff0[m
|
|||
|
extern kernel[m
|
|||
|
call kernel[m
|
|||
|
[31m- cli[m
|
|||
|
[32m+[m[32m cli[m
|
|||
|
halt:[m
|
|||
|
[31m- hlt[m
|
|||
|
[31m- jmp halt[m
|
|||
|
[32m+[m[32m hlt[m
|
|||
|
[32m+[m[32m jmp halt[m
|
|||
|
[m
|
|||
|
section .data[m
|
|||
|
; GDT for a flat memory layout[m
|
|||
|
[36m@@ -68,5 +68,5 @@[m [mgdtp:[m
|
|||
|
section .bss[m
|
|||
|
align 16[m
|
|||
|
stack_top:[m
|
|||
|
[31m- resb 16384[m
|
|||
|
[32m+[m[32m resb 16384[m
|
|||
|
stack_bottom:[m
|