#include #include #include #include "term.h" #include "panic.h" __attribute__((noreturn)) void _panic_impl(char* msg, int line, char* file, ...) { int_disable(); printf("BBBBBBBB\n"); va_list args; va_start(args, file); term_clear(); term_setpos(0, 0); term_setcol(0x0c); puts("!!!PANIC!!!\n"); term_setcol(0x0f); vprintf(msg, args); printf("\nin %s at line %d\n", file, line); while(1) { halt(); } }