Mail Archives: djgpp/1998/09/20/23:46:10
Uhfgood wrote:
>
> Well here's is the simple question. consider the following code :
>
> printf("This demonstrates a \\a escape sequence: \a");
> getch();
>
> Now answer me this, how come it waits until a key is pressed to display the
> string?
because output in DJGPP is buffered. Don't take this as a bug, ANSI
either says output is buffered or it leaves it to the discretion of the
compiler, DJGPP is not violating anything here.
the obvious reason for it it's that DJGPP is protected mode, output to
screen is real mode, and DJGPP has to switch every time which is slow.
so it will buffer the output and only switch to real mode once to output
everything.
- Raw text -