Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Devide by Zero.

Devide by Zero.

Devide by Zero.


This question is less about XP and more about Windows.

I am trying to get Autocad 12 to run on a newer computer. It installs just fine but when you go to run it you get an Divide by zero or overflow error!

It runs fine on an old computer under Windows 98.

In looking everywhere the general consensus seems to be "it is because the computer is running too fast".  I could more easily understand that it is because we've gone to non 8087 math co-processors, or operating system changes, but speed?!?!

I am trying to understand why/how code could be written that would allow an answer that came back more quickly from math hardware to cause this problem.  I could image the opposite, an answer that came back too slowly, but too fast?

Anybody know the reason or could illuminate how speed would play in this?

RE: Devide by Zero.

Almost all code that causes the Divide By Zero error on faster machines is due to the use of software timing loops rather than the use of hardware based timing. These loops were almost always used to introduce a delay in processing so something else in hardware could finish. Since new PCs are now vastly faster than the platform the code was originally written for, these software timing loops are running that much quicker. Consequently code following the loop is executed sooner than what was intended, and erroneous values are being obtained from the hardware and used by the program.

RE: Devide by Zero.

This does not refer to your application, but does support the "too fast" scenario.

Error: Divide by Zero

When Foxpro for Windows is launched, a timing loop is executed. On fast computers (Pentium 333Mhz+ machines), the timing count can become huge, resulting in a 'divide by zero' error. Thus preventing you from running FPW. Microsoft offers a utility to patch Foxpro 2.6a for Windows and it's asssociated runtime. Called PATCH_26.EXE, you can find it on the Microsoft download site, http://www.microsoft.com/downloads/search.asp. Search in the "Foxpro 2.6 for Windows" area for "Fix for Divide by Zero on Fast Computers".

PATCH: Patch_26.exe Fixes Divide by Zero Error on Fast Computers

These might be more helpful to you?



RE: Devide by Zero.

Thanks for your help guys! I have got it licked!! BOOYAH!!

Essentially all apps written using a particular form of Pascal had this problem.  The error is actually an overflow rather than a divide by zero.  What happens is the software tries to take the measure of the system so it can adjust the functional speed of the product to keep it looking approximately the same on different speed systems. On computers over a certain speed the hardware timer used over-flows because of the high instruction speed of the faster processor.  Sadly this feature probably wasn't even used in most products but the test was automatically done.

The Foxpro problem was remedied by actually hacking/patching that bit of code. That means that fix won't work on other things in-fact not even on some versions of Foxpro.

I found my way to Mo'Slo:

This guy makes a tiny tight app that allows you to change the comps speed. It has a huge range from 0.01% up to 99%.

This did the trick on any computer I tried it on!

Furthermore it only slows the computer for individual apps that you run under Mo'slo.  Also you can have it stop slowing the app after a set time.  So now Acad 12 really rips after the 5sec slow period needed to hurtle the speed test.

Thanks for your links they helped me draw out the solution.

RE: Devide by Zero.

To be more specific, the Pascal CRT unit had a timing loop in it for various purposes.  Any software that used direct video writes under DOS used the CRT unit and therefore these timing functions.  Not ALL old Pascal apps, but ones that used the CRT unit.

If you want to try it, if you can verify the executable is a Pascal one (as opposed to other compilers), you can try applying some of the various execution-time fixes for this problem that were produced.

RE: Devide by Zero.

Thanks for those details Glen as it makes even more sense now.  That era ACAD was heavy into unique video drivers and later versions flipped to using native Windoz stuff.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close