Mail Archives: djgpp/1997/11/09/11:10:36
On Fri, 7 Nov 1997 ionicis AT geocities DOT com wrote:
> Ok, what EXACTLY does that interrupt function do? I need to know
> EXACTLY what it does when called.
Then please download the Ralf Brown's Interrupt List
(ftp://ftp.simtel.net/pub/simtelnet/msdos/info/inter55*.zip) and read
there. However, I think this function is not your problem, see below.
> keyboard interrupt functions. I want the program to prompt the user via
> the first printf(), and then call get_key(), and when the user presses a
> key (because I assume that int6h/00h waits for the user to hit a key,
> then returns the data), and then it tells the user what key was hit.
> For some reason, the first printf() dosen't execute until the user hits
> a key. When a key is hit, both printf()s execute. Why is this? BTW,
> I'm using DJGPP.
This is all explained in the DJGPP FAQ list (v2/faq210b.zip from the same
place you get DJGPP), section 9.4. The problem is that `printf' uses
buffered output, and actual screen writes are delayed to save CPU
cycles. The FAQ explains how to get DJGPP to write immediately.
- Raw text -