20 lines
519 B
C
20 lines
519 B
C
#ifndef ISR_H
|
|
#define ISR_H
|
|
|
|
#include <stdint.h>
|
|
|
|
/* Struct which aggregates many registers */
|
|
typedef struct {
|
|
uint32_t ds; /* Data segment selector */
|
|
uint32_t edi,esi,ebp,esp,ebx,edx,ecx,eax; /* Pushed by pusha. */
|
|
uint32_t int_no,err_code; /* Interrupt number and error code (if applicable) */
|
|
uint32_t eip,cs,eflags,useresp,ss; /* Pushed by the processor automatically */
|
|
} registers_t;
|
|
|
|
typedef void (*isr_t)(registers_t*);
|
|
|
|
void isr_install();
|
|
void isr_register_handler(int n,isr_t handler);
|
|
|
|
#endif
|