home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / msdos / programm / 8082 < prev    next >
Encoding:
Text File  |  1992-07-25  |  1.8 KB  |  40 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!darwin.sura.net!wupost!usc!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!bronze!yawei
  3. From: yawei@bronze.ucs.indiana.edu (Ya-Gui Wei ~{QG9p~})
  4. Subject: Re: screen saver routines
  5. Message-ID: <1992Jul25.182513.2838@bronze.ucs.indiana.edu>
  6. Organization: Indiana University
  7. References: <1992Jul25.064953.14956@news.ysu.edu>
  8. Date: Sat, 25 Jul 92 18:25:13 GMT
  9. Lines: 29
  10.  
  11. >>   I'm planning on incorporating a screen saver into my program.
  12. >>From what I gather, I'll need to hook onto 2 interrupts, 0x1C and
  13. >>0x09.  My hook to interrupt 0x1C will increment a counter every
  14. >>time it is called and if the counter is greater than a certain
  15. >>amount of time, blank the screen.  My hook to interrupt 0x09 will
  16. >>unblank the screen and clear the counter if the screen is already
  17. >>blanked, otherwise it will just clear the counter.  Can someone
  18. >>tell me if this will work or have any suggestions/improvements?
  19.  
  20.   This is neccessary only if you are writing a TSR (memory resident
  21. program) or want the screen saver to act as a TSR. If you are not
  22. writing a TSR it is not neccessary (and not nice) to hook the 
  23. interrupts. 
  24.  
  25.   Instead, write a routine in your program that gets called 
  26. periodically (e.g., a keyboard input routine.) Inside this
  27. routine, keep a counter of some sort, and clear the screen when
  28. the counter exceeded a certain value. After that you just wait
  29. for a keystroke then restore the screen. If precise timeing is
  30. required you can use the neccessary function calls in the language
  31. to determine the time before clearing the screen.
  32.  
  33.   Note that it is not a good idea for a screen saver routine to
  34. completely blank the screen. A better idea is to write a message
  35. on screen indicating what happened, and rewrite this message on
  36. different locations periodically.
  37.  
  38.   Ya-Gui Wei
  39.  
  40.