achilles@unixland.uucp (David Holland) (05/28/91)
The other day I discovered something very strange: the delay() function in Turbo C 2.0 started to take eleven and a half seconds to initialize itself. (The first time you call it, it runs some special code to calibrate its timing loop for your particular system.) Well, after I installed 2MB more RAM (to 4MB) the function started taking an immense amount of time to initialize itself. Switching the computer out of turbo mode, curiously enough, halved the initialization time - and the time was also affected by what else was loaded in memory and what else a test program contained. Tracing into the function revealed a mess that the term "spaghetti" does not even begin to describe... Does anybody know anything about any of this? Can anybody suggest why adding memory accessible only in protected mode should break this? I investigated the corresponding function in Turbo C++, which works fine; it is a completely different piece of code.