Moves Error to lists.

This commit is contained in:
Felix Queißner 2016-05-06 19:30:29 +02:00
parent 949e1f8e31
commit 29c4b6fc4c
4 changed files with 24 additions and 15 deletions

View file

@ -2,9 +2,7 @@
enum class Error
{
Success = 0,
OutOfMemory = 1,
UnhandledException = 2,
UnhandledInterrupt = 3,
DriverAlreadyInstalled = 4,
#define ERROR(num, ident, desc) ident = num,
#include "errors.lst"
#undef ERROR
};

View file

@ -0,0 +1,5 @@
ERROR(0, Success, Nothing went wrong. This should never encounter.)
ERROR(1, OutOfMemory, The system has run out of memory.)
ERROR(2, UnhandledException, An unhandled exception has occurred.)
ERROR(3, UnhandledInterrupt, An unhandled interrupt has occurred.)
ERROR(4, DriverAlreadyInstalled, A driver was already installed.)

View file

@ -1,16 +1,16 @@
IRQ(0, Timer, Programmable Interval Timer)
IRQ(1, PrimaryPS2, Erster PS/2 Port des Keyboard Controller (meist PS/2 Tastatur))
IRQ(2, SecondaryPIC, Verbindung zum zweiten PIC)
IRQ(1, PrimaryPS2, First PS/2 port / Keyboard Controller)
IRQ(2, SecondaryPIC, Connection to secondary PIC)
IRQ(3, RS232Even, RS-232 Port 2/4)
IRQ(4, RS232Odd, RS-232 Port 1/3)
IRQ(5, SecondaryLPT, LPT 2)
IRQ(6, Floppy, Floppy Disk Controller)
IRQ(7, PrimaryLPT, LPT 1 und Spurious Interrupt)
IRQ(7, PrimaryLPT, LPT 1 / Spurious Interrupt)
IRQ(8, RTC, RTC (CMOS Real Time Clock))
IRQ(9, Free, frei)
IRQ(10, FourthIDE, vierter ATA/ATAPI/(E)IDE)
IRQ(11, ThirdIDE, dritter ATA/ATAPI/(E)IDE)
IRQ(12, SecondaryPS2, Zweiter PS/2 Port des Keyboard Controller (meist PS/2 Maus))
IRQ(9, Free, Free)
IRQ(10, FourthIDE, Fourth ATA/ATAPI/(E)IDE)
IRQ(11, ThirdIDE, Third ATA/ATAPI/(E)IDE)
IRQ(12, SecondaryPS2, Second PS/2 Port / Mouse Controller)
IRQ(13, FPU, FPU)
IRQ(14, PrimaryIDE, Primärer ATA/ATAPI/(E)IDE)
IRQ(15, SecondaryIDE, Sekundärer ATA/ATAPI/(E)IDE und Spurious Interrupt)
IRQ(14, PrimaryIDE, Primary ATA/ATAPI/(E)IDE)
IRQ(15, SecondaryIDE, Secundary ATA/ATAPI/(E)IDE / Spurious Interrupt)

View file

@ -38,7 +38,13 @@ void BSOD::die(Error code, const char *msg, CpuState *cpu)
Console::main << FColor(Color::White) << BColor(Color::Red);
Console::main.clear();
Console::main
<< "OH MY GOD. DasOS crashed! But i can tell you: \n"
<< "OH MY GOD. DasOS crashed! But i can tell you: \n";
switch(code) {
#define ERROR(num, ident, desc) case Error::ident: Console::main << #desc << "\n"; break;
#include "errors.lst"
#undef ERROR
}
Console::main
<< msg << "\n"
<< "Also here is some CPU information:\n";