Date: Sun, 26 May 2002 08:30:57 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Mario Feldberg cc: djgpp AT delorie DOT com Subject: Re: [bug] delay() doesn't work under WinXP In-Reply-To: <3cefc418_2@news.arcor-ip.de> 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 Sat, 25 May 2002, Mario Feldberg wrote: > The delay() function (from dos.h) doesn't seem > to work under WinXP. There's no delay. Thanks for the report. Could you please investigate this a little more? The full source of the DJGPP implementation of `delay' is attached below; could you please paste this code into your program, and then add some print-outs inside the loop to help use understand what goes wrong with that code? TIA /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #include #include void delay(unsigned msec) { __dpmi_regs r; while (msec) { unsigned usec; unsigned msec_this = msec; if (msec_this > 4000) msec_this = 4000; usec = msec_this * 1000; r.h.ah = 0x86; r.x.cx = usec>>16; r.x.dx = usec & 0xffff; __dpmi_int(0x15, &r); msec -= msec_this; } }