summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorDennis Kobert <dennis@kobert.dev>2019-10-24 19:12:49 +0200
committernatrixaeria <upezu@student.kit.edu>2019-10-24 20:08:58 +0200
commit5b86e31087f6261dca28bb8c51a7a595998cc1d1 (patch)
tree134bbe6ffa380f89b4d80e0bd1e3980a996b4b2b /kernel
parent579d96f06f94a77363d467789ff95fcf5ed281b8 (diff)
Add error section and init stack
Diffstat (limited to 'kernel')
-rw-r--r--kernel/src/boot.asm16
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/src/boot.asm b/kernel/src/boot.asm
index 839457e..a10b14c 100644
--- a/kernel/src/boot.asm
+++ b/kernel/src/boot.asm
@@ -3,6 +3,22 @@ global start
section .text
bits 32
start:
+ mov esp, stack_top
+
; print 'OK'
mov dword [0xb8000], 0x2f4b2f4f
hlt
+
+; Prints 'ERR: ' and the given error code to the screen and halts
+; parameter: error code letter (ascii) in al
+error:
+ mov dword [0xb8000], 0x4f524f45
+ mov dword [0xb8004], 0x4f3a4f52
+ mov dword [0xb8008], 0x4f504f20
+ mov byte [0xb800a], al
+ hlt
+
+section .bss
+stack_bottom:
+ resb 64
+stack_top: