Along those same lines:
Code:
IF (OutputMap1 = 7) & (PORTB = 7) THEN
  PORTB = 0
ELSE
  PORTB = 7
ENDIF