Issue With CRT Unit On Fast Processors
Several versions of Turbo Pascal, including the latest version 7, include a CRT unit used by many fullscreen text mode applications. This unit contains code in its initialisation section to determine the CPU speed and calibrate delay loops. This code fails on processors with a speed greater than about 200 MHz and aborts immediately with a "Runtime error 200" message. (the error code 200 had nothing to do with the CPU speed 200 MHz; it was just a coincidence). This is caused because a loop runs to count the number of times it can iterate in a fixed time, as measured by the real-time clock. When Turbo Pascal was developed it ran on machines with CPUs running at 1 to 8 MHz, and little thought was given to the possibility of vastly higher speeds, so at about 200 MHz the 16-bit counter overflows. Several patches have been required as processor speeds increased.
Programs compiled with this error can be recompiled with a compiler patched to eliminate this error (using a TURBO.TPL itself compiled with a corrected CRT unit) or, if source code is not available, executables can be patched by a tool named TPPATCH or equivalent, or by loading a Terminate and Stay Resident program loaded before running the faulty program.
There are also patches to the TP7 compiler itself, thus if the Pascal source is available, a new compilation's code will work without the compiled code having to be patched. If the source code is available, porting to libraries without CPU clock speed dependency is a solution too.
Read more about this topic: Turbo Pascal
Famous quotes containing the words issue, unit, fast and/or processors:
“For Banquos issue have I filed my mind;
For them the gracious Duncan have I murdered;
Put rancors in the vessel of my peace
Only for them; and mine eternal jewel
Given to the common enemy of man,
To make them kings, the seeds of Banquo kings!”
—William Shakespeare (15641616)
“During the Suffragette revolt of 1913 I ... [urged] that what was needed was not the vote, but a constitutional amendment enacting that all representative bodies shall consist of women and men in equal numbers, whether elected or nominated or coopted or registered or picked up in the street like a coroners jury. In the case of elected bodies the only way of effecting this is by the Coupled Vote. The representative unit must not be a man or a woman but a man and a woman.”
—George Bernard Shaw (18561950)
“Although knaves win in every political struggle, although society seems to be delivered over from the hands of one set of criminals into the hands of another set of criminals, as fast as the government is changed, and the march of civilization is a train of felonies, yet, general ends are somehow answered.”
—Ralph Waldo Emerson (18031882)
“The information links are like nerves that pervade and help to animate the human organism. The sensors and monitors are analogous to the human senses that put us in touch with the world. Data bases correspond to memory; the information processors perform the function of human reasoning and comprehension. Once the postmodern infrastructure is reasonably integrated, it will greatly exceed human intelligence in reach, acuity, capacity, and precision.”
—Albert Borgman, U.S. educator, author. Crossing the Postmodern Divide, ch. 4, University of Chicago Press (1992)