Date: Mon, 1 May 2000 16:15:32 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "Alexei A. Frounze" 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.