fix for borland pascal "runtime error 200" bug on fast pcs

fix for borland pascal "runtime error 200" bug on fast pcs fix for "runtime error 200" bug of borland pascal 7 on fast pcs explains the cause of this bug and sumarizes solutions both for users and developers (people who do have / don't have pascal source of their programs). also available: french translation deutsche version contents: preface cause explained solutions index comments what's new (25-may-1999) other web pages preface borland turbo pascal 7 is a great pascal compiler for pc's. unfortunately it has not been updated by borland for many years (for a possible alternative see fpc). all programs compiled with borland pascal 7 that use the system unit crt (almost all programs do that) abort with the error message "runtime error 200" on all fast pcs, for example pentium ii with 233 mhz. programs compiled with borland pascal 6 are said to not abort with a runtime error, but their delay is completely wrong on fast pcs (and the problem starts there at much lower speeds than the problem of version 7). this web page tries to explain the problem and summarize some existing solutions. borland (aka inprise) does not offer a solution for this bug (shame on them!). instead their pascal developer support recommends an altavista search, which probably is how you have found this web page. cause the bug is in the initialization for the delay procedure that is part of the initialization of the crt unit. the delay initialization is called in every program that uses the crt unit, not just on those that use the delay procedure. the crt unit is included in most programs that are written in borland pascal. the delay initialization counts how often a tiny do-nothing loop must be called in order to delay by 55 milliseconds (time measured by reading the bios time counter at memory address 40:6c that ticks 18.2 times a second, i.e. each 55 milliseconds). this number is then divided by 55 to get the number of calls for one millisecond. the result is written to a word (16 bit) variable. the overflow of this variable triggers the run time error (the meaning of runtime error 200 is division by zero, but it is caused by an overflow in this case). solutions the following list shows all solutions that i currently know. if something is missing here, please tell me: hartnegg @uni-freiburg.de index of recommended solutions you have only an exe file, no pascal source ask the person who does have the pascal source for a new or recompiled version tppatch   patch program for existing executable files (caution: only for programs that no not require correct timing) if you need correct timing, you may experiment with tp7p5fix from the other solutions below, it doesn't tell if such programs work with that or not (probably not but maybe worth a try). you have pascal source and the turbo pascal compiler t7tplfix   patch program for run time library file (turbo.tpl) newdelay   unit with delay replacement (good) and error trap (a bit dubious) rdelay   unit with delay replacement and runtime patch routine extract the file crt.dif from t7tplfix, apply the listed changes to crt.asm and then recompile the run time library yourself. (only possible if you have the source of the run time library, i.e. you have borland pascal, not turbo pascal.) note: if you have turbo pascal or borland pascal version 7.0, i recommend you contact borland / inprise to obtain version 7.01 because version 7.0 contains several bugs. lately there have been reports in usenet that borland doesn't know about a 7.01 bug fix version, it's still called 7.0, so it may be better to ask for replacement disks for version 7.0 (will come as one cdrom containing version 7.01). index of other solutions bppatch   solution by german computer magazine c't contains description, program patch, source patch and copy of patched run time library problem: rtl is based on version 7.0, thus reintroducing several old errors while fixing one new one, description and patch are very good though. bp7patch   patch program for all run time library files problem: does much more changes than can be easily explained tp7p5fix   tsr program, catches error while program starts problem: no description available how and how well this program works, probably only for programs that do not require precise timing tpbug   new tpl files problem: contain much more changes than can be easily explained comments looking through the list of files above, most of you will probably come to the conclusion that no real solution seems to be available. programmers using turbo pascal 7.01 can now solve their problem since t7tplfix.zip is available. programmers using borland pascal 7.01 and still must search and apply the patch themselves to get a working version of tpp.tpl (for protected mode). users without source of their programs can still not get a real solution if the programs rely on a precise delay function. such a solution will probably never exist. of the two files recommended by borland, one will cause the delay procedure to not run correct on fast computers, the other can be used only by owners of the full borland pascal package because the file tpp.tpl is required and it does a lot of suspicions changes to other units as well. by using any of the other files, you must send your customers a program that is patched to patch itself at runtime with even its authors saying that this is not very nice. or you can prevent the run time error but must live with a delay procedure that is known to run at unpredictable speeds. or you must persuade your customers to install a tsr program that you don't know precisely what it does. or you reintroduce all the bugs of borland pascal 7.0 when replacing a otherwise correct version 7.01 with a patched version 7.0. or you can used a patched run time library that contains a lot of additional changes that nobody has yet explained. it is a shame for borland that they seem to be unable or unwilling to solve this bug themselves and offer download of fixed turbo.tpl and tpp.tpl files from their web page! if you feel like you should say borland what you think about their support, please remember they have changed their name to inprise, so you may try mailing to customer-service@inprise.com (if you get a reply, please tell me). what's new 26-may-1999 new patch for runtime library of turbo pascal versions 7.0 and 7.01 a new version of t7tplfix.zip is available here. it is not able to patch the files turbo.tpl, tpp.tpl, and crt.tpu of turbo pascal and borland pascal versions 7.0 and 7.01. please note that i still recommend to update turbo pascal to the bug fixed version 7.01. that could already be patched with the previous version of t7tplfix. but if you don't want difficult discussions with borland, this new version of t7tplfix is an alternative to fix at least the most annoying bug of turbo pascal 7.0 29-sept-1998 similar bug found in windows-95 borland is not the only company that didn't expect computers to become that fast and thus having bugs in their progams: a similar error has been found in windows-95: on computers with an amd k6-2 with 350 mhz or more the driver ios.vxd causes a division by zero because it contains a timing loop that overflows on computers with too high speed. for more informations about this see www.amd.com/products/cpg/k623d/win95_update_k6.html. this problem is solved by the patch amdk6upd.exe that can be downloaded from microsoft (go to their homepage, click on search and enter the filename) or try this webpage (link probably works only limited time because microsoft often rearranges their web pages). 22-aug-1998 patch program available t7tplfix.zip patch for run time library turbo.tpl of turbo pascal 7.01 22-july-1998 new version of bp7patch.zip does not require tpp.tpl any more, i.e. works if you have turbo pascal, not borland pascal web-pages some other web pages that contain informations about this topic: official and of no big help: borland's pascal developer support intel developer support inofficial but much more help: j r stockton's borland pascal time and date page stefan göhler's tp-bug page franz glaser's pascal+delphi site (click on patches) more about borland turbo pascal: my pascal page other pascal pages last change: 22-aug-1998 collection and descriptions © 1998 by klaus hartnegg all information and programs mentioned herein are provided without warranty. use all on your own risk. best viewed with any browser. created using the semware editor and vi. ceterum censeo microsoft esse delendam. (counter started 21-july-1998)

Acceuil

suivante

fix for borland pascal "runtime error 200" bug on fast pcs  Business Objects Customer Assurance - Merge Modules  Quick Fix Meals with Robin Miller - Show List A to Z - TV - Food ...  The Knicks Fix  Microsoft Watch - Server - Microsoft's Fix for the Middle Child ...  fix: Definition, Synonyms and Much More from Answers.com  フィックスレコード公式サイト  zieh fix  The Joy of Flex » Blog Archive » More on fix to Leopard file ...  Vril's Transparent PNG Fix for WordPress  Tourism-Site-Fix  [Groupe fr-comp-reseaux-ip] : Dans quel connexion mettre mon IP ...  Idées fix(e)s - Skitour  Researcher releases unofficial IE fix for URI bug The Register   MG LSP-Fix 1.1  Amazon.com: FLIP: How to Find, Fix, and Sell Houses for Profit ...  Hex blog: Windows WMF Metafile Vulnerability HotFix  Paroles Fix You - Coldplay - Musique Ados.fr  Paul Fix Quotes - The Quotations Page  edgeblog » Daylight Saving Time - Windows Mobile Fix  Fix Slow Computer: spyware, trojan horse, virus removals  Advanced Registry Fix – Registry Repair  Toilet Repair: Leaks, Tanks and Bowls Toilet Repair Fix a ...  Angry-Fly.com: Fix for MySQL on Leopard  The library fix Salon.com  Harley-Davidson Maintenance - Do It Yourself DVDs  Proposal to fix Pacific with 'urea' dump - Telegraph  Outlook-QuoteFix - Home  Prototype JavaScript framework: Prototype 1.5.1.1 bug fix release  fix - Synonyms from Thesaurus.com  script-fix -- Screenplay Database  The Fix Bikes - Downhill, Freeride, Dirt Jump, All Mountain ...  How To Fix An Underexposed Photo PhotoshopSupport.com  High-performance .NET, C++ and Java FIX Engine – Onix Solutions  Blackhawk Software :: Registry Fix, Error Fixer, Online Privacy ...  The Draw System  Ablöse fix: Bewkes folgt Parson als Time-Warner-Chef  George Fix  Sommier LATTOFLEX LT25 Fix 2 pers. 140x190 Ferme / La Compagnie du ...  fix  Achat et location Fix Saint Geneys  Daily Herald Officials promise quick fix to state's finance woes  HYJEK AND FIX, INC.  Konrad Hornschuch AG - d-c-fix, dcfix, skai Klebefolien ...  How To Fix Overexposed Images PhotoshopSupport.com  Google Tries to Fix Broken Links  /IE7/  ONLamp.com -- How to Decide What Bugs to Fix When, Part 1  FairVote The Center for Voting & Democracy  Glisshop :: Conseils ski - Montage fix  Mike Volodarsky's ServerSide : Fix problems with Visual Studio F5 ...  How to Fix Shows Like 'Lost' -- New York Magazine  A fix for Suckerfish dropdowns in IE 7  SPLANN BLITZ FIX (l'éponge miracle, Eco logis, Eco respect ...  THERMAL FIX - Thermal Fix 2 - Tube  THERMAL FIX - Thermal Fix 1 - Tube  Windows MaxMTU Fix - HelpWithWindows.com  BW Online March 19, 2001 How to Fix America's Schools  Baseball Glove Repair And Restore  how to mend it .com - Find out how to mend just about anything  Actualité sur VJ FIX - Dates de concerts, albums, Mp3, vidéos ...