Write a divide error exception handler to replace the system supplied one. This handler should display a message “A divide error has occurred” and then replace the result with the dividend. You can use registers for the dividend and divisor of the div instruction. Test your divide error ISR by making the divisor zero. Also, experiment with the ISR code so that you see that the div instruction is restarted because divide error is considered a fault. For example, if your ISR does not change the value of the divisor (i.e., leave it as 0), your program will not terminate, as it repeatedly calls the divide error exception handler by restarting the divide instruction. After observing this behavior,
modify the ISR to change the divisor to a value other than 0 in order to proceed with
your test program.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here