www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/04/18:57:06

From: ovek AT arcticnet DOT no (Ove Kaaven)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: interrupts and unknown opcodes
Date: Tue, 04 Feb 1997 12:35:18 GMT
Organization: Vplan Programvare AS
Lines: 31
Message-ID: <5d8d54$7sj$1@troll.powertech.no>
References: <5d869q$3br AT flex DOT uunet DOT pipex DOT com>
NNTP-Posting-Host: alwayscold.darkness.arcticnet.no
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

nikki AT gameboutique DOT co (nikki) wrote:

>i'm trying to convert a keyboard handler (which someone gave to me in pascal)
>to be used with djgpp. would i be better hooking the realmode interrupt to do
>this or the protected mode one? any suggestions from the field here :)

This should be covered in the FAQ. Under DPMI, interrupts doesn't work
the same way as in real mode compilers.

>also, the code is pretty badly written, in one place he missed the opcodes out
>and i'm trying to figure out what they are. the code is below.
>it doesn't strike me as particularly efficient and i have no idea what the
>$d6 opcode is.

D6 is an "undocumented" (newly-documented) opcode, called SALC (Set AL
with Carry). It seems its behaviour is already described in your
comments.

>the first 3 would appear to be bt di,bx at a guess.

0F A3 = bt, yes.

>can anyone improve on this and/or suggest a reasonable implementation under
>djgpp? 

This handler really only updates a table with which keys are down, and
it doesn't even do that well. Instead of wasting your time, consider
using already-existing better-written keyboard handlers instead. I
think there's pointers to some in the FAQ.


- Raw text -


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