summaryrefslogtreecommitdiff
path: root/boot.asm
diff options
context:
space:
mode:
Diffstat (limited to 'boot.asm')
-rw-r--r--boot.asm29
1 files changed, 29 insertions, 0 deletions
diff --git a/boot.asm b/boot.asm
new file mode 100644
index 0000000..1627135
--- /dev/null
+++ b/boot.asm
@@ -0,0 +1,29 @@
+MBALIGN equ 1 << 0
+MEMINFO equ 1 << 1
+FLAGS equ MBALIGN | MEMINFO
+MAGIC equ 0x1BADB002
+CHECKSUM equ -(MAGIC + FLAGS)
+
+section .multiboot
+align 4
+ dd MAGIC
+ dd FLAGS
+ dd CHECKSUM
+
+section .bss
+align 16
+stack_bottom:
+resb 16384
+stack_top:
+
+section .text
+global _start:function (_start.end - _start)
+_start:
+ mov esp, stack_top
+ extern kernel
+ call kernel
+ cli
+
+jmp $
+
+.end: