matos/core/exception_handler.c
2018-11-13 18:02:47 +01:00

20 lines
637 B
C

#include "exception.h"
#include "vga.h"
// Need GCC > 6
__attribute__((interrupt)) void print_handler(struct interrupt_frame *frame, ulong error_code)
{
printStringDetails("EXCEPTION", RED, BLACK, 0, VGA_HEIGHT - 1);
printIntDetails(error_code, RED, BLACK, 11, VGA_HEIGHT - 1);
(void)frame;
(void)error_code;
}
__attribute__((interrupt)) void pagefault_handler(struct interrupt_frame *frame, ulong error_code){
printStringDetails("PAGE FAULT", RED, BLACK, 0, VGA_HEIGHT - 1);
printIntDetails(error_code, RED, BLACK, 11, VGA_HEIGHT - 1);
(void)frame;
(void)error_code;
}