home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TP5FIX87.ZIP / ERRORTST.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-06-11  |  965 b   |  36 lines

  1. program TestTheErrorFix;
  2.  
  3. (*
  4.  
  5.   This simple program shows the TP floating point location
  6.   bug.  Note that the error address with the NDP present
  7.   is 0418:360e (which is not valid), and with the NDP
  8.   emulated is 0000:0066, which is the address of the FWAIT
  9.   instruction following the erroneous instruction.
  10.   The TP5FIX87 unit correctly reports the address when the
  11.   NDP is present.  In both cases, the error name is also
  12.   reported, and in both cases at least one address is correct.
  13.  
  14. 15:25:11.93 C:\pascal>set 87=
  15. 15:25:11.93 C:\pascal>errortst
  16.  Error 200 Division by zero at 0418:360e
  17.   loaded at 3259, 87 IP=00064
  18.   Runtime error 200 at 0418:360E.
  19. 15:25:15.11 C:\pascal>set 87=N
  20. 15:25:21.65 C:\pascal>errortst
  21.  Error 200 Division by zero at 0000:0066
  22.   loaded at 3259, 87 IP=dda70
  23.   Runtime error 200 at 0000:0066.
  24. *)
  25.  
  26.  
  27. {$E+}
  28.   uses TP5FIX87;
  29.  
  30.   var
  31.     x,y,z: double;
  32.   begin
  33.     x:=2;
  34.     y:=3;
  35.     z:=(x+1)/(y-3);
  36. end.