That's the problem I don't know what is wrong, I've spend time looking for information on it, if you don't want to fix it send me to place where they have a tutorial on how it should be done. I posted all of it as I'm sure I making an oversight somewhere (as it compiles without error).
Edit: Apparently I fixed it somehow as it no longer straight out crashes in bochs when dividing by 0 it just spams a lot of LOCK prefix unallowed so I'm guessing the wrong thing is being called - before bochs would just straight out crash which let me to think that the exception handling wasn't working, sorry I jumped to the wrong conclusion
Edit2: Found the issue (Why allows do you find it when you post for help!):
anyway here was wrong:
Code: Select all
mov %eax, %esp
push %eax
mov %eax, <function to handle exception>
call %eax
pop %eax
changing that to just:
Code: Select all
call <function to handle exception>
fixed it, now to figure out the keyboard XD
edit3: btw the reason I included the tutorial is because it doesn't compile for me with the source they give you "out the box" for me so maybe if someone had come across it before they could say that I shouldn't have even touched it or that just a couple of lines where wrong in the tutorial
