The CUPS Utilities


Several of the advanced Physics courses at Lafayette use texts from the Wiley CUPS (Consortium of Upper-Level Physics Software) series. Unfortunately, it appears that books from that series are no longer available.

A web site originally developed by the directors of the project is still available at the CUPS site at George Mason University, though the "last modified" date listed is 1999.

PROBLEMS and SOLUTIONS


Runtime Error 200

Problem

If you are running a CUPS program on a 200 MHz or faster machine, you may get the error message:

Runtime Error 200

There used to be a wonderful site with a detailed explanation of the problem at http://www.brain.uni-freiburg.de/~klaus/pascal/runerr200/, but that site is no longer available.

In brief, this is a Borland Pascal problem in the startup code of the Delay routine, which is part of the commonly-used Crt unit. The Delay routine attempts to calculate how many iterations of a simple loop are required in order to delay for 1 ms. On fast machines, the result doesn't fit in the destination registers, resulting in 'runtime error 200'. Full details are in the documentation.

Fix

It is usually possible to patch the .EXE programs to avoid the runtime error. (The delay times may be incorrect, but that often doesn't matter for CUPS programs.)

This fix is due to Andreas Bauer, and many thanks to him for making this program available. But first, to repeat and amplify his disclaimer: I'm not responsible for any action that is performed by TPPATCH, nor do I give any waranty about the function of it. It is totally without warranty of any kind.

Download the following files: (Note: With some browsers, you may have to right-click on the link in order to download the file, instead of running it. With other browsers, you may have to hold down the Shift key when you click on the link.)

  1. tppatch.txt. This is the English documentation for the tppatch program. (The original is in German.)
  2. tppatch.exe. This is the executable program. Place it in the directory where you have unpacked the CUPS programs (or anywhere else in PATH). By default, this is C:\CUPS, but you may have changed it to something else.
  3. Since you may have to patch every executable in the CUPS distribution, and since such an obvious-looking command as tppatch cupswo\*\*.exe doesn't work, you will probably want to use a batch file to run the necessary commands. Download the patch file appropriate for your CUPS product. If no batch file is available, don't worry -- it's not really very complicated. Read one of the existing batch files and just execute the appropriate commands for your product.

    Alternatively, the cupsfix.bat batch file from the CUPS site at George Mason University may work, but I have never tried it.

    Put the batch file in your C:\CUPS directory (or wherever you installed CUPS) and run it from that directory. The easiest way to do this is to start a DOS command window, change to your CUPS directory, and run the batch file from there.


This page is maintained by Andy Dougherty