🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #1078

Re: HELP: Keyboard Interrupt 09H

#1078
From: Timo Kelju
Date: Tue, 13 Oct 1992 12:39
43 lines
1957 bytes


Hi!

>This works, but the problem is that since I'm not using the BIOS to read the
>keystrokes (I'm just reading the key_map[] array), the BIOS buffers them up
>and starts clicking the speaker when the buffer overflows.  Needless to say,
>when I'm holding keys down, this click turns into a "drumroll" and slows down
>my game.  I tried removing the call to old_handler(), but then everything
>stopped working, as if the interrupt itself was no longer being generated.

I'm not sure if I remember this right. I had same kind of problem last weekend
and I solved it like this (sorry but I'm not so familiar with C that I can write
solution with it. I do this with Pascal instead).

First we need two pointers one pointing to keyboard buffers next value and 
the second which points at next free slot in buffer. Both pointers point at 
byte.

	        X:=Ptr($40,$1A);
		Y:=Ptr($40,$1C);

First value of each pointer is page and second is offset.

Then all we have to do is to set values of these pointers to point at same
address, because if these addresses are same the buffer is empty. So we do
following assignment:

		X^:=Y^;

This has to be done in your case (I think ;) every time when you read some 
characters. Buffer will never get full (at least I hope so).

Maybe this method is little rude, but at least it works (or it worked last
weekend). I'm not quite sure if I remembered those addresses right, but if
you have problems you can write to me and I will check them.


		tkulju@cs.joensuu.fi


		
Technical Details
Message-ID: <1992Oct13.123912.27125@cs.joensuu.fi>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!cs.joensuu.fi!tkulju
References: <1992Oct9.154103.18137@sol.ctr.columbia.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.ibm.pc.programmer,alt.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!cs.joensuu.fi!tkulju
From: tkulju@cs.joensuu.fi (Timo Kelju)
Subject: Re: HELP: Keyboard Interrupt 09H
Message-ID: <1992Oct13.123912.27125@cs.joensuu.fi>
Organization: University of Joensuu
References: <1992Oct9.154103.18137@sol.ctr.columbia.edu>
Date: Tue, 13 Oct 1992 12:39:12 GMT
Lines: 43