home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / intel / 2166 < prev    next >
Encoding:
Text File  |  1992-11-07  |  1.5 KB  |  58 lines

  1. Newsgroups: comp.sys.intel
  2. Path: sparky!uunet!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!Germany.EU.net!news.netmbx.de!mailgzrz.TU-Berlin.DE!math.fu-berlin.de!Sirius.dfn.de!solaris.rz.tu-clausthal.de!news!alhena.itp.uni-hannover.de!korte
  3. From: korte@alhena.itp.uni-hannover.de (Gerd Kortemeyer)
  4. Subject: 387 exceptions - when are they raised?
  5. Message-ID: <1992Nov6.090312.2101@newsserver.rrzn.uni-hannover.de>
  6. Keywords: 387, exceptions
  7. Sender: news@newsserver.rrzn.uni-hannover.de (News Service)
  8. Organization: Institut fuer Theoretische Physik, Uni Hannover
  9. Date: Fri, 6 Nov 1992 09:03:12 GMT
  10. Lines: 46
  11.  
  12. Hi.
  13.  
  14. In the Intel '387DX Programmer's reference' you will read that
  15. 387 exceptions are raised when the NEXT copro-instruction comes. Well,
  16. okay, then this program (written in TP6.0) should work:
  17.  
  18. asm
  19.    fdivp
  20. end;
  21. writeln('Still alive!');
  22. asm
  23.    fwait
  24. end;
  25.  
  26. After being blown up by the emulator it looks like this:
  27.  
  28.      wait
  29.      fdivp
  30.      call ....
  31.      fwait
  32.  
  33. Now 'fdivp' divides by zero and divide-by-zero is unmasked: Still the
  34. program should (according to the manual) write 'Still alive' onto the
  35. screen and raise the exception when it comes to the fwait (there are
  36. NO copro-instructions inside the WRITELN-subroutine).
  37.  
  38. Well, it doesn't.
  39.  
  40. When using the debugger you see the exception is raised right while
  41. executing the fdivp, but this might be a 'Heisenberg effect' (things
  42. change when you measure them ...)
  43.  
  44. Strange: This program works
  45.  
  46.     fdivp
  47.     fnclex
  48.     call ...
  49.     fwait
  50.  
  51. Any ideas?
  52.  
  53. Gerd Kortemeyer
  54.  
  55.  
  56.  
  57.  
  58.