If it's not getch (I seem to recall it is, but it's been about 17 years since I did any real C work), there's some function to get a keypress. Just loop until it == 13.