ISR not catching divide by 0 error*FIXED*
Re: ISR not catching divide by 0 error
Unfortunately I tried that and still no luck.
Re: ISR not catching divide by 0 error
Okay, time for debugging 101 instead of the continuous shots in the dark. Put a halt before the divide by zero. Also, dump the value of &idt to output or a register beforehand.
Once it halts, get the the value for idtr in the graphical debugger (Options > Show System Registers). The value in the parentheses indicates the limit. The value outside the parentheses indicates the virtual address.
What is the value of &idt? Is it exactly the same as the value in idtr? And does the limit in the parentheses equal 8*256-1?
Once it halts, get the the value for idtr in the graphical debugger (Options > Show System Registers). The value in the parentheses indicates the limit. The value outside the parentheses indicates the virtual address.
What is the value of &idt? Is it exactly the same as the value in idtr? And does the limit in the parentheses equal 8*256-1?
"Sufficiently advanced stupidity is indistinguishable from malice."
Re: ISR not catching divide by 0 error
Guys thanks for your advice I fixed the bug. My friend suggested I ditch D and rewrite it in C. I did and gcc gave me a funny warning. Trying to cast a long to an int.*duh* Bochs wasnt receiving my idt starting address correctly because it was being cast down. Thanks for all your tips.