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