Article View: comp.sys.ibm.pc.programmer
Article #1225delay() in Turbo C 2.0
From: David Holland
Date: Tue, 28 May 1991 04:20
Date: Tue, 28 May 1991 04:20
17 lines
1369 bytes
1369 bytes
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.
Technical Details
Message-ID:
<093m31w163w@unixland.uucp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!unixland!achillesShow Full Headers
Complete Article Headers
Newsgroups: comp.sys.ibm.pc.programmer Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!unixland!achilles From: achilles@unixland.uucp (David Holland) Subject: delay() in Turbo C 2.0 Message-ID: <093m31w163w@unixland.uucp> Sender: bbs@unixland.uucp (Waffle BBS) Organization: The Think_Tank BBS & Public-Access Unix Distribution: comp Date: Tue, 28 May 91 00:20:44 EDT