diff --git a/bochsrc.conf b/bochsrc.conf index 61621b0..b8ca884 100644 --- a/bochsrc.conf +++ b/bochsrc.conf @@ -1,5 +1,5 @@ megs: 32 -display_library: x +display_library: x, options="gui_debug" romimage: file=/usr/share/bochs/BIOS-bochs-latest vgaromimage: file=/usr/share/bochs/VGABIOS-lgpl-latest ata0-master: type=cdrom, path=os.iso, status=inserted @@ -8,4 +8,4 @@ log: bochslog.txt clock: sync=realtime, time0=local cpu: count=1, ips=1000000 com1: enabled=1, mode=file, dev=COM1.out -display_library: x, options="gui_debug" +magic_break: enabled=1 diff --git a/interrupts.c b/interrupts.c index 813cbaf..7f8914f 100644 --- a/interrupts.c +++ b/interrupts.c @@ -94,7 +94,8 @@ void interrupt_handler(struct cpu_reg_state* cpu) { if(cpu->int_no < 32) { printf(err_msg[cpu->int_no]); } - serial_pic_ack(cpu->int_no); + for(;;); + //serial_pic_ack(cpu->int_no); return; } diff --git a/kernel.c b/kernel.c index ece3c2b..4621e21 100644 --- a/kernel.c +++ b/kernel.c @@ -6,7 +6,7 @@ #include "gdt.h" void kinit() { - gdt_configure(); + //gdt_configure(); init_idt(); test_dispatcher(); } @@ -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 fa08f9d..99d3bae 100644 --- a/tests.c +++ b/tests.c @@ -3,12 +3,6 @@ #include "tests.h" #include "serial.h" -void divide_by_zero() { - // here we can test the divide by zero without gcc noticing - __asm__("mov eax, 0"); - __asm__("div al"); -} - void test_serial_write() { char* serial1 = "0123456789abcdef0123456789abcdef"; serial_write(serial1, strlen(serial1)); @@ -23,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();