Mail Archives: djgpp/1996/06/29/16:36:13
>
>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
- Raw text -