Solved

How to run an old dos program ( dos4wg ) on a 64 bit OS

Posted on 2011-03-02
7
1,864 Views
Last Modified: 2012-05-11
Hi!

I have a Windows 2008 64 bits server.  I also have a really old Fortran programs that was build using Watcom and the DOS4WG.exe program.

However, this programs does not work anymore because DOS4WG.exe is a 16 bits applications, and therefore it does not run anymore on that OS.

We tried DOSBOX to validate the problem, and our programs runs fine in that emulator.  However, for our problem, we need to be able to call the programs multiple times from scripts.

So we see two possible solutions...

1) Have a DOS4WG.exe 32 bits version, which I was not able to find so far ( or something similar that I could adapt my code for )
2) Using scripts to automatically launch DOSBOX, mount drives and launch commands

I got the code and it compiles fine with the latest version of Open Watcom Fortran compiler.

Thanks for your advices!
0
Comment
Question by:Francois_Tremblay
7 Comments
 
LVL 92

Expert Comment

by:John Hurst
ID: 35021677
For certain a 16-bit program will not run on a 64-bit machine and there is no way to make it so natively.

So you need to run DOS in some sort of emulator. You chose DOSBOX (fine); I use VMware.  So far, so good.

Now, you say run scripts to launch DOSBOX, mount drives and launch commands. Have you done this? My DOS 6.3 machine talks to 32-bit XP, but does not talk to 64-bit Windows 7. I have not figured out yet (a) will this even work? and then (b) if so how?  I don't think it will work.

I am not certain how to answer your question, but if you have not tested option 2, I don't know how it can work. .... Thinkpads_User
0
 

Author Comment

by:Francois_Tremblay
ID: 35021833
Hi again!

We already have a VM  ( Hyper-V ), but it's exactly where we don't wan to go.  We got a very nice server running fast on Windows Server 2008 with 64 bits application ( mainly Matlab ).  A small part of our engineering process use the legacy code.

We want to run several hundred thousands of run and , sadly, we need the input from the legacy part at each run.  They are meshed together.  

For this reason, a VM is of no help.  We could simply run it on a Windows XP box, but we would not have the power of our 12 cores, higher clocks, etc.

It's why we are looking at a way of running this in the 64 bits environment.  We also have a project to migrate the old code but it's going to take time and we would like to have a nice little workaround for the time being.

0
 
LVL 92

Assisted Solution

by:John Hurst
John Hurst earned 125 total points
ID: 35021884
If I were doing this, I would be inclined to get a Windows 2003 server to do what you want. I have played around with my DOS machine for a while and it simply does not work with 64-bits. A small server could do what you want (it must have before Server 2008 64-bit came along), so I would keep it in a legacy environment until your code migration is done. .... Thinkpads_User
0
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
LVL 59

Assisted Solution

by:Darius Ghassem
Darius Ghassem earned 125 total points
ID: 35023154
16-bit programs will not run on 64-bit systems.

http://support.microsoft.com/kb/896458

There is no way around this.

Even if you did get it to run you would not be using the 12 cores or memory that is installed on the server 16-bit applications can only use what they are limited too.

Only work around would be to install 32-bit system to run the 16-bit code
0
 
LVL 7

Assisted Solution

by:ednetman
ednetman earned 125 total points
ID: 35023980
VMware Workstation running in Unuity?  I know you want to take advantage of all the extra horsepower of the new server, but the 16bit application isn't going to recognize or utilize it anyway.
At least with Unity (or with VPC Windows XP Mode) you will be able to emulate a locally installed app.
0
 
LVL 7

Accepted Solution

by:
CSI-Windows earned 125 total points
ID: 35026692
It sounds like you were able to recompile the code in 32-bit with the latest compiler?

I would advise that you try to get off the 16-bit version while you have your attention on it (and many some resources from management?):

*) Trying to stay away from VMs is a good approach - especially when this software is providing a dependency direct to other software on the native machine.  Using VMs makes more sense for software that end users use directly in a self-contained manner (the software does not depend on or provide dependencies to other processes).

*) Test your re-compiled version extensively - make a test plan.  Ask users if they know of data that would help reveal possible problems with the fortran code.

*) Perhaps use a crowdsourcing site like elance.com to locate a fortran expert and have them validate that the recompile is truly going without a hitch - they may be able to tell by the code that where there is legacy fortran code that would change the core behavior of the software.
0
 

Author Comment

by:Francois_Tremblay
ID: 35030264
Here is what we found out.

DOSBOX configuration file contains an [AUTOEXEC] section.  This way, we can mount and run our script in that emulator and it works fine.

We just need to build a small wrapper to launch that DOSBOX process instead of our application directly from Matlab.

We also noticed that this old legacy code was done in Watcom with some Fortran 66 in it.  We will redo the code so that the input/output are not so strongly integrated, no common variables everywhere and do apply some very modern concepts called object oriented programming ( for what can be done in Fortran ).

To give you an idea, the people that worked on that were ph.Ds that retired a long time ago.

At least in the meantime we got something working.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now