Re: A86: Key Presses
[Prev][Next][Index][Thread]
Re: A86: Key Presses
If you don't want to read more than one key "at the same time", using _getcsc
(same as _getky or _get_key) is much easier than the ports.
Waitkey:
call _getcsc ;get keypress in a
cp K_PLUS
jr z,ContrastUp
cp K_MINUS
jr z,ContrastDown
cp K_EXIT
jr nz,Waitkey
In a message dated 12/4/99 16:48:55 Eastern Standard Time, bryan_kam@usa.net
writes:
> I'm a newbie at this and I'm having trouble reading multiple keypresses.
> I am reading the presses by writing to port 1 and reading from port 1 and I
> can read one key just fine, but I've heard that one can read more than one
> key press with the ports, but I am unsure how to do this. Is reading the
> port the best way to do this or is _getky or _getkey better? I'm trying to
> let them press +, -, or exit. Here's my code:
>
> Getkeypress:
> ld a,%01111101
> out (1),a
> nop
> nop
> in a,(1)
> bit 1,a
> jr nz, Getkeypress
>
> After that code it goes on to something that will change the contrast
> up, but I want to know how to make little routines for inc-ing the
contrast,
> dec-ing the contrast, and ret-ing to the OS.
> Am I making sense?
----
Jonah Cohen
<ComAsYuAre@aol.com>
http://linux.hypnotic.org/~jonah/
Follow-Ups: