fix formatting

This commit is contained in:
rami 2024-06-27 14:49:11 -04:00
parent 2b1b7568b0
commit 7c3e9aa33c
2 changed files with 66 additions and 11 deletions

55
q Normal file
View File

@ -0,0 +1,55 @@
diff --git a/kernel/init.asm b/kernel/init.asm
index ee88f16..798f6c2 100644
--- a/kernel/init.asm
+++ b/kernel/init.asm
@@ -9,13 +9,13 @@ dd -(MAGIC + FLAGS)
section .text
global _start
_start:
- cli
+ cli

- ; Check if EAX contains this magic value that our bootloader should've set
- cmp eax, 0x2BADB002
- jne halt
+ ; Check if EAX contains this magic value that our bootloader should've set
+ cmp eax, 0x2BADB002
+ jne halt

- ; Load GDT
+ ; Load GDT
lgdt [gdtp]
; Offset to kernel data descriptor
mov ax, 0x10 
@@ -24,19 +24,19 @@ _start:
mov fs, ax
mov gs, ax
mov ss, ax
- ; Offset to kernel code descriptor
+ ; Offset to kernel code descriptor
jmp 0x8:.use_code_seg
.use_code_seg:
mov esp, stack_bottom
mov ebp, esp
push ebx 
- and esp, 0xfffffff0
+ and esp, 0xfffffff0
extern kernel
call kernel
- cli
+ cli
halt:
- hlt
- jmp halt
+ hlt
+ jmp halt

section .data
; GDT for a flat memory layout
@@ -68,5 +68,5 @@ gdtp:
section .bss
align 16
stack_top:
- resb 16384
+ resb 16384
stack_bottom: