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
Bookmarks