Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I've recently been workin on my OS's error handling, and have come to find that the ISR error handling is not working. My error handler is not getting called at all, even if I do strange things like
1. the first test code would corrupt things, but the damage may be random, and may not be instantaneous.
2. review the code generated, 99.2% chance your second test code get optimized.
3. general debug skill applies
4. use the emulator's debug facility
2. review the code generated, 99.2% chance your second test code get optimized.
Actually, optimisations turn the function into a single ret opcode, as none of the results you try to make are ever read.
But looking at the disassembly is the only way to check that you're actually creating the circumstances to trigger the division by zero exception. Since you didn't explicitly write the exception throwing code in assembly, any and all code snippets posted here might not yield the result you want.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]