summaryrefslogtreecommitdiff
path: root/kernel/src/long_mode_init.asm
diff options
context:
space:
mode:
authornatrixaeria <upezu@student.kit.edu>2019-10-25 04:04:58 +0200
committernatrixaeria <upezu@student.kit.edu>2019-10-25 04:04:58 +0200
commit93490e27ad5b924f191fbf15f09d79354e37ca73 (patch)
tree38677edf21e783b97ed72920807f2f5a1ec6497b /kernel/src/long_mode_init.asm
parentc8c64b5367f8b0f4db73d8963f7faff3c0cc4362 (diff)
parent92ad44ce3af9b000146d324e5c0f5dfce16927f9 (diff)
Merge branch 'master' of dennis:/var/repos/uff-os
Diffstat (limited to 'kernel/src/long_mode_init.asm')
-rw-r--r--kernel/src/long_mode_init.asm17
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/src/long_mode_init.asm b/kernel/src/long_mode_init.asm
new file mode 100644
index 0000000..f105388
--- /dev/null
+++ b/kernel/src/long_mode_init.asm
@@ -0,0 +1,17 @@
+global long_mode_start
+
+section .text
+bits 64
+long_mode_start:
+ ; load 0 into all data segment registers
+ mov ax, 0
+ mov ss, ax
+ mov ds, ax
+ mov es, ax
+ mov fs, ax
+ mov gs, ax
+
+ ; print `Uff!` to screen
+ mov rax, 0x8521846683668255
+ mov qword [0xb8000], rax
+ hlt