Added interrupt handling
This commit is contained in:
@@ -1,16 +1,33 @@
|
||||
#include "inthandlers.hpp"
|
||||
|
||||
extern "C"
|
||||
char* display = (char*) 0xC00B8000;
|
||||
|
||||
__attribute__ ((interrupt))
|
||||
void divisionByZero(void* frame)
|
||||
{
|
||||
*display = 'z';
|
||||
display += 2;
|
||||
}
|
||||
|
||||
|
||||
__attribute__ ((interrupt))
|
||||
void gpFaultHandler(void* frame, unsigned int error)
|
||||
{
|
||||
|
||||
*display = 'a';
|
||||
asm("hlt");
|
||||
}
|
||||
|
||||
extern "C"
|
||||
__attribute__ ((interrupt))
|
||||
void pageFaultHandler(unsigned int error)
|
||||
void pageFaultHandler(void* frame, unsigned int error)
|
||||
{
|
||||
|
||||
*display = '0';
|
||||
//asm("hlt");
|
||||
}
|
||||
|
||||
__attribute__ ((interrupt))
|
||||
void doubleFaultHandler(void* frame, unsigned int error)
|
||||
{
|
||||
*display = '#';
|
||||
//asm("hlt");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user