about summary refs log tree commit diff stats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions
k.com> 2019-09-14 16:40:51 -0700 5656' href='/akkartik/mu/commit/kernel.soso/isr.h?h=hlt&id=67de9b02956419644f570f7e47ecd9940af024b3'>67de9b02 ^
46bb1d31 ^












1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36





















                   
                          












                                                                      
#ifndef ISR_H
#define ISR_H

#include "common.h"

#define IRQ0 32
#define IRQ1 33
#define IRQ2 34
#define IRQ3 35
#define IRQ4 36
#define IRQ5 37
#define IRQ6 38
#define IRQ7 39
#define IRQ8 40
#define IRQ9 41
#define IRQ10 42
#define IRQ11 43
#define IRQ12 44
#define IRQ13 45
#define IRQ14 46
#define IRQ15 47

typedef struct Registers {
    uint32 gs;
    uint32 fs;
    uint32 es;
    uint32 ds;
    uint32 edi, esi, ebp, esp, ebx, edx, ecx, eax; //pushed by pusha
    uint32 interruptNumber, errorCode;             //if applicable
    uint32 eip, cs, eflags, userEsp, ss;           //pushed by the CPU
} Registers;

typedef void (*IsrFunction)(Registers*);
void registerInterruptHandler(uint8 n, IsrFunction handler);

#endif //ISR_H