Steve

Code:
     
Checkscore:       'Determine if a button is pressed (count is less than average)        
            If timerave[index] - (timerave[index] /50) > timercount[index] and (delay > 1000) then 
               gosub ServiceHardw 'Signal that a button is pressed. 
            endif
Your call to gosub ServiceHardw is the culprit. It nests other subroutines. This is what may be consuming the time. I can recommend you replace the call to gosub ServiceHardw with a bit variable getting set. You then check the bit variable in your mainline code to decide if you need to serviceHardw. It will definitely yield results.

Code:
     Checkscore:       'Determine if a button is pressed (count is less than average)        
            If timerave[index] - (timerave[index] /50) > timercount[index] and (delay > 1000) then 
               ServiceHw=1
            endif
In your main, put this
Code:
ServiceHw var  bit        ' declarations section

            If ServiceHw then gosub ServiceHw

Jerson