I just spent an hour debugging a problem that cause my OS to lock up on programs calling the service interrupt. The cause of the problem? jmp $
I started by doing basic putchar('1'), putchar('2')... debugging. I eventually did an objdump. Bochs even *said* the last instruction was JMP $. It told me which routine contains the bug and I still couldnt see it . The reason. I indent my assembly code:
Code: Select all
asm_function:
mov x, y
....
ret
Code: Select all
asm_function:
mov x, y
...
jmp $
[/rant]