A83: Re: Direct Input...


[Prev][Next][Index][Thread]

A83: Re: Direct Input...




Well seeing you are using direct input, you are still have your finger on
the button. The only way to stop this would be perhaps getkey or getky (I
don't know if there's any difference seeing i'm only answering off the top
of my head).
-----Original Message-----
From: Ian Graf <ian_graf@geocities.com>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: Saturday, 4 April 1998 15:47
Subject: A83: Direct Input...


>
>Say I have This bit of code to wait for 2nd to be pressed
>
>     wait_for_2nd:
>
>          ld a,0ffh            ; Reset the keyport
>          out (1),a
>          ld a,0bfh            ; Enable the row with 2nd
>          out (1),a
>          in a,(1)
>          cp k2nd              ; Check for 2nd
>          jp nz,wait_for_2nd   ; if not pressed re-loop
>          ret                  ; else return
>
>but, if I call it twice in a row, the second call returns Immediately.
>The strange thing is that I thought a key press would be prevented
>from being read twice. Why does the same press of 2nd get read twice,
>and how can I prevent it?
>
>Ian Graf
>ian_graf@geocities.com


Follow-Ups: