INF: Idle Interrupt (INT 28h) Under Windows 3.0

ID Number: Q75536

3.00

WINDOWS

Summary:

DOS TSR (terminate-and-stay-resident) programs that rely on the DOS

Idle interrupt (INT 28h) to receive a "time-slice" under Windows

version 3.0 may not function consistently.

More Information:

The DOS Idle interrupt (INT 28h), also known as the DOS Safe to Use

interrupt, is commonly used by TSRs to determine when it is safe to do

background processing. During this interrupt, it is known that it is

safe to use DOS file operations and other DOS (INT 21h) functions with

numbers greater than 0Ch.

However, if a TSR relies on INT 28h to give it a time-slice to carry

out background tasks, then the TSR will not perform consistently

because of the way that some applications process messages under

Windows.

For example, Write (a word processing application provided with

Windows) does not let the system go idle; it uses a PeekMessage()

loop. Because of this, the Windows KERNEL module never gets into its

idle loop to issue an INT 28h. Therefore, when Write is running in

Windows, no INT 28h interrupts will be issued. Note that Write will

idle when a menu is pulled down -- allowing a few Idle interrupts to

be generated.

Do not rely on INT 28h to perform background processing under Windows;

use some other mechanism to determine that the processor is idle. The

DOS Idle interrupt may be removed in a future version of Windows, and

therefore, should not be used if at all possible.