Date: Tue, 16 Oct 2001 11:17:01 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Lololorient cc: djgpp AT delorie DOT com Subject: Re: problem with time function under djgpp+allegro In-Reply-To: <9qgok8$aa4$1@wanadoo.fr> 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 Tue, 16 Oct 2001, Lololorient wrote: > I see in the documentation of interrupts > (thanks Ralf Brown) that it's possible to test the CF to see if there was an > error, but with __dpmi_int I didn't see anything to test the CF... must I do > some asm ? No asm needed. Here's how you check the carry in C: __dpmi_regs r; ... __dpmi_int (ivec, &r); if ((r.x.flags & 1) != 0) { /* CF is set, take the appropriate action */ In other words, the carry flag is the LSB of the `flags' member of the __dpmi_int structure.