Well, we have the sleep function from Turbo C++ which works quite well, also when the DOS program is run in Windows. (The only drawback is the fact that it only waits seconds, not milliseconds).
Or maybe because the suggestion to use hlt in a loop was incorrect in the first place. (I mean, why shouldn't it work in Windows? The whole thing works in the native Windows Sleep function, so why should DOS emulation just skip it instead of emulating its behavior?) After all, can anybody confirm to me that this:indeed does work under DOS and wasn't just a quick first idea? But even if it would, it's obviously still not the way Turbo C++'s sleep is implemented because that one does work in Windows.Code:while ((clock() - start) * 1000 / CLOCKS_PER_SEC < milliseconds) { asm{"hlt"}; }