From 667f2df4cc9acdc82d102562bac5b074dc26dd36 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Tue, 23 Apr 2019 02:06:11 -0700 Subject: [PATCH] Fix the trap function. God fucking damn it 16 bit registers! --- kern/trapentry.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kern/trapentry.S b/kern/trapentry.S index 406033b..3e7a622 100644 --- a/kern/trapentry.S +++ b/kern/trapentry.S @@ -81,9 +81,11 @@ TRAPHANDLER(t_default, T_DEFAULT); .globl _alltraps _alltraps: sub $0x2, %esp - push %ds + mov %ds, %eax + push %ax sub $0x2, %esp - push %es + mov %es, %eax + push %ax pushal mov $(GD_KD), %eax movl %eax, %ds