Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion loader.s
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
global loader

MAGIC_NUM equ 0x1badb002
FLAGS equ 0x0
CHKSUM equ -MAGIC_NUM
KERNEL_STACK_SIZE equ 16384

section .bss:
align 16
stack_bottom:
resb KERNEL_STACK_SIZE
stack_top:

section .text:
align 4
Expand All @@ -10,7 +18,7 @@ align 4
dd CHKSUM

loader:
mov eax, 0xdeadbeef

@sohnryang sohnryang Jul 30, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is for testing whether the bootloader worked, and 0xdeadbeef was just a joke. I think this line should be kept for now. 🙃

mov esp, stack_top

.loop:
jmp .loop