🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #1286

Screen Saver (was Re: idling in the interpreter)

#1286
From: TrevorB
Date: Thu, 01 Mar 1990 19:39
40 lines
2536 bytes
pas@lcs.mit.edu (Paul A. Selkirk) writes:
>Does anyone know of a bulletproof way for a TSR to tell whether DOS (assume
>2.x or 3.x) is idling in the command interpreter, or executing a program?

not off hand...
 
>For the record, I am writing a screen-saver TSR that will only trigger when DOS
>is idling.  There are dozens of screen-savers, but I need one that won't kill
>a lengthy graphics program.  (Ever try generating the Mandelbrot set on a 4.77 
>MHz XT with no FPU?  I thought so.)

How about this, run the screen saver off of the timer interrupt.  If
the correct amount of time has passed, then change the pallette to all
black (if EGA or VGA) or do a memory copy of the screen and blank it 
(if < EGA).  While the screen is blank, the screen saver won't stop
any program that's currently running, but will latch on to the
keyboard or mouse interrupt.  And, of course, when the keyboard/mouse
interrupt is caught, you simply restore the screen by restoring the
palette (if >= EGA), or copy the screen back into video memory (if
< EGA).

This sounds like it might be a more elegant solution and you won't
have to worry about losing that Mandlebrot you've been generating for
the last xx hours...and probably just as important, it won't stop that
Mandlebrot while it's generating.  The only thing that could hurt this
is that if a program decides to modify the palette while the screen is
blanked.  I don't know EGA very well, but I bet there's probably a way
to intercept incoming commands to change the palette, and what you'd
do is intercept that and change what you've saved the palette as
appropiately.

TrevorB


-- 
 _____   _____   _____   _   _    ___    _____                       _____
(_   _) |  _  \ | ____) | | | |  / _ \  |  _  \      InterNet:      |  _  )
  | |   |  _  / | __)_  | |_| | ( (_) ) |  _  /  tbechtel@polyslo.  |  _ (
  |_|   |_| \_\ |_____)  \___/   \___/  |_| \_\     calpoly.edu     |_____)
Technical Details
Message-ID: <25ed7a61.29c1@polyslo.CalPoly.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!geac!torsqnt!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!mips!bridge2!jarthur!polyslo!tbechtel
References: <PAS.90Mar1120125@saffron.lcs.mit.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!geac!torsqnt!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!mips!bridge2!jarthur!polyslo!tbechtel
From: tbechtel@polyslo.CalPoly.EDU (TrevorB)
Newsgroups: alt.msdos.programmer,comp.sys.ibm.pc.programmer
Subject: Screen Saver (was Re: idling in the interpreter)
Message-ID: <25ed7a61.29c1@polyslo.CalPoly.EDU>
Date: 1 Mar 90 19:39:13 GMT
References: <PAS.90Mar1120125@saffron.lcs.mit.edu>
Reply-To: tbechtel@polyslo.CalPoly.EDU (TrevorB)
Organization: Cal Poly State University -- San Luis Obispo
Lines: 34