Article View: alt.msdos.programmer
Article #1293Re: idling in the interpreter
From: D'Arcy J.M. Cain
Date: Fri, 02 Mar 1990 16:52
Date: Fri, 02 Mar 1990 16:52
39 lines
2250 bytes
2250 bytes
In article <PAS.90Mar1120125@saffron.lcs.mit.edu> 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?
>
>I have determined, through much pain and disassembly, that DOS uses service
>0A (buffered string input) to get the next command, but other programs use that
>as well. I can get by on this knowledge, but I would prefer something a little
>more certain.
>
>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.)
>
>Any leads will be duly appreciated.
>
> paul
How about a way of turning screen saver on and off instead. You can have
an interupt which turns screen saver on and off then write a utility which
calls the interupt which you can run before your program. You can also
have a keyboard hook to turn it on and off asynchronous to the system state.
In cases where you have access to source code you can turn off the saver
within a program just for the parts where this is important. I'd suggest
something like the following
AH = 0 Turns off screen saver
AH = 1 Turns on screen saver
AH = FF Returns 1234H or something unique to determine presence.
I would have it also return the current active state so that programs
could restore the system when necessary.
--
D'Arcy J.M. Cain (darcy@druid) | Thank goodness we don't get all
D'Arcy Cain Consulting | the government we pay for.
West Hill, Ontario, Canada |
(416) 281-6094 |
Technical Details
Message-ID:
<1990Mar2.165200.28296@druid.uucp>Path:
arc1-ca.pugleaf.net!utzoo!attcan!telly!druid!darcyReferences:
<PAS.90Mar1120125@saffron.lcs.mit.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!telly!druid!darcy From: darcy@druid.uucp (D'Arcy J.M. Cain) Newsgroups: alt.msdos.programmer,comp.sys.ibm.pc.programmer Subject: Re: idling in the interpreter Message-ID: <1990Mar2.165200.28296@druid.uucp> Date: 2 Mar 90 16:52:00 GMT References: <PAS.90Mar1120125@saffron.lcs.mit.edu> Reply-To: darcy@druid.UUCP (D'Arcy J.M. Cain) Organization: D'Arcy Cain Consulting, West Hill, Ontario Lines: 39