🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: putting chars back to keyboard buffer...

#3593
From: Duane A. Paulson
Date: Wed, 11 Nov 1992 17:38
34 lines
1645 bytes
In a previous article, iarit@slate.mines.colorado.edu (ARIT ISMAIL) says:

>
>Hi,
>
>I am writing  a small TSR that will put a string back
>to the keyboard buffer. I got some ideas how to use keyboard 'head'
>and 'tail' pointers, but still confused a bit. I understand what the
>'tail' is and how to use it, but 'head' is confusing..
>Does anybody have any 'C' function/idea how to put chars back to
>keyboard buffer without crashing/rebooting the system?
>Any idea/help is appreciated..
>Thanks.
>iarit@slate.mines.colorado.edu
>

You'll have to go all the way down to the system for this one. Function 05
of interrupt 16hex will stuff a single character into the keyboard buffer
for you. Repeat as needed until buffer full. Here's how to set it up:

  ah=05
  ch=scan code for key
  cl=ascii code for character
  call interrupt 0x16

  On return:
  ah=0 means function successful
  ah=1 means keyboard buffer was full

-- 
Duane Paulson
ci922@cleveland.freenet.edu
duane.paulson@pcb.batpad.lgb.ca.us
Technical Details
Message-ID: <1drgenINNsea@usenet.INS.CWRU.Edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!sh.wide!wnoc-tyo-news!nec-tyo!nec-gw!sgiblab!spool.mu.edu!agate!usenet.ins.cwru.edu!cleveland.Freenet.Edu!ci922
References: <1992Nov10.204616.25750@slate.mines.colorado.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!sh.wide!wnoc-tyo-news!nec-tyo!nec-gw!sgiblab!spool.mu.edu!agate!usenet.ins.cwru.edu!cleveland.Freenet.Edu!ci922
From: ci922@cleveland.Freenet.Edu (Duane A. Paulson)
Newsgroups: comp.os.msdos.programmer
Subject: Re: putting chars back to keyboard buffer...
Date: 11 Nov 1992 17:38:31 GMT
Organization: Case Western Reserve University, Cleveland, OH (USA)
Lines: 34
Message-ID: <1drgenINNsea@usenet.INS.CWRU.Edu>
References: <1992Nov10.204616.25750@slate.mines.colorado.edu>
Reply-To: ci922@cleveland.Freenet.Edu (Duane A. Paulson)
NNTP-Posting-Host: hela.ins.cwru.edu