summaryrefslogtreecommitdiff
path: root/src/utils.c
blob: bf1ff13e4391d002f1c5388bdbcd3af738fea05c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "utils.h"
#include "io.h"

void macaroni_panic(const char* msg) {
    // we'll do something with msg later.
    // while(true){ asm("nop\n\t"); }
    serial_puts(msg);
    asm("int $0x13");
}

void macaroni_assert(bool condition, const char* msg) {
    if (!condition) {
        macaroni_panic(msg);
    }
}