Re: A86: reading keys
[Prev][Next][Index][Thread]
Re: A86: reading keys
In a message dated 10/7/98 20:05:30 Eastern Daylight Time, zone_ti@hotmail.com
writes:
> >> how do you get a variable from the keypad and store it in a reg
> >
> >
> >there are two main ways (others such as reading the port also work):
> >
> >call _getkey ;enter low power mode until a key is pressed
> > ;contrast changing supported, 2nd and alpha not detected,
>
> It's only supported if it's in a loop. Therefore you can't change
> contrast if you have call _getkey | ret.
we've discussed this before. _getkey pauses until a key is pressed!!! This
is what Assembly 86 says:
"Pauses calculator operation until a key is pressed, and returns the key
pressed in the A register. While waiting for a key, the calculator enters low
power mode, and the APD counter is handled. The 2nd and Alpha keys and screen
contrast adjustment are all handled by the routine."
nuff said
>
> > ;and APD supported
> > ;[sqrt]key can interfere with
>
> Yep.
>
> >
> >call GET_KEY ;drains batteries
>
> -This is not true. Just do:
> call GET_KEY
> HALT
> .....Code Goes here.....
>
> I think this will use the same amount of power as _getkey in a loop.
> You could always manually enter Low Power Mode with a out (?),a ect.
that would be ld a,%00001100/out (3),a, i believe
>
>
> > ;detects all keys
>
> I don't think it detects On.
that was implied. on detection is completely different. what i meant was
that it detects all the regular keys, including 2nd and alpha.
>
> > ;[sqrt]key doesn't interfere
> > ;doesn't wait for a keypress in order to return
> >
>
> Exactly.