kmain no longer hangs on return

loader now has some instruction cookies to make debuggin easier
This commit is contained in:
shockrah 2019-11-09 18:19:22 -08:00
parent 0dfd0e9fe2
commit d56780dc0b
3 changed files with 3 additions and 5 deletions

View File

@ -112,7 +112,6 @@ void interrupt_handler(struct cpu_reg_state* cpu) {
if(cpu->int_no < 32) {
printf(err_msg[cpu->int_no]);
}
for(;;);
return;
}

View File

@ -27,11 +27,8 @@ void kprints(const char* s) {
printf(s);
}
// Should kmain return, we fall back to the loader which then just keeps in a hung state
void kmain() {
kinit();
//__asm__("xchg bx, bx");
//__asm__("xor eax, eax");
//__asm__("div al");
kprints("i guess we're good now?");
for(;;); // the most amazing loop
}

View File

@ -23,5 +23,7 @@ loader:
call kmain
.loop:
mov eax, 0xfeedbeef
jmp .loop
mov eax, 0xfeedbeef