I know I already opened a post for this but after reading it again some month later, I could still not find the answer.

In the first step I need to know what pin triggered an interrupt, so I'm using:

Code:
if (porta.0 == 0) THEN
    pin = 0             'set the number of the pin for the score managment (update_scores)
    GOTO got_pin        'bypass 
ENDIF
if (porta.1 == 0) THEN
    pin = 1
    GOTO got_pin        'bypass 
ENDIF
if (porta.2 == 0) THEN
    pin = 2
    GOTO got_pin        'bypass 
ENDIF
if (porta.3 == 0) THEN
    pin = 3
    GOTO got_pin        'bypass 
ENDIF
if (porta.4 == 0) THEN
    pin = 4
    GOTO got_pin        'bypass 
ENDIF
'don't check A.5 which is an output
got_pin:
In the second step I have to read the pin that changed, logicaly it would be:

Code:
WHILE (PORTA.0(pin) = 0)
...
But id does not work.
I don't want to use the same code for all 5 porta pins I'm using.
Isn't there a way to access pins using an index variable?