Date: Mon, 15 Feb 1999 10:22:00 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: John Scott Kjellman cc: djgpp AT delorie DOT com Subject: Re: How to check the carry flag? In-Reply-To: <36C7AD11.24161EA4@ameritech.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.