isr: replace terminal_writestring with printf
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
#include "../include/idt.h"
|
#include "../include/idt.h"
|
||||||
#include "../include/isr.h"
|
#include "../include/isr.h"
|
||||||
#include "../include/types.h"
|
#include "../include/types.h"
|
||||||
#include "../include/screen.h"
|
|
||||||
#include "../include/pic.h"
|
#include "../include/pic.h"
|
||||||
#include "../include/pit.h"
|
#include "../include/pit.h"
|
||||||
#include "../include/keyboard.h"
|
#include "../include/keyboard.h"
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
typedef size_t uword_t;
|
typedef size_t uword_t;
|
||||||
struct interrupt_frame
|
struct interrupt_frame
|
||||||
{
|
{
|
||||||
@@ -62,7 +63,7 @@ void isr_install() {
|
|||||||
|
|
||||||
|
|
||||||
idt_set(); // Load with ASM
|
idt_set(); // Load with ASM
|
||||||
terminal_writestring("isr_install done\n");
|
printf("isr_install done\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void default_handler()
|
void default_handler()
|
||||||
@@ -85,162 +86,162 @@ __attribute__((interrupt)) void isr_custom(struct interrupt_frame *frame)
|
|||||||
|
|
||||||
void isr0()
|
void isr0()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[0]);
|
printf(exception_messages[0]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr1()
|
void isr1()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[1]);
|
printf(exception_messages[1]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr2()
|
void isr2()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[2]);
|
printf(exception_messages[2]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr3()
|
void isr3()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[3]);
|
printf(exception_messages[3]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr4()
|
void isr4()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[4]);
|
printf(exception_messages[4]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr5()
|
void isr5()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[5]);
|
printf(exception_messages[5]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr6()
|
void isr6()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[6]);
|
printf(exception_messages[6]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr7()
|
void isr7()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[7]);
|
printf(exception_messages[7]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr8()
|
void isr8()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[8]);
|
printf(exception_messages[8]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr9()
|
void isr9()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[9]);
|
printf(exception_messages[9]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr10()
|
void isr10()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[10]);
|
printf(exception_messages[10]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr11()
|
void isr11()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[11]);
|
printf(exception_messages[11]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr12()
|
void isr12()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[12]);
|
printf(exception_messages[12]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr13()
|
void isr13()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[13]);
|
printf(exception_messages[13]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr14()
|
void isr14()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[14]);
|
printf(exception_messages[14]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr15()
|
void isr15()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[15]);
|
printf(exception_messages[15]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr16()
|
void isr16()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[16]);
|
printf(exception_messages[16]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr17()
|
void isr17()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[17]);
|
printf(exception_messages[17]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr18()
|
void isr18()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[18]);
|
printf(exception_messages[18]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr19()
|
void isr19()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[19]);
|
printf(exception_messages[19]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr20()
|
void isr20()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[20]);
|
printf(exception_messages[20]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr21()
|
void isr21()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[21]);
|
printf(exception_messages[21]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr22()
|
void isr22()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[22]);
|
printf(exception_messages[22]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr23()
|
void isr23()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[23]);
|
printf(exception_messages[23]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr24()
|
void isr24()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[24]);
|
printf(exception_messages[24]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr25()
|
void isr25()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[25]);
|
printf(exception_messages[25]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr26()
|
void isr26()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[26]);
|
printf(exception_messages[26]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr27()
|
void isr27()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[27]);
|
printf(exception_messages[27]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr28()
|
void isr28()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[28]);
|
printf(exception_messages[28]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr29()
|
void isr29()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[29]);
|
printf(exception_messages[29]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr30()
|
void isr30()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[30]);
|
printf(exception_messages[30]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
void isr31()
|
void isr31()
|
||||||
{
|
{
|
||||||
terminal_writestring(exception_messages[31]);
|
printf(exception_messages[31]);
|
||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user