summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/crt0.S17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/crt0.S b/src/crt0.S
new file mode 100644
index 0000000..5116a7a
--- /dev/null
+++ b/src/crt0.S
@@ -0,0 +1,17 @@
+#define MAGIC 0x1BADB002
+#define FLAGS 0x7
+
+.section .multiboot
+ .align 4
+ .long MAGIC
+ .long FLAGS
+ .long -(MAGIC + FLAGS)
+
+.section .text
+.global _start
+
+_start:
+ push %ebx
+ push %eax
+ call main
+ hlt