A89: Keypad detection


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

A89: Keypad detection




I've decided to spend the summer holiday with learning to program my TI-89, so I'm a total beginner. 
I wanted to be able to detect the keypad, and found some info on this. As far as I understand, this short program should be in a loop until the 9 key is pressed, unfortunately, it does nothing of the sort. What happens is rather that it usually quits once you press the 2nd key, and sometimes when a lot of keys in the vicinity of the 9 key is pressed, but it never quits the loop when i press number 9. Can anyone give a hand?

include "doorsos.h" 
        xdef _main
        xdef _ti89

_main:
 
begin:
 move.b  #%1111011,($600019)  
 move.b  #10,d0
wait:
 nop
 dbra.b  d0,wait             
 move.b  ($60001b),d0      
 btst.b  #3,d0              
 beq  exit                
 bne  begin
exit:
 rts
  end

ANdreas




Follow-Ups: References: