aboutsummaryrefslogtreecommitdiff
path: root/include/01.pocetak
diff options
context:
space:
mode:
Diffstat (limited to 'include/01.pocetak')
-rw-r--r--include/01.pocetak/boot00.s5
-rw-r--r--include/01.pocetak/boot01.s5
-rw-r--r--include/01.pocetak/boot02.s5
-rw-r--r--include/01.pocetak/boot03.s11
4 files changed, 26 insertions, 0 deletions
diff --git a/include/01.pocetak/boot00.s b/include/01.pocetak/boot00.s
new file mode 100644
index 0000000..0e1bfbe
--- /dev/null
+++ b/include/01.pocetak/boot00.s
@@ -0,0 +1,5 @@
+.set ALIGN, 1<<0
+.set MEMINFO, 1<<1
+.set FLAGS, ALIGN | MEMINFO
+.set MAGIC, 0x1BADB002
+.set CHECKSUM, -(MAGIC + FLAGS)
diff --git a/include/01.pocetak/boot01.s b/include/01.pocetak/boot01.s
new file mode 100644
index 0000000..cd7b353
--- /dev/null
+++ b/include/01.pocetak/boot01.s
@@ -0,0 +1,5 @@
+.section .multiboot
+.align 4
+.long MAGIC
+.long FLAGS
+.long CHECKSUM
diff --git a/include/01.pocetak/boot02.s b/include/01.pocetak/boot02.s
new file mode 100644
index 0000000..a9280a6
--- /dev/null
+++ b/include/01.pocetak/boot02.s
@@ -0,0 +1,5 @@
+.section .bss
+.align 16
+stack_bottom:
+.skip 16384
+stack_top:
diff --git a/include/01.pocetak/boot03.s b/include/01.pocetak/boot03.s
new file mode 100644
index 0000000..46a4e7f
--- /dev/null
+++ b/include/01.pocetak/boot03.s
@@ -0,0 +1,11 @@
+.section .text
+.global _start
+.type _start, @function
+_start:
+ mov $stack_top, %esp
+ call kernel_main
+ cli
+1: hlt
+ jmp 1b
+
+.size _start, . - _start