aboutsummaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorNic Gaffney <gaffney_nic@protonmail.com>2023-12-21 03:32:06 -0600
committerNic Gaffney <gaffney_nic@protonmail.com>2023-12-21 03:32:06 -0600
commit138424b31d9c2af158e8ae619248b035b5a280d9 (patch)
tree0da4f6661d68737b5957029242bea43fad77d7a8 /src/boot
parent9dbc5231dd738d97eea13f8ecf9005e5b78ea0d3 (diff)
downloadgftos-138424b31d9c2af158e8ae619248b035b5a280d9.tar.gz
set up bochs for debugging and started working on interrupts.
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/boot.s14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/boot/boot.s b/src/boot/boot.s
index aba32ff..22d32f3 100644
--- a/src/boot/boot.s
+++ b/src/boot/boot.s
@@ -19,10 +19,17 @@ resb 16384
stack_top:
section .text
+
global gdtr
gdtr:
dw 0
dd 0
+
+global idtr
+idtr:
+ dw 0
+ dd 0
+
global _start:function (_start.end - _start)
_start:
mov esp, stack_top
@@ -37,10 +44,17 @@ _start:
call reloadSegments
+ extern get_idtr
+ call get_idtr
+ lidt [idtr]
+
[bits 32]
extern kernel_main
call kernel_main
+ ; BOCHS
+ xchg bx, bx
+
cli
.hang: hlt