🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #6421

Re: putting chars back to keyboard buffer...

#6421
From: Rogier Goossens
Date: Thu, 19 Nov 1992 10:55
40 lines
2609 bytes
lb00197@Corlac (David Porco) writes:

> [...]
>Some info you ought to know:
>You can only fit 16 chars in this buffer (16 ASCII codes + 16 Scan Codes),
>unless you are up to relocating and expanding the keboard buffer in your
>program (not recommended for the weak of heart).
>.

Relocating and expanding the keyboard buffer is, under certain circumstances,
not that difficult at all. 
As the four pointers in the bios data area are near pointers, relative to
segment 0x0040, the keyboard buffer must be located between the addresses
0040:0000 and 1040:0000 (hex). If DOS ends at a segment address lower than
0x1040, the remaining memory can be used to relocate the keyboard buffer. 
It suffices to allocate the memory, and set the four bios keyboard buffer
pointers to point to it. A 64-byte program could do it.

If you possess DOS 5.0, and it is loaded high, there certainly is enough
memory. When DOS is not loaded high, there probably isn't.

I have written a small (2k) assembly program to relocate the keyboard buffer. 
It can also resize it on request. It could easily be modified to insert 
characters into the buffer.

I can post it (binary and/or source) to this (or another) group if enough 
people are interested. (it's about 15 pages uncompressed + 2k binary)

Rogier.


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::                   :                          :                            ::
::  (((   ((((  ((   :  Rogier Goossens         :  Perfection is achieved,   ::
::  (  (    (  (  (  :  goossens@cs.few.eur.nl  :  not when there's nothing  ::
::  (((     (  (     :  Erasmus University      :  left to add, but when     ::
::  (  (  ( (  ( ((  :  Rotterdam               :  There's nothing left to   ::
::  (  (   (    ((   :  The Netherlands         :  Remove.                   ::
::                   :                          :                            ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Technical Details
Message-ID: <1992Nov19.105503.12401@cs.few.eur.nl>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!unidui!rrz.uni-koeln.de!Germany.EU.net!mcsun!sun4nl!eur.nl!goossens
References: <1992Nov10.204616.25750@slate.mines.colorado.edu> <lb00197.11@Corlac>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!unidui!rrz.uni-koeln.de!Germany.EU.net!mcsun!sun4nl!eur.nl!goossens
From: goossens@cs.few.eur.nl (Rogier Goossens)
Subject: Re: putting chars back to keyboard buffer...
Message-ID: <1992Nov19.105503.12401@cs.few.eur.nl>
Sender: news@cs.few.eur.nl
Organization: Erasmus Universiteit Rotterdam
References: <1992Nov10.204616.25750@slate.mines.colorado.edu> <lb00197.11@Corlac>
Date: Thu, 19 Nov 1992 10:55:03 GMT
Lines: 41