Date: Sat, 29 Jun 96 14:20:04 MDT Message-Id: <9606292020.AA02392@rgfn.epcc.Edu> From: ad327 AT rgfn DOT epcc DOT Edu (Matt W. Spencer) To: robert DOT fremin AT mailbox DOT swipnet DOT se Subject: Re: Why is my program pausing at regular interalls? Cc: djgpp AT delorie DOT com Reply-To: ad327 AT rgfn DOT epcc DOT Edu > >I have located the above mystery to my DOS-int call: > > >movb $0x0b, %ah >int $0x21 >// to get keyboard status > > >I'm using this call as part of a GetKey(char ascii) function. >In BC++ realmode, the same code runs without any problems, but >in DJGPP it halts for some tenths of seconds every 2048 call, >and doesn't break the program at the exact moment you press a key. >Hmm, here is the whole test-program so you'll understand what >I'm talking about... > I am by no means an expert, but it appears that your problems are CPU mode switches. Since DJGPP programs run in protected mode, the CPU must switch modes to access DOS and BIOS functions. You don't see this problem in (bleh) BC because BC compiles real mode programs, thus there is no mode switch involved. Matt -- GIVE A DAMN! PROTEST THE COMMUNICATIONS DECENCY ACT! Internet Declaration of Independance: http://www.misha.net/~elfi/dec.html EFF: Electronic Frontier Foundation: http://www.eff.org ACLU: American Civil Liberties Union: http://www.aclu.org