Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Turbo Pascal
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Turbo Pascal
(section)
Add topic