www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/16/05:21:41

Date: Tue, 16 Oct 2001 11:17:01 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Lololorient <laurent DOT augu AT wanadoo DOT fr>
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: <Pine.SUN.3.91.1011016111427.1994Q-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 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.

- Raw text -


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