Mail Archives: djgpp/2000/08/04/05:40:53
> From: "Hunt, David" <dh210008 AT Exchange DOT AtlantaGA DOT NCR DOT com>
> Date: Thu, 3 Aug 2000 16:37:08 -0400
>
> To answer your question more directly, the BIOS of your machine limits the
> number of input characters for string input to 128. It is the BIOS that
> buffers the input and passes that kbd input to stdio.
This is not true. The BIOS buffer is only 16-byte long, and as long
as the program is inside the DOS read call, every character typed will
be read by DOS. So the BIOS buffer will not overflow, and no beeps
from the BIOS will follow.
The slightly modified program I posted proves this point: when termios
is activated, the program reads the console via BIOS functions
directly, bypassing DOS. Since the problem disappears then, I think
BIOS is not the culprit here.
The 128-byte limitation seems to be inside DOS console device driver.
The device driver apparently needs to buffer characters of a single
line to support the limited editing (with F2 and F3 keys, etc.) it
offers in the so-called ``cooked mode''. If you switch the CON device
to raw mode (e.g., by calling `setmode', or issuing function 44h of
Int 21h directly), this problem disappears.
- Raw text -