🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #492

Re: screen saver routines

#492
From: Scott C. Sadow
Date: Sat, 25 Jul 1992 19:27
36 lines
1875 bytes
In article <1992Jul22.161607.3668@magnus.acs.ohio-state.edu>, news@magnus.acs.ohio-state.edu 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?
>Thanks!
>
>-Sam-


Sounds good - I have written a TSR that uses that method (It is a very
common method)  Some comments though:

   1) You should use a flag to indicated that the screen is blanked. Then
check this flag in the 0x1C handler to see if there is anything to do. (If
blanked, just return...)

   2) Be aware that some nasty, unfriendly programs (like windoze) take
over the 0x09 interrupt so your program will not see any keystrokes. I
know this because I wrote a screen saver TSR that caused problems because
it didn't see any keyboard activity.

   3) If you are not writing the interrupt handlers in assembly, make sure
you do as little as possible. (Actually, even if you are writing them in
assembly) The timer tick and keyboard interrupt handlers can adversly
affect system response/performance.


   Scott C. Sadow
   scott@mycro.UUCP
   ...gatech!nanovx!mycro!scott
Technical Details
Message-ID: <1992Jul25.152706@mycro.UUCP>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!gatech!wa4mei!nanovx!mycro!scott
References: <1992Jul22.161607.3668@magnus.acs.ohio-state.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!gatech!wa4mei!nanovx!mycro!scott
From: scott@mycro.UUCP (Scott C. Sadow)
Newsgroups: comp.os.msdos.programmer
Subject: Re: screen saver routines
Message-ID: <1992Jul25.152706@mycro.UUCP>
Date: 25 Jul 92 19:27:06 GMT
References: <1992Jul22.161607.3668@magnus.acs.ohio-state.edu>
Lines: 36