Hi, Steve ...

may be the problem is here :

If TMP If TMP = 0 Then TOP

That works only vith very aged PIC's ...

Alain