
Listing 3
***************

void _far your_error_handler(
   unsigned device_error, 
   unsigned dos_error, 
   unsigned _far *header
);

main()
        {
        /* Set up your handler as the handler */
        _harderr( your_error_handler);

        /* Remainder of your code */    
        }       

void _far your_error_handler(
   unsigned device_error,  /* Device error code */
   unsigned dos_error,     /* Dos error code */ 
   unsigned _far *header   /* This is the device header */
)
        {
        /* Test the device error and the dos error, as appropriate */
        
        /* Inside of your routine, you need to call one or more 
                of the following */             
        /* To retry */
            _hardresume( _HARDERR_RETRY );
        /* To abort */
            _hardresume( _HARDERR_ABORT );
        /* To ignore */
            _hardresume(_HARDERR_IGNORE);       
        /* To return to DOS (continue with program) */
            _hardretn( doserr );

        }

