When I try to shift everything I run into a overflow problem -- I have to square the solution to calculate the distance so the multiplication can only exceed #188. Is there any way to make a variable greater than word (16bits)? Or how would I make a new variable which takes over after 65k?

Thanks