From: Endlisnis Newsgroups: comp.os.msdos.djgpp Subject: Re: Testing for a key in an inline assembly loop Date: Sat, 08 Aug 1998 15:46:27 -0300 Organization: NBTel Internet Lines: 22 Message-ID: <35CC9D03.81A24950@unb.ca> References: <6qh8i2$mf$1 AT news2 DOT saix DOT net> NNTP-Posting-Host: fctnts13c58.nbnet.nb.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Rylan wrote: > Hi, > How can I test for a key press in an inline assembly loop in DJGPP? I tried > using a __dpmi_int call, which works fine for int 16h function 0x00 which > waits until a key is pressed, then continues, so my interrupt setup seems to > work. But when I try function 0x01 of int 16h, which sets the zero flag if a > key has been pressed, how can I test the flags set by an int executed for me > by __dpmi_int? 'Cause it seems that __dpmi_int alters them on exit of > itself? You pass the address of a __dpmi_regs variable to the function don't you? You would have to as far as I understand. When the function returns, the value of the flags should be in regs.flags (or something like that, it is in dpmi.h). -- (\/) Endlisnis (\/) s257m AT unb DOT ca Endlisnis AT GeoCities DOT com Endlis AT nbnet DOT nb DOT ca