Jump to content
  • Advertisement
Sign in to follow this  
afarnen

Interrupt Handling

This topic is 3878 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In x86 assembly, how do you handle interrupts called by the CPU? Same principles of a try...catch statement in C. For instance, how would I catch the int 0h (divide by zero) thrown by the CPU?

Share this post


Link to post
Share on other sites
Advertisement
I'm writing an OS (kernel) in x86 Assembly Language. I'm not writing for another OS, and I'm not writing in C.

Share this post


Link to post
Share on other sites
http://www.osdev.org is a better site for OS development.

Integer divide by zero causes the CPU to execute interrupt vector 0 which you would define to do whatever it is you wanted. Implementing some sort of stack unwinding similiar to SEH is very non-trivial.

Share this post


Link to post
Share on other sites
If you haven't already, then you need to become familiar with the Intel manuals, particularly volume 3.

They're available as PDFs for searching, and Intel will send you them in hard copy (several nicely bound books) internationally, for free (no shipping costs, either).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!