Hi, N'Geron

you can use:

Code:
For I = 0 to 7

IF PORTA.0[I] = 1 THEN Bail_out

NEXT I

For I = 0 to 1

IF PORTB.0[I] = 1 THEN Bail_out

NEXT I

In simple words, you add the value I to the "Base address" that is PORTA.0 ... same for PortB

You have it "officially written" in the 2.50 Manual, at th REPEAT --- UNTIL Command page !!!

Alain

Alain