diff --git a/kernel.c b/kernel.c index ece3c2b..e5f7668 100644 --- a/kernel.c +++ b/kernel.c @@ -14,5 +14,8 @@ void kinit() { void kmain() { kinit(); + __asm__("xchg bx, bx"); + __asm__("xor eax, eax"); + __asm__("div al"); for(;;); // the most amazing loop } diff --git a/tests.c b/tests.c index ac3e99a..99d3bae 100644 --- a/tests.c +++ b/tests.c @@ -3,13 +3,6 @@ #include "tests.h" #include "serial.h" -void divide_by_zero() { - // here we can test the divide by zero without gcc noticing - int x = 0; - int y = 5; - int z = y/x; -} - void test_serial_write() { char* serial1 = "0123456789abcdef0123456789abcdef"; serial_write(serial1, strlen(serial1)); @@ -24,6 +17,5 @@ void test_write() { void test_dispatcher() { clear_fb(); test_write(); - divide_by_zero(); test_write(); } diff --git a/tests.h b/tests.h index eda0d5d..a5389b5 100644 --- a/tests.h +++ b/tests.h @@ -1,6 +1,5 @@ #include "types.h" #include "stlio.h" -void divide_by_zero(); void test_write(); void test_dispatcher();