Quote Originally Posted by skimask View Post
This may not be any nicer, and I'm not even sure if it'll work...but...

Code:
temp var byte
pin var byte

pin = 0 : temp = porta     'initial pin to zero and save porta to temp
loop: pin = pin + 1 : if (temp.0[pin] <> 0) AND (pin <> 4) then loop
got_pin:    'when you get here, if pin = 5 then porta.0 thru porta.3 <> 0
This seems to be the way to index the pin registers.
In fact before checking the replies on the forum (and your reply) I've tried the tutorial from BRUCE where he is using:
SYMBOL TRIGGERED_PIN = PORTA

Then

IF (TRIGGERED_PIN.0[index] == 0) THEN
...

and it worked fine I'm very happy.