better panic

This commit is contained in:
2026-02-07 02:18:15 +01:00
parent b920c87bab
commit 458ba375f3
8 changed files with 36 additions and 16 deletions

View File

@@ -22,11 +22,13 @@ enum ErrorCodes
#define DEBUG(log, ...) fctprintf((void*)&skputc, 0, "debug: [%s]: " log "\r\n", __FILE__, ##__VA_ARGS__)
#define DIE_DEBUG(str) fctprintf((void*)&skputc, 0, str)
#define CHECK_BIT(var,pos) ((var) & (1<<(pos)))
// printf("debug: [%s]: " log "\n", __FILE__, ##__VA_ARGS__);
void panic(struct cpu_status_t* ctx);
void panic(struct cpu_status_t* ctx, const char* str);
void hcf();
#define assert(check) do { if(!(check)) hcf(); } while(0)