From: dcasale AT my-deja DOT com Newsgroups: comp.os.msdos.djgpp Subject: Re: My program hangs under RHIDE's debugger Date: Fri, 10 Nov 2000 20:23:54 GMT Organization: Deja.com - Before you buy. Lines: 59 Message-ID: <8uhlgh$imk$1@nnrp1.deja.com> References: <8ueodf$5ep$1 AT nnrp1 DOT deja DOT com> <9743-Thu09Nov2000224218+0200-eliz AT is DOT elta DOT co DOT il> <8ufgue$reg$1 AT nnrp1 DOT deja DOT com> <9003-Fri10Nov2000120410+0200-eliz AT is DOT elta DOT co DOT il> NNTP-Posting-Host: 199.249.234.30 X-Article-Creation-Date: Fri Nov 10 20:23:54 2000 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98) X-Http-Proxy: 1.1 x54.deja.com:80 (Squid/1.1.22) for client 199.249.234.30 X-MyDeja-Info: XMYDJUIDdcasale To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article <9003-Fri10Nov2000120410+0200-eliz AT is DOT elta DOT co DOT il>, djgpp AT delorie DOT com wrote: > > From: dcasale AT my-deja DOT com > > Newsgroups: comp.os.msdos.djgpp > > Date: Fri, 10 Nov 2000 00:53:36 GMT > > > > Guess that means I need to copy my build environment to a separate > > drive, eh? ^^;;; > > It would be interesting to see if this also explains the time > slow-down... > > > > > > Why did you insert PUSHF and POPF? They are not needed for > > > > > __dpmi_int calls; I suggest to remove them. > > > > > > > > Because another programmer who was working on this code before me > > > > found that with _some_ __dpmi_int int 13h calls, interrupts were > > > > mysteriously turned off after the call returned. That _may_ be the > > > > reason my system clock is slowing down. > > > > > > Something must be turning interrupts back on, or else the keyboard > > > would stop working as well, and you will have a totally wedged > > > system. > > > > Yeah, I know. He says that the internal code for INT 21h (which I also > > use) checks to see if interrupts are turned off, and turns them back on > > if necessary. But, he says that if a certain error condition occurs > > during an INT 13h call, the function jumps to a spot in the return code > > which _misses_ the opcode to turn interrupts back on. > > One possible cause of interupts getting subtly disabled is when you > run a program under a debugger with CWSDPMI as your host. In this > case, any code, including library functions, that uses __dpmi_int to > call any of the DPMI services hooked by the DJGPP debug interface will > return with interrupts disabled. This is because CWSDPMI implements > the Int 31h not quite as the DPMI spec says (I forget the details). > > Note that this can only happen under a debugger, and is usually of > concern only for programs which disable and enable interrupts. > > For the rest of this story, including some discussion, see this > message (this URL is one long line): > > http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp- workers/1999/12/30/02:54:16 > > You can browse the whole thread "Re: GDB, DOS 6.22, CWSDPMI and > Interrupts" (posted to djgpp-workers) on DJ's server, if you want to > know more. > Sent via Deja.com http://www.deja.com/ Before you buy.