Stack overflow in old DOS program under Windows XP

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.

D:\UTILS\ESTR>estruct

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

D:\UTILS\ESTR>

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?
gato-sanAsked:
Who is Participating?
 
gato-sanAuthor Commented:
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.

http://objectmix.com/asm-x86-asm-370/256335-re-stack-overflow-error-2000-a.html


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
0
 
Justin_W_ChandlerCommented:
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)
0
 
SysExpertCommented:
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 !
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Justin_W_ChandlerCommented:
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!
0
 
gato-sanAuthor Commented:
I compared with several old outputs. All features seem to be ok.
0
 
Justin_W_ChandlerCommented:
Good job, nice find
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.