Code:
adcin 1, adcval   'read keys
SELECT CASE adcval
  CASE < 10 : left=left+1 'detect button presses
  CASE < 100
@ NOP
  CASE < 130 : right=right+1 'detect button presses
END SELECT
You might try the SELECT CASE method of parsing through. The above snippet should give you an idea.[/FONT]