Mail Archives: djgpp/1996/06/05/12:13:34
On Mon, 3 Jun 1996, Steve Higgins wrote:
> I started by writing a simple program to see if this is possible (see below).
> What it should do is grab the keyboard BIOS interrupt (0x16) and reply
> with a carrage return whenever a keypress is asked for.
>
> What seems to happen is that the program gets as far as getchar() and then
> waits for ever.
One possible reason might be that `getchar' uses buffered I/O, so it won't
return anything until you either hit [Enter] or fill its buffer with many
keystrokes. What happens if you type a few characters, then hit [Enter]?
Another thing to try is to use an unbuffered DOS console I/O function so
that you won't be fooled by the buffering.
- Raw text -