2025-06-17 02:40:02 +00:00
|
|
|
#ifndef INTERRUPTHANDLERS_H
|
|
|
|
|
#define INTERRUPTHANDLERS_H
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
2025-06-28 04:14:42 +00:00
|
|
|
extern void (*isr_ptrs[])(void);
|
|
|
|
|
|
|
|
|
|
//Struct is built "backwards" since it is pushed in this order.
|
2025-06-17 02:40:02 +00:00
|
|
|
typedef struct StateSnapshot_s {
|
2025-06-28 04:14:42 +00:00
|
|
|
uint32_t edi, esi, esp, ebx, edx, ecx, eax;
|
2025-06-17 02:40:02 +00:00
|
|
|
uint32_t interrupt_id, error_code;
|
|
|
|
|
uint32_t eip, cs, eflags;
|
|
|
|
|
} StateSnapshot_t;
|
|
|
|
|
|
|
|
|
|
void generic_isr_handler(StateSnapshot_t* cpu_state);
|
|
|
|
|
|
|
|
|
|
#endif
|