home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / pascal / 7505 < prev    next >
Encoding:
Text File  |  1992-12-16  |  2.8 KB  |  65 lines

  1. Path: sparky!uunet!spool.mu.edu!uwm.edu!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!cismibm.univ-lyon1.fr!ppollet
  2. From: ppollet@cismibm.univ-lyon1.fr (Patrick POLLET)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: TVISION and Interrupts. Is it safe?
  5. Date: Wed, 16 Dec 1992 09:08:00 GMT
  6. Organization: INSA  CENTRE INFORMATIQUE DU 1er CYCLE
  7. Lines: 53
  8. Message-ID: <ppollet.72.724496880@cismibm.univ-lyon1.fr>
  9. References: <1992Dec14.210207.10760@vax.oxford.ac.uk>
  10. NNTP-Posting-Host: 134.214.232.25
  11.  
  12. In article <1992Dec14.210207.10760@vax.oxford.ac.uk> speedy@vax.oxford.ac.uk writes:
  13. >From: speedy@vax.oxford.ac.uk
  14. >Subject: TVISION and Interrupts. Is it safe?
  15. >Date: 14 Dec 92 21:02:07 GMT
  16.  
  17. >Interrupts and Turbo Vision
  18. >===========================
  19.  
  20. >Is this sort of thing safe. It certainly used to work in 
  21. >Turbo Pascal 6 - but does not now seem to work in BP7. 
  22. It 
  23. >actually seems to work on a 486 but not on a 286 or 386 which 
  24. >makes me think that there must be some sort of re-entry. 
  25.  
  26. >In certain circumstances it seems to utterly lock up the 
  27. >computer (big red button time :-( ) Does turbo vision re-enable
  28. >interrupts? Or is it just not a safe thing to do with 
  29. >TVISION? 
  30.  
  31.  I do not have BP7 yet to test your program  but may I do some
  32. comments that may provide some hints ?
  33.  
  34.   I went though the code that is quite a nice implementation .
  35.  
  36. I am surprised by the following:
  37.   - you install you interrupt hook upon calling InitWaitBox,i.e. at program
  38. starting point  and uninstall it in the exit proc, i.e; at program 
  39. termination.What bothers me it that you interrupt handler is active even 
  40. when no wait box is on the screen ?? Grabbing the interrupt would be better 
  41. placed in  WaitOn function and releasing it in Waitoff... At least you could 
  42. be sure  during what program section your interrupt is active...
  43. That stack swapping that you do every 1/18th of a second ,even with no
  44. wait box active may bother some other parts of your program  ???
  45.   - also I spotted in the source ouple of places where  the CLI instruction
  46. is emmitted without a counterpart STI
  47.   (in the interrupt handler and in the WaitOn() function where a wait box
  48. is already active ?
  49.    -the CLI instruction in the interrupt handler may stop interrupts for
  50. too long. why not doing it only during stack swappings at entry point and
  51. at exit point ?
  52.  
  53. Hope it will helps ????
  54. ppollet@cismibm.univ-lyon1.fr (Patrick POLLET)
  55. --------------------------------------------------------
  56. Dr Patrick L.Pollet
  57. Institut National des Sciences Appliquées
  58. Centre Informatique du 1er Cycle  Bat 110
  59. 20 Avenue A.Einstein
  60. 69621 Villeurbanne Cedex France
  61. --------------------------------------------------------
  62. Phone: 72 43 83 80 -   la premiere erreur c'est
  63. Fax  : 72 43 85 33 -   de se lever le matin  ... GASTON
  64. -------------------------------------------------------
  65.