You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
637 B

  1. #include "exception.h"
  2. #include "vga.h"
  3. // Need GCC > 6
  4. __attribute__((interrupt)) void print_handler(struct interrupt_frame *frame, ulong error_code)
  5. {
  6. printStringDetails("EXCEPTION", RED, BLACK, 0, VGA_HEIGHT - 1);
  7. printIntDetails(error_code, RED, BLACK, 11, VGA_HEIGHT - 1);
  8. (void)frame;
  9. (void)error_code;
  10. }
  11. __attribute__((interrupt)) void pagefault_handler(struct interrupt_frame *frame, ulong error_code){
  12. printStringDetails("PAGE FAULT", RED, BLACK, 0, VGA_HEIGHT - 1);
  13. printIntDetails(error_code, RED, BLACK, 11, VGA_HEIGHT - 1);
  14. (void)frame;
  15. (void)error_code;
  16. }