MS-DOS provides default handlers for some exceptions, such as the divide-error exception (Interrupt 00h). A computer may also provide default exception handlers as part of its ROM BIOS routines.
A program can provide its own exception-handling routines by replacing the default handlers. For example, a debugging program can install its own handlers for the single-step exception (Interrupt 01h) and the breakpoint exception (Interrupt 03h). CPU capabilities determine what types of exceptions can occur while a program is running and what information is available about them.
A program that replaces an exception handler must restore it before terminating.