www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/11/15:44:13

Message-ID: <36C33CA8.183C3237@ameritech.net>
From: John Scott Kjellman <jkjellman AT ameritech DOT net>
X-Mailer: Mozilla 4.04 [en] (WinNT; I)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How to check the carry flag?
References: <79nj9q$41pu$1 AT news-inn DOT inet DOT tele DOT dk> <199902090004 DOT TAA15310 AT envy DOT delorie DOT com>
Lines: 18
Date: Thu, 11 Feb 1999 14:25:12 -0600
NNTP-Posting-Host: 199.179.164.209
X-Trace: nntp0.chicago.il.ameritech.net 918765046 199.179.164.209 (Thu, 11 Feb 1999 14:30:46 CDT)
NNTP-Posting-Date: Thu, 11 Feb 1999 14:30:46 CDT
Organization: Ameritech.Net www.ameritech.net Complaints: abuse AT ameritech DOT net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Along the same lines, how do you get the carry flag passed to the routine that
generated the interrupt?  This is a problem I am having with a keyboard handler,
I need to set/clear the carry flag before I return control back to the BIOS.

DJ Delorie wrote:
> 
> > I have just tried to launch my first interrupt with __djgpp_int(...). It
> > works great, but how do you check the carry flag (which is set by the
> > interrupt to indicate success and failure) in __dpmi_regs.flags? I guess
> > there are some #defined values, but I wasn't capable of finding them in the
> > 'dpmi.h'eader.
> 
> if (__dpmi_regs.flags & 1) {
>   /* carry flag set */
> }
> 
> The flags field is defined by the Intel specs - it matches the eflags
> register format.

- Raw text -


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