Re: A86: getkey program
[Prev][Next][Index][Thread]
Re: A86: getkey program
BrncAvFan2@aol.com wrote:
> I need a program that will tell me the number for the key. I mean like if I
> push F1, it will display 11, and so forth. I could do it the long way whereas
> I would have to do a cp k1, etc. but I was wondering if there was a shorter
> way.
I'm afraid you've bumped into one of the differences between BASIC and Asm. I
assembly, the keys are represented by a number from $00 to $38 (or 0 to 56,
decimal) instead of the row,column code that BASIC uses. If you call GET_KEY,
the BASIC scancode will be in OP2 (but I don't remember how to retrieve numbers
from the OPs ;), and the $00-$38 code is in the 'a' register. A list of which
key each of these codes correspods to is at the bottom of ASM86.H (you probably
already have this).
--
Dark Ryder
ICQ#: 8189903
E-Mail: DarkRyder@cyberdude.com
Happiness is inversely proportional to how much you want to upgrade your
computer.
References: