Stack overflow in old DOS program under Windows XP

Posted on 2009-02-18
Medium Priority
Last Modified: 2012-05-06
I use an old DOS based engineering calculation program named ESTRUCT.EXE using the DOS console under Windows XP professional SP2/3.

If I reinstall WIndows XP the application runs fine. But after some time, perhaps after doing something else, the program returns an error:

(C) Copyright 1985-2001 Microsoft Corp.


? Error: stack overflow
  Error Code 2000
PC = 25AC: 122E; SS = 23A8, FP = 000C, SP = 2580


I already modified the CONFIG.NT and AUTOEXEC.NT. Also, I tried restoring the files from c:\WINDOWS\REPAIR.

It seems to me that something changes in Windows. So far only a reinstall works for me but that is too much work.

Any ideas on what could possibly be happening?
Question by:gato-san
  • 3
  • 2
  • 2

Expert Comment

ID: 23673791
1) Right click, properties, compatibility tab, enable compatibility mode
2) Try running the application with the 16bit COMMAND.EXE command interpreter.
3) Install MSDOS or Windows 9x on a virtual machine (MS Virtual Machine and Sun Virtual Box are both free)
LVL 63

Expert Comment

ID: 23674299
Other options, turn on restore points in XP, and restore to a previous point that worked OK.

Also there is a program called apcompat that helps with DOS settings.

I hope this helps !
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.


Accepted Solution

gato-san earned 0 total points
ID: 23677733
After much diggin' and trying I fixed the problem.

The program worked fine in VirtualBox with WinXP but it was too much of a mess to run all the system there.

I used exehdr.exe which is included in MASM 6 and changed the "initial stack location" value.
Originally it was 0x0800 and first changed it to 0x0c00 as suggested in the link below.


With that setting the program worked (no error messages) but the results returned were garbage. So I changed it again, this time to 0x0900 and KAZAAAAM!!! it all worked very well.

Thanks for pointing me to VirtualBox and VPC I heard of those but had no clue that were free.

Now, can I put those points to myself??

Thanks and bye

RCZ La Paz - Bolivia

Expert Comment

ID: 23681162
I hope that by modifying the memory pointers you do not skew the required results. If it turns out that this was the appropriate solution then congratulations and good job!

Author Comment

ID: 23682388
I compared with several old outputs. All features seem to be ok.

Expert Comment

ID: 23726663
Good job, nice find

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question