I don't see why you have a RETURN at the position shown below. I can imagine that the RETURN is popping a strange address off the stack.


start:
pulsin PORTB.1,1,widthx
IF widthx >= 50 && widthx < 70 Then run_motor1
IF widthx >70 && widthx <90 Then Goto run_motor2
IF widthx >90 Then
Goto run_motor3
Else
Goto brake
Endif
Return <--- why this?