We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Stack overflow in old DOS program under Windows XP

gato-san
gato-san asked
on
Medium Priority
2,031 Views
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.

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?
Comment
Watch Question

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)
CERTIFIED EXPERT
Top Expert 2007

Commented:
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 !
CERTIFIED EXPERT
Top Expert 2007

Commented:
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
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

Commented:
I compared with several old outputs. All features seem to be ok.
Good job, nice find
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.