home *** CD-ROM | disk | FTP | other *** search
/ PC to Maximum / PC-na-maximum.bin / DriveSpeed / SRC / DRSP / HANDLERS.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-04  |  1007 b   |  44 lines

  1. /*
  2.  *  DRSP - DriveSpeed, version 3.10 (GPL FREEWARE)
  3.  *  Copyleft (l) Stanislav Sokolov, May 1998 and onwards.
  4.  *
  5.  *  This program is subject to GNU General Public License ver. 2 of June 1991
  6.  *  and any later version.
  7.  *
  8.  *  You may use this source with your programs, provided
  9.  *  due credits are given.
  10.  *
  11.  *  Contact the author by e-mail: stanislavs@hotmail.com
  12.  *
  13.  *  Internet:  http://members.tripod.com/~stanislavs/prog/prog.htm
  14.  */
  15.  
  16. #include "D:\TC\MY\DRSP\DRSP.H"
  17.  
  18.  
  19. //A do-nothing replacement for a Ctrl-Break interrupt handler.
  20. void interrupt Brk(void){
  21.     return;
  22. }
  23.  
  24. #pragma warn -par
  25. //A fatal error handler which replaces the standard "Drive not found. Abort, Retry, Fail?"
  26. int FatalHandler(int errval, int ax, int bp, int si){
  27.     int di_;
  28.  
  29.     asm mov di_, DI;
  30.     HError = di_ & 0x00FF;
  31.  
  32.     hardresume(IGNORE);
  33.  
  34.     return ABORT;
  35. }
  36.  
  37. //A routine that handles floating point errors.
  38. void Trap(int sType){
  39.     fError = True;
  40.     signal(SIGFPE, Trap);
  41. }
  42.  
  43. #pragma warn +par
  44.