Page 1 of 1
General Protection Fault Question
Posted: Mon Aug 26, 2002 7:08 pm
by beyondsociety
I was looking at Tom's link on how to use and enter v86 mode and it talks about the General Protection Fault. I know what that is. The Big Blue Screen of Death in Windows!.
How would I go about creating my own General Protection fault. I hate having to see my computer reboot because I didn't set up the Pmode entry right. I would like to have a screen pop up and display the errors.
Re:General Protection Fault Question
Posted: Mon Aug 26, 2002 8:44 pm
by beyondsociety
I was looking at the Art of Assembly Language Programming website for anything on General Protection Fault and I stubbled onto traps and exception handling. Could I use this as my GPL since it sort of acts like it but instead of a pretty screen it just displays a exception error in dos.
ex:
DOS invokes the critical error handler by executing an int 24h instruction whenever some sort of I/O error occurs. The default handler prints the familiar message:
I/O Device Specific Error Message
Abort, Retry, Ignore, Fail?
Re:General Protection Fault Question
Posted: Mon Aug 26, 2002 11:10 pm
by Warmaster199
The general protection fault occurs when you write to an area you weren't supposed to. You need to install an interrupt handler for interrupt 0x0D (I guess they made it 0D for "Oh dear"). It's not that hard to do, I have sucessfully implemented it in my OS, CTOS. And now, that interrupt handler for those "exceptions" is about to help me with debugging my code(somewhere I passed the wrong argument type). Be sure to display register information as well(I need to add this).