Newer
Older
honey-os / src / userland / crashTest / main.c
@biosfood biosfood on 16 Jan 2023 341 bytes add await syscall
#define ALLOC_MAIN

#include <hlib.h>
#include <stdint.h>

void testFunction() { printf("0/0 = %i\n", 0 / 0); }

int32_t main() {
    printf("trying to divide by zero whenever you press a key...\n");
    uint32_t ioManager = getService("ioManager");
    await(ioManager, getEvent(ioManager, "keyPress"));
    testFunction();
    return 0;
}