www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/15/03:24:56

Date: Mon, 15 Feb 1999 10:22:00 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: John Scott Kjellman <jkjellman AT ameritech DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: How to check the carry flag?
In-Reply-To: <36C7AD11.24161EA4@ameritech.net>
Message-ID: <Pine.SUN.3.91.990215102108.10128P-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Sun, 14 Feb 1999, John Scott Kjellman wrote:

> Once I do this, if the BIOS generated an int 15 (func 4f) and the
> scan code in AL is 0x30 (make code for '0' key), clearing the carry
> flag and returning should cause the BIOS to ignore the '0' key scan
> code.  This does not work!

It should work, though.  The documentation for the function
`_go32_dpmi_allocate_real_mode_callback_iret' says that any changes to
the registers' struct will be reflected back to real mode.  And the
DPMI spec includes an example of a function that hooks Int 21h and
sets the carry flag under certain conditions, so at least in theory
this should have worked.

It might be that the carry flag is cleared by the wrapper created by
`_go32_dpmi_allocate_real_mode_callback_iret', but I don't see any
instruction which does that.  Maybe if you look at its source (the
file gormcb.c in djlsr202.zip) you will see some bug like that.

Are you sure that the carry flag not being set is your problem?  Maybe
some other cause is at work here?

> If this is too confusing (I know it is a l-o-n-g explanation), please let me
> know and I'll write a simpler program to demonstrate what I am trying to
> accomplish.

It's not confusing, but a simple test program might help to
investigate the problem.

- Raw text -


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