Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Turbo Pascal
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==={{anchor|CRT}}Issue with CRT unit on fast processors=== Several versions of Turbo Pascal, including the last version 7, include a unit named CRT, which was used by many fullscreen text-mode applications on a [[Cathode-ray tube|CRT]]. This unit contains code in its initialization section to determine the CPU speed and [[calibration|calibrate]] delay loops. This code fails on processors with a speed greater than about 200 [[megahertz|MHz]] and aborts immediately with a "Runtime Error 200" message.<ref>{{cite web|url=http://info.borland.com/devsupport/pascal/|title=Borland Pascal Developer Support|access-date=2011-04-25|url-status=dead|archive-url=https://web.archive.org/web/20101023083050/http://info.borland.com/devsupport/pascal/|archive-date=2010-10-23}}</ref> (the error code 200 had nothing to do with the CPU speed 200 MHz). 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 2.5 to 8 MHz, and little thought was given to the possibility of vastly higher speeds, so from about 200 MHz enough iterations can be run to overflow the 16-bit counter.<ref name=merlyn>{{cite web|url=http://www.merlyn.demon.co.uk/pas-r200.htm |title=Borland's Version 7 Pascals' Start-Up Runtime Error 200 (divide by zero) |access-date=2015-11-16 |url-status=unfit |archive-url=https://web.archive.org/web/20150907221542/http://www.merlyn.demon.co.uk/pas-r200.htm |archive-date=7 September 2015}} Web page discussing the cause of the error and various solutions.</ref> A [[Patch (computing)|patch]] was produced when machines became too fast for the original method, but failed as processor speeds increased yet further, and was superseded by others. Programs subject to this error can be recompiled from source code with a compiler patched to eliminate the error (using a TURBO.TPL compiled with a corrected CRT unit) or, if source code is unavailable, executables can be patched by a tool named TPPATCH or equivalent,<ref name=speedpatch>{{cite web|url=http://www.kennedysoftware.ie/patchcrt.htm|title=PatchCRT β fix RunTime Errors on some apps|year=2003|publisher=kennedysoftware.ie|access-date=2010-09-28|archive-url=https://web.archive.org/web/20110721124924/http://www.kennedysoftware.ie/patchcrt.htm|archive-date=2011-07-21|url-status=live}}</ref><ref>{{cite web |url=https://www.heise.de/ct/hotline/Nicht-schon-wieder-Runtime-Error-200-307662.html |title=Nicht schon wieder: Runtime Error 200 |date=8 April 2000}}</ref> or by loading a [[terminate-and-stay-resident program]] before running the faulty program.<ref>{{cite web|url=http://www.pcmicro.com/elebbs/faq/rte200.html|title=How to fix a Run Time Error 200|year=2006|publisher=pcmicro.com|access-date=2010-09-28}}</ref> There are also patches to the TP7 compiler,<ref>{{cite web |url=http://www.blume-programm.de/ab/boerse/a_338.htm |title=Runtime Error 200 |date=2003-03-13 |publisher=blume-programm.de |access-date=2015-11-16 |archive-url=https://web.archive.org/web/20151117063633/http://www.blume-programm.de/ab/boerse/a_338.htm |archive-date=17 November 2015 |url-status=dead |language=de}}</ref> thus if the Pascal source is available, a new compiling's code will work without the compiled code needing a patch. If the source code is available, porting to libraries without CPU clock speed dependency is a solution too.<ref>{{cite web|url=http://www.blume-programm.de/ab/boerse/januar_10/dateien/sdelay11.zip|title=SuperDelay v1.1a|first=Allen|last=Cheng|year=1997|publisher=blume-programm.de|access-date=2010-09-28}}{{Dead link|date=July 2018 |bot=InternetArchiveBot |fix-attempted=yes}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)