www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/01/07:54:10

Date: Mon, 1 May 2000 16:15:32 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Alexei A. Frounze" <alex DOT fru AT mtu-net DOT ru>
cc: djgpp AT delorie DOT com
Subject: Re: 3rd Try: Maybe an asm problem? (Problems linking)
In-Reply-To: <390D67E4.C48A1A4F@mtu-net.ru>
Message-ID: <Pine.SUN.3.91.1000501161102.11049A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 1 May 2000, Alexei A. Frounze wrote:

> > Actually, most of them do, especially if they use RHIDE, Emacs, Less,
> > Info, and other programs.  2Fh/1680h is the function called by the
> > library function __dpmi_yield; most interactive programs call that
> > function inside their idle loop (or if they don't, they should).
> 
> But what for? DOS is not a multitasking OS. Windows does all the task/thread
> switches itself. So what is it needed for?

__dpmi_yield is not for task switching, it's for releasing the current 
time slice allotted by Windows (or any other multi-tasking scheduler).

When an interactive program waits for the user to type something and has 
nothing else to do, it generally should call __dpmi_yield to relinquish 
the CPU to other programs that might be waiting for the CPU.  Without 
this call, Windows will not preempt the CPU before its time slice 
expires, and the system might behave is if it is very busy, even though 
the program just waits for input.

- Raw text -


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