>Is it possible doing do while not to consume 100% of the processor?
You can do one of several things to induce a "wait state".
1) DECLARE Sleep IN WIN32API INTEGER nMilliSeconds
Put Sleep(xx) inside the DO WHILE.
2) INKEY(xx) inside the DO WHILE.
3) DOEVENTS inside the DO WHILE.