mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
22 lines
445 B
C++
22 lines
445 B
C++
#include "kutil/assert.h"
|
|
#include "console.h"
|
|
|
|
[[noreturn]] void
|
|
__kernel_assert(const char *file, unsigned line, const char *message)
|
|
{
|
|
console *cons = console::get();
|
|
if (cons) {
|
|
cons->set_color(9 , 0);
|
|
cons->puts("\n\n ERROR: ");
|
|
cons->puts(message);
|
|
cons->puts("\n ");
|
|
cons->puts(file);
|
|
cons->puts(":");
|
|
cons->put_dec(line);
|
|
cons->puts("\n");
|
|
}
|
|
|
|
while (1) __asm__ ("hlt");
|
|
__asm__ ( "int $0xe4" );
|
|
}
|