Mail Archives: djgpp/2002/02/07/06:15:23
On Thu, 7 Feb 2002, Martin Steuer wrote:
> int main()
> {
> char key = 0;
> while (key != 27)
> {
> // __asm__ __volatile__ ("sti");
> if (kbhit()) key = getch();
> }
> return 0;
> }
>
> The interrupts get disabled whenever I set a breakpoint somewhere, it can
> be on EVERY line. If I uncomment the sti instruction it works.
>
> The problem only occurs under pure dos, so I can imagine that it might be
> the result of a problem in cwsdpmi too.
It's a known problem, due to the way CWSDPMI implements the Int 31h
interface. For details, read the discussion on djgpp-workers list whose
subject is "GDB, DOS 6.22, CWSDPMI and Interrupts". The message which
started that discussion is here:
http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp-workers/1999/12/30/02:54:16
The only known work-around is to inject ``asm("sti")'' into your program
from time to time.
- Raw text -