-void isr0 (isr_param* param) {
- tty_clear();
- printf("[PANIC] Exception (%d) CS=0x%X, EIP=0x%X", param->vector, param->cs, param->eip);
+void panic_msg(const char* msg) {
+ tty_set_theme(VGA_COLOR_WHITE, VGA_COLOR_RED);
+ tty_clear_line(10);
+ tty_clear_line(11);
+ tty_clear_line(12);
+ tty_set_cpos(0, 11);
+ printf(" %s", msg);
+}
+
+void panic (const char* msg, isr_param* param) {
+ char buf[1024];
+ sprintf(buf, "INT %u: (%x) [%p: %p] %s", param->vector, param->err_code, param->cs, param->eip, msg);
+ panic_msg(buf);
+ while(1);