delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/25/06:01:01

From: Samir Barjoud <samir AT mindspring DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Windows trashes my 800x600 graphics mode program.
Date: 25 Apr 1999 05:16:03 -0400
Organization: MindSpring Enterprises
Lines: 44
Sender: samir AT MOO
Message-ID: <wkwvz1t60c.fsf@mindspring.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990425115605 DOT 9117a-100000 AT is>
NNTP-Posting-Host: d1.56.b8.48
X-Server-Date: 25 Apr 1999 09:14:57 GMT
X-Newsreader: Gnus v5.5/Emacs 20.3
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> writes:

> On Thu, 22 Apr 1999, Kevin Hise wrote:
> 
> > Isn't there an interrupt listed in Ralf Brown's list that allows a DOS
> > app to detect when Windows has switched it away?
> 
> That's the catch: there isn't any (at least AFAIK).  If anybody knows
> how to achieve this, I'd certainly like to add that to the FAQ.

.................................................................
Interrupt 2Fh Function 4001h 

mov ax, 4001h   ; Notify Background Switch
int 2fh

Notify Background Switch notifies a VM application that it is being
switched to the background. The VM application can carry out any
actions, but should do so within 1000ms. This is the amount of time
the system waits before switching the application.  This function has
no parameters.  This function has no return value.
After switching to the background, the application continues to run
unless it attempts to access video memory. If the video adapter is in
a video mode that the virtual display device (VDD) does not support in
the background, the VDD freezes the application until the application
can be switched back to the foreground.
======================================================================
Interrupt 2Fh Function 4002h 

mov ax, 4002h       ; Notify Foreground Switch
int 2fh

Notify Foreground Switch notifies a VM application that it has been
switched to the foreground and can now access the video memory and
registers without being frozen.  The virtual-display device (VDD)
calls this function.  This function has no parameters.  This function
has no return value.  Under certain error conditions, the VDD may call
this function without calling a corresponding Notify Background Switch
(Interrupt 2Fh Function 4001h).
======================================================================

-- 
Samir Barjoud
samir AT mindspring DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019