Taylor,

Thanks for your interested.
So, you said that the following code running in 20mhz take 2μsec:
----------------------------
START:
If PORTA.1 = 1 THEN
GO TO SOMEWHERE1
ENDIF
If PORTA.2 = 1 THEN
GO TO SOMEWHERE2
ENDIF

GOTO START
--------------------------

I need to check all the ports of A&B in a loop.
1 LOOP SHOULD TAKE MAXIM 500μsec.

Please advice
Nikos