Darrel, thanks for your answer, it is my honor and great pleasure that you interest to my problem, so I learned a lot from your routine that have enriched our much loved PICBASIC, the pic I use is the 18f252 with internal 256 byte EEPROM.