lesson 23, step 3

This commit is contained in:
Carlos
2015-08-18 10:31:28 +02:00
parent 92ff191c3d
commit de3d442569
18 changed files with 124 additions and 127 deletions

View File

@@ -1,7 +1,7 @@
#ifndef ISR_H
#define ISR_H
#include "type.h"
#include <stdint.h>
/* ISRs reserved for CPU exceptions */
extern void isr0();
@@ -73,10 +73,10 @@ extern void irq15();
/* Struct which aggregates many registers */
typedef struct {
u32 ds; /* Data segment selector */
u32 edi, esi, ebp, esp, ebx, edx, ecx, eax; /* Pushed by pusha. */
u32 int_no, err_code; /* Interrupt number and error code (if applicable) */
u32 eip, cs, eflags, useresp, ss; /* Pushed by the processor automatically */
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;
void isr_install();
@@ -84,6 +84,6 @@ void isr_handler(registers_t r);
void irq_install();
typedef void (*isr_t)(registers_t);
void register_interrupt_handler(u8 n, isr_t handler);
void register_interrupt_handler(uint8_t n, isr_t handler);
#endif