I needed to read some old files I wrote in 1992 using the Ashton-Tate
Framework III program.
Unfortunately, trying to run the program under Windows XP resulted in a
Divide overflow" error.
A bit of searching on the web revealed that the problem was related
to the system's speed (1.6GHz).
Apparently, Framework tries to calculate the speed of the machine
by dividing a fixed number with a loop counter;
on modern machines this results in the overflow.
Some newsgroup postings advocated using a program called moslo to slow down the machine. This did not work for me; probably the free trial version of moslo was incompatible with modern versions of Windows. I therefore decided to test my luck patching the application.
At that point I realized that many of my tools (debuggers, disassemblers) were incompatible with non Win32 applications. Working with legacy systems is not trivial. I resorted searching the file's hex output with vim (in hex mode), but did not get very far.
The next try involved debugging the program with the MS-DOS debugger debug.exe. The DIV instruction overflow generates an interrupt 0. I dumped the four bytes at the vector 0 (0:0) and set a breakpoint there. When the breakpoint was reached, I could examine the stack (SS:SP) to see the address that generated the overflow interrupt. The address contained a DIV instruction; replacing it with two NOP instructions solved the problem. I was glad I could still remember the intricancies of the Intel 8086 segmented addressing, and the various debug commands.
I wrote a small patch program (executable knowledge, in the words of Phillip Armour) in case somebody else encounters the same problem. I hope this blog entry and Google will point toward the solution.
It is amazing in how many different ways legacy programs can fail. On the other hand, I was thrilled to browse Samba network drives located on a FreeBSD server using Framework's file browser. None of the software systems I used was available at the time the program was released (late 1988).
Read and post comments, or share through
Last modified: Thursday, August 12, 2004 9:47 am
Unless otherwise expressly stated, all original material on this page created by Diomidis Spinellis is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.