This thread has the answer
http://www.picbasic.co.uk/forum/show...44&pagenumber=