BIGKBUF
=======

BIGKBUF is a keyboard buffer extender for MS-DOS PCs. It was written
by Daniel James, and has been placed in the public domain.

There are other keyboard buffer extenders. Many, very simple, ones
work by changing the addresses in BIOS data area which tell the
keyboard BIOS routines where the buffer is kept.  The drawback with
this method is that the program or device driver which extends the
buffer must be loaded very low in memory (i.e. very early in the boot
process) because the addresses used by the BIOS are short addresses,
so the buffer must be located within 64k of the start of the BIOS
data segment (at 40H). Such a buffer extender cannot, of course, be
loaded high.

Other buffer extenders work by replacing the keyboard interrupt
handler (interrupt 09H) and the BIOS keyboard services interrupt
(Interrupt 16H) with new routines that use a private buffer which the
extender can make any size it likes and can put at any location in
memory. This is a lot of work! it involves replacing a function
which already exists within the PC (in ROM) with new code that takes
up precious RAM - it can be loaded high, though.

Both of these approaches cause difficulties for programs which expect
to find the keyboard buffer at the usual address. A program which
uses the BIOS data area correctly to find the buffer should work OK
with the first type of extender, but not with the second.

BIGKBUF doesn't use either of these methods. It traps both Int09 and
Int16, but - most of the time - jut lets the BIOS do all the work as
usual.

When the BIOS typeahead buffer is full after an Int09 BIGKBUF copies
the most recent character out of the BIOS's buffer and stores it in a
secondary buffer of its own; when the BIOS's buffer is found to have
room for an extra character after an Int16 BIGKBUF copies a character
out of the secondary buffer into the BIOS's buffer.

The secondary buffer is 128 bytes long, so it can hold 63 keystrokes,
making a total of 78 including the 15 that can be held by the BIOS's
buffer.


TO USE BIGKBUF
==============

BIGKBUF is a DOS TSR program. You can just run it from the command
line by typing BIGKBUF. Its resident size is only about 0.5KB.

You will probably want to put BIGKBUF into your AUTOEXEC.BAT file or
with an INSTALL command in CONFIG.SYS.

You can load BIGKBUF high with DOS5 or DOS6 LOADHIGH command, or with
the utilities supplied with, for example, Qualitas's 386Max or
Quarterdeck's QEMM386.

WARNING
-------
If you run BIGKBUF twice you will get two copies in memory. This
seems to work (you get twice as much additional buffer as with a
single copy) but I don't recommend it.  Surely 78 keystrokes is
enough?


THE UNASHAMED ADVERT
====================

I first wrote the program in August 1988, for an XT-class machine
running MS-DOS 2.12. There have been a couple of minor improvements
since, but the current version has been running unchanged since March
1990. I use it every day and have never had any problems with it.


THE DISCLAIMER
==============

I have NOT tested BIGKBUF extensively with utilities which place
keystrokes into the BIOS keyboard buffer under software control. The
utilities of this type that I have seen tend to poke a character into
the keyboard buffer on a timer interrupt if they find that the buffer
is empty - this should work OK.

You may get problems - most likely keystrokes coming out in the wrong
order - if you use a utility which pokes keys into the BIOS buffer
whenever it is not full (rather than whenever it is actually empty -
it holds 15 keystrokes, remember). You will only see problems of this
kind if you run the key poker utility when BIGKBUF's secondary buffer
is in use. I'd be interested to hear of any utilities of this sort
which do create problems.

You will probably also get keystrokes in te wrong order if you use
the BIOS Int16 function 05 (Write to Keyboard Buffer) when BIGKBUF's
secondary buffer is in use. Int16.05 was introduced with the PC-AT
BIOS, and as I wrote BIGKBUF on an XT class machine.  Again, you will
not have problems with Int16.05 unless it is called when the
secondary buffer is in use.

I hope you will find that BIGKBUF is useful and works well for you,
but I make no garantees of anything, and will not accept
responsibility for anything that happens as a result of anything you
do with it.  However, if there's something it doesn't do that you
think it should - let me know, and if there's something I can do to
improve matters I may do so.

Daniel James
[Sonadata Limited]

100024.704@compuserve.com

