From 33c9e5c1e46a183726d00a2811b407dc74abf7a4 Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Wed, 1 Nov 2017 06:29:53 +0000 Subject: [PATCH] Try to get registers --- Makefile | 2 +- src/isr.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index baefedd..429470a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ run: all - qemu-system-i386 -kernel src/kernel + qemu-system-i386 -kernel src/kernel -d guest_errors all: make all -C src diff --git a/src/isr.c b/src/isr.c index 224460c..022529d 100644 --- a/src/isr.c +++ b/src/isr.c @@ -1,5 +1,13 @@ #include "logger.h" +struct IsrRegisters { + unsigned int ds; // Data segment selector + unsigned int edi, esi, ebp, esp, ebx, edx, ecx, eax; // Pushed by pusha. + unsigned int int_no, err_code; // Interrupt number and error code (if applicable) + unsigned int eip, cs, eflags, useresp, ss; // Pushed by the processor automatically. +}; + +// void isr(struct IsrRegisters regs) void isr() { logger_warn("ISR.");