delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/17/23:33:51

From: "John M. Aldrich" <fighteer AT NO DOT SPAM DOT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Clear key buffer
Date: Thu, 17 Apr 1997 07:44:51 +0000
Organization: Two pounds of chaos and a pinch of salt
Lines: 36
Message-ID: <3355D4F3.5AB4@NO.SPAM.cs.com>
References: <5j4rvv$5h2 AT maia DOT cc DOT upv DOT es>
NNTP-Posting-Host: ppp208.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Flynn wrote:
> 
> I've some problems clearing the key buffer ring. In watcom I used:
> 
>   static short * const KeyBufferFirst=(short * const)0x41a;
>   static short * const KeyBufferLast=(short * const)0x41c;
> 
>   *KeyBufferFirst=*KeyBufferLast;
> 
> but in DJGPP it doesn't work....
> Does anyone know how to make it?

I don't quite understand this.  Are you trying to directly access
locations in conventional memory?  If so, you should be aware that this
does not work in the way you are attempting in a protected mode
environment.  Please get the DJGPP Frequently Asked Questions list
(v2/faq210b.zip), and read chapters 17 and 18 there.  Chapter 10 also
has information of the kind you need, even though it is specifically
about graphics.

Besides, if you want to manipulate the key buffer, why not use the
<conio.h> functions that exist for the purpose?  I know that I
personally would never write a program that pokes around in low memory
unless there was no alternative!  ;)

-- 
John M. Aldrich <fighteer AT cs DOT com>                      

* Anything that happens, happens.
* Anything that, in happening, causes something else to happen,
  causes something else to happen.
* Anything that, in happening, causes itself to happen again, happens
  again.
* It doesn't necessarily do it in chronological order, though.
 
                                       --- Douglas Adams

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019