Date: Fri, 10 Nov 2000 12:04:11 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp AT delorie DOT com Message-Id: <9003-Fri10Nov2000120410+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 In-reply-to: <8ufgue$reg$1@nnrp1.deja.com> (dcasale@my-deja.com) Subject: Re: My program hangs under RHIDE's debugger 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> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > 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.