procedure flushKB() while kbhit() do getch() # flush input end