From bbd11b82b50fdd93dc88bf365dc64af27d476c7c Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Sat, 25 Mar 2023 17:23:07 +0100 Subject: [PATCH] cpu::trap: corrected kernel_mode detection --- cpu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu.cpp b/cpu.cpp index 0e3c721..00d2c76 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -1599,7 +1599,7 @@ void cpu::trap(uint16_t vector, const int new_ipl, const bool is_interrupt) try { processing_trap_depth++; - bool kernel_mode = psw >> 14; // TODO wrong? + bool kernel_mode = !(psw >> 14); if (processing_trap_depth >= 2) { DOLOG(debug, true, "Trap depth %d", processing_trap_depth);