Untitled_Kernel/src/interrupt_handlers.c
lordtet 8c51b7010e Interrupt Descriptors implemented
Now just need to populate the IDT, then debug the whole thing.
2025-06-16 22:40:02 -04:00

13 lines
585 B
C

#include "interrupt_handlers.h"
#include "kio.h"
void generic_isr_handler(StateSnapshot_t* cpu_state) {
//We made it to C for our interrupt! For now, let's just print our interrupt to the screen.
vga_clear();
vga_printf("INTERRUPT TRIGGERED! Info below.\n");
vga_printf("Int_ID|ERR: %X|%X\n", cpu_state->interrupt_id, cpu_state->error_code);
vga_printf("EFLAGS|CS|EIP: %X|%X|%X\n", cpu_state->eflags, cpu_state->cs,cpu_state->eip);
vga_printf("GP Registers:\neax:%X\nebx:%X\necx:%X\nedx:%X\nesp:%X\nesi:%X\nedi:%X\n");
vga_printf("HALT!");
while(1);
}