Overkill code, far, far too complicated for what it is doing, but it does the job, needs to be fully commented to help Codeman as it has some quite confusing things such as pointers there for someone new to Freebasic.
Also just one more thing, there is no need to be using screensync.. You should be using rbraz's version of tinyptc, screensync is un-necessary, so Codeman if you have your version of tinyptc updated, you can safely take that line away. Also the code this typer seems far too complicated for what it is doing.
I will make a tutorial soon that is easy to understand for everyone, this listing would be of more use to someone with a fairly good idea of what they are doing, thanks for posting it nino, this is not negative criticism, I just don't want codeman or any other new coders to give up because it looks difficult.