delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/15/13:18:47

Date: Sun, 15 Jun 1997 10:16:27 -0700 (PDT)
Message-Id: <199706151716.KAA24198@adit.ap.net>
Mime-Version: 1.0
To: Gary Preston <gary AT prestons DOT demon DOT co DOT uk>
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Keyboard.
Cc: djgpp AT delorie DOT com

You wrote:
>  Hi, I've written a pong game ( yes I know old but sweet ) the reason
>is I'm trying to get used to using djgpp, now I've used getch() to read
>the keys which is ok ish but I'd rather use the keyboard routines I've
>used in my 16 bit games (see below ). If there is a better way I'd like
>to know eventually I will try and prot my keyboard handler but for now
>any help on the below routine is greatly appreciated. I've also included
>my attempt of porting it. [deleted]

There are routines for this built into libc.a. You can:
- Use getkey() or getxkey() which return scan codes; or
- Use _bios_keybrd() which is a lower level interface to INT 0x16.
Read about these in the docs, libc.inf, under their names.
Good luck!


Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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