aboutsummaryrefslogtreecommitdiff
path: root/src/core/int.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/int.S')
-rw-r--r--src/core/int.S22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/core/int.S b/src/core/int.S
index c8612dc..c552212 100644
--- a/src/core/int.S
+++ b/src/core/int.S
@@ -26,18 +26,29 @@
push %rbp
push %rsi
push %rdi
- mov %ds, %rax
+ xor %rax,%rax # Because I am picky
+ mov %gs, %rax
+ push %rax
+ mov %es, %rax
push %rax
- mov 56(%rsp), %rax # Restore %rax
+ mov %fs, %rax
+ push %rax
+ mov %ds, %rax
push %rax
mov $0x10, %ax
mov %ax, %ds
- pop %rax
+ mov 80(%rsp), %rax
.endm
.macro RESTORE_REGS
pop %rax
- mov %rax,%ds
+ mov %ax, %ds
+ pop %rax
+ mov %ax, %fs
+ pop %rax
+ mov %ax, %es
+ pop %rax
+ mov %ax, %gs
pop %rdi
pop %rsi
pop %rbp
@@ -77,6 +88,7 @@ INT_10:
.globl INT_14
INT_14:
+ pop %rsi
CALL_PRINTK $MSG_INT_14
INT_14_INFINITE:
jmp INT_14_INFINITE
@@ -113,7 +125,7 @@ MSG_INT_0:
MSG_INT_10:
.asciz "Invalid TSS!"
MSG_INT_14:
-.asciz "Page fault!"
+.asciz "Page fault: error %x !"
MSG_INT_KBD:
.asciz "Key press!"
MSG: