Porting DOS Applications to Unix?
jgbustos asks: "I'm the manager of a small software development company. For the last five years we've been managing a communications network consisting of several thousand PC terminals which connects to an NT server over the phone lines. The terminals run a console application on a light DOS. Everything is fine so far. So what's the problem, then? We have a hard time finding parts to maintain the network. Our client says that he's willing to invest in hardware upgrades, but we should move to a Windows-like environment, however he doesn't want to pay for more than 4000 Windows licenses. What's the best alternative for porting our app to Linux/? Please bear in mind that the terminals are small PC's having 16MB RAM, less than 2GB HD, less than i586 CPU, and a 33k modem. Thanks in advance"
What do you mean - they just want a GUI?
In any case, I bet you could find a linux or BSD distro that runs small and runs a windowserver. Though you might just want to try and find a dedicated browser and go for a web solution. If the client can just dial up and PPP to you and fire up a browser, you don't even have to worry about distributing updates to your software - just updating the server.
Really, more info about the problem domain would help...
I remember a program called DOSEMU for System V UNIXware. It worked well enough for me to run most DOS programs on my 386 running UNIXware. I would test the emulation layer first, and then look at making a custom linux image for the PC's. Something like Systemimager should work nicely for distributing the install.
So, do you want to port the app to a command-line form running on Linux on the current hardware? (0.02USD: ncurses, slackware) Or do you want to port the app to a GUI form running on Linux on newer hardware? (0.02USD: any number of toolkits, any number of distributions) Obviously as the second route is the greatest change, the variables are more numerous giving you a much wider of range of options to look at. I'm guessing your current programmers are C or Pascal folks? You might consider using GTK+ (GUI Lib written in C, also has bindings for FreePascal). As far as a linux distro for the more open-ended situation goes, I'd have to say debian. The install can be a bit of a pain for the uninitiated, but it more than pays back that annoyance after install becuase with the very intelligent package management system you can do stuff like point the terminals at a central server to pull updates from (e.g. roll your app in to a .deb, have terms auto-update once a week using a cron job, makes deploying patches and security updates easy as pie). Debian will also work in fairly constrained hardware environments like slackware, but it tends to be a beefier install usually.
News for Geeks in Austin, TX
#2. What's the DOS app, do you have source? What does the DOS app do?
#3. Why not just roll out replacement terminals as needed, instead of en-mass? You could probably use FreeDOS instead of MS-DOS, and set up a new machine ($200 walmart variety) to do exactly what you need.
Please... thats all we need is more DoS tools on Linux, so all the script kiddies can brag about how l33t they are...
Make the code their own DoS tools, like we did back in my day... in machine code
I assume by that you mean DOS disks/licenses? DOS runs just fine on modern hardware.
Anyway, there are alternatives to porting, such as using an emulator. DOSemu, DOSexec are names I've heard, or Wine would probably work too (but be a bit bulky). Or you could try FreeDOS, although modem drivers might be an issue.
If you're hell-bent on porting, though, there are a lot of variables involved that you haven't supplied us with. What language is the app written in, for example? Was it written with portability in mind, or is it dependent on proprietary libraries? What does it do, and are any OSS projects that do the same thing? Without that information, no one is going to be able to give you a real answer. Maybe it will work with just a recompile (have you tried that yet?), or maybe it will be easier to start over from scratch. No one can tell without info!
Why have there been so many "I want to port arbitrary software to Linux" questions with no accompanying details lately? How the hell is anybody supposed to answer these?
Under capitalism man exploits man. Under communism it's the other way around.
with either new hardware + new Windows software or just new Linux software on the old hardware.
If that's the choice, go with Windows + new hardware, and warn the client that the bill will rise as you finish the migration. The Linux option has been painted into a no-win situation because software-only can't solve a hardware problem. This is reminiscent of the old OS/2 days, when it was roundly criticized for not running well in 4MB, and then they'd go off and buy 16MB to run Windows.
If you're serious about offering choices, prototype a Linux solution on one machine, so you can show the UI. A Windows prototype shouldn't be necessary, since everyone assumes it can be done. (I won't justify that assumption, but it's common.) Then put together a bill for both options with the full migration.
Then let the customer decide, and pay.
The living have better things to do than to continue hating the dead.
We are porting specialists. We move anything to anything.
www.sector7.com
If tits were wings it'd be flying around.
Short answer: No.
Longer answer:
In DOS, you have full access to the hardware. This means that you read and write registers and I/O ports directly. Many DOS apps wrote directly to video memory for example. Most programmers did this for performance reasons, AND that it was easier.
For example: Let's say you had a form onscreen to fill out. What you did was use a ASCII screen designer tool that allowed you to play with all the attributes, and dump the contents of that to a file. This file could be included with your app (in a header file) or loaded from disk at runtime. Of course there were many other ways of doing this.
Since this guy uses a modem, he probably purchased one of the communication libraries that had x/y/zmodem, etc. and handled all the ideosyncracies of the 8250/16550 comm chips.
You also had to play lots of tricks if you wanted to access memory above 640K - you needed to run something like a DOS extender (PharLap comes to mind.)
So, no. It's not just a recompile. It's a port.
The terminals run a console application on a light DOS. Everything is fine so far.
A "console application" connecting to a server via DOS? I bet his "console application" is a telnet client!
freedos is free. it's about 3mb, with all the options installed, and runs on current hardware, and supports neat things like USB and (i think TCP/IP). then you don't need to port anything, and it runs on current hardware (or, at least my 5 year old amd k6-2 300, so probably anything that supports x86)
if all you're doing is running a console app in dos, and your infrastructure is built around this, it seems far simpler to just go the way of freedos
moox. for a new generation.