home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / msdos / programm / 8142 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  2.1 KB

  1. Path: sparky!uunet!cs.utexas.edu!ut-emx!ccwf.cc.utexas.edu
  2. From: hughes@ccwf.cc.utexas.edu (paul)
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: Re: screen saver routines
  5. Message-ID: <76732@ut-emx.uucp>
  6. Date: 29 Jul 92 05:27:51 GMT
  7. References: <1992Jul25.064953.14956@news.ysu.edu> <1992Jul25.182513.2838@bronze.ucs.indiana.edu>
  8. Sender: news@ut-emx.uucp
  9. Organization: The University of Texas at Austin, Austin TX
  10. Lines: 27
  11.  
  12. In article <1992Jul25.182513.2838@bronze.ucs.indiana.edu> yawei@bronze.ucs.indiana.edu (Ya-Gui Wei ~{QG9p~}) writes:
  13. >>>   I'm planning on incorporating a screen saver into my program.
  14. >>>From what I gather, I'll need to hook onto 2 interrupts, 0x1C and
  15. >>>0x09.  My hook to interrupt 0x1C will increment a counter every
  16. >>>time it is called and if the counter is greater than a certain
  17. >>>amount of time, blank the screen.  My hook to interrupt 0x09 will
  18. >>>unblank the screen and clear the counter if the screen is already
  19. >>>blanked, otherwise it will just clear the counter.  Can someone
  20. >>>tell me if this will work or have any suggestions/improvements?
  21. >
  22. >  This is neccessary only if you are writing a TSR (memory resident
  23. >program) or want the screen saver to act as a TSR. If you are not
  24. >writing a TSR it is not neccessary (and not nice) to hook the 
  25. >interrupts. 
  26. This is not exactly true, either.  I have written a game that I felt inclined
  27. to add a screen saver to (just for fun), and I did so exactly as the original
  28. poster describes.  One main plus with that method (hooking interrupts) is that
  29. the Pause key will not prevent the program from calling the Checking routine
  30. that will determine if the program should blank the screen.  Among other things
  31. that can go wrong with this method, the program should be careful not to be
  32. doing any disk access or be in the middle of a particularly slow portion of
  33. code where the users isn't needed (or capable) of typing... maybe sorting or
  34. some other unwieldy task.  Since the application I wrote my saver into should
  35. never need to worry about that, it was a simple matter of stealing the int hook
  36. and patching it all together.
  37.  
  38. Jason
  39.