You mean switch direction when the pot is 0, right?
Code:
GOSUB GetADC
 
If PotValue = 0 THEN
  Direction = PortB.7  ' Or whatever
ENDIF
This won't touch the Direction variable if PotValue is >0.