summaryrefslogtreecommitdiff
path: root/boot.asm
diff options
context:
space:
mode:
authorElizabeth Alexander Hunt <me@liz.coffee>2026-09-28 21:08:07 -0700
committerElizabeth Alexander Hunt <me@liz.coffee>2026-09-28 21:08:07 -0700
commitf2899b62b997aafc25666f21ea3a754030a8de71 (patch)
tree9503136c7639d8478ff90977870f99046a4524f8 /boot.asm
downloadhelloOS-f2899b62b997aafc25666f21ea3a754030a8de71.tar.gz
helloOS-f2899b62b997aafc25666f21ea3a754030a8de71.zip
Upload from https://github.com/TheHuddle/pr-practice/pull/10/changesHEADmain
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: