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"
it may be helpful, but they might come after you
:P
who knew using 'net send dorkus bwahahaha' would be so much fun on unix?
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...
Neeeeeed inpuuuut.
What does this abmiguous "software" do?
More than likely there is a free alternative already, or in the works. Give as much info as you can without giving away trade secrets.
/* oops I accidentally made a comment, sorry */
I'm now going to shove my foot in my mouth. There. Couldn't you pretty much just recompile?
Why not fork?
There are couple of tools for Linux that will run MS-DOS executables. One that comes to mind is dosexec. Although I've never had the need/desire to run MS-DOS programs under Linux so I can't tell you how well any of them work.
What exactly was the reason, again, that you have to upgrade to either linux or windows?
/EISA switch so it'll use upper memory on machines with more than 64MB of memory.
You're having a hard time finding 'parts'???
Go to your local computer store. If you need a motherboard, get a motherboard. If you need a processor, get a processor. Etc, etc, etc.
There are valid reasons to upgrade software, but hardware shouldn't be one of them.
I do the computer side of a small video chain. Each store has a novell server, and multiple dos workstations. I'd like to put it all on linux so the interoffice communication can all be done via tcp/ip with the modems. There are other reasons. Unfortunately the software we're using requires IPX for the hardware key, so that's impossible in my situation.
However, we're running 1.4GHz machines in some stores (ie, a $250 machine) as workstations with either a boot floppy or compactflash. There are no problems with running dos on these systems, except that we have to use DEVICE=HIMEM.SYS with the
So, tell us again why you can't find hardware for your current lite dos systems?
-Adam
If you have a terminal server, and export the display to every machine, that might work.
:P
You'll most definetly want to turn on compression.
You'll have to try it to see if it is usuable tho over such a slow modem.
As to porting the dos apps to it - depends on the dos app
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
Is there anything happening from the Terminals or are they just displaying information? Can you screen scrape your existing app, send it over the web, and then have all the wimpy boxes out there run Lynx/Lightweigh browser of your choice?
Open Source Identity Management: FreeIPA.org
#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.
try a windows emu like Wine (www.wine.org)
"less than i586 CPU"
How much less? If less than i386 you're SOL.
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
He's got 4000 users and they can't afford to negotiate with MS for a site license?
Are you trolling?
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.
Try dosemu or wine and see if they run under one of them. It may be possible to switch to Linux first then port the apps to Linux. Also you could try using QT or Java, then you would not have to worry about 4000 windows.
Only 'flamers' flame!
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.
www.svgalib.org
--
"we live in a post-ideological world..." - Billy Bragg.
Alright, I'm lost. This is ask slashdot. Normally, people post questions here. You gave us your situation, and then thanked us for help in advance. You forgot one minor detail.....the question.
You should at least evaluate VMware workstation (free trial link: http://www.vmware.com/vmwarestore/newstore/wkst_ev al_login.jsp). You could move to Linux or Windows, run VMware, and run the app within a DOS virtual machine. Since you'd run the exact same app on (if you wish) the exact same version of DOS, you wouldn't have to worry about porting, compatibility, or hardware issues.
--JRZ
OTOH, if you wrote it in C, most of it is going to port right over, except for where you're doing hardware access. Some of THAT will port over too but no matter what you're not going to get out of rewriting your display code, since I'm guessing you're doing direct video access regardless of what language it's written in.
If you wrote it in C, you should have no problem provided you haven't forgotten how to write C. If it's written in assembler, you might be better off using it for a reference work and reimplementing it. In C :)
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
We are porting specialists. We move anything to anything.
www.sector7.com
If tits were wings it'd be flying around.
Try FreeDOS (www.freedos.org) or DR-DOS (www.drdos.net). They are drop-in (more or less) replacements for MS-DOS.
Ok I am going out on a limb and guessing that you do NOT have the source code for this application, and that the original developer (the only guy on the planet that would actually understand the source code if it was available, which it isn't) isn't available to help you with this project.
If your client can't afford (doesn't want to pay for) seats of the operating system for new hardware, on top of the cost of 4,000 new systems, you absolutely positively cannot afford the cost of a custom developed solution that involves reverse engineering the DOS app and trying to code an identical app under *nix that still talks with your servers over IPX.
Custom development runs $400 a day on the extremely cheap side (you find contractors that know what they are doing for $50 an hour) to $1600+ a day for consulting firms to provide you with their staff.
Your best bet would be to find a bulk supplier of retired hardware - if you could get a truckload of 486 boxes with drivers and external modems (beware the WinModems) just buy them by the pound and use them with DOS and your apps.
Glonoinha the MebiByte Slayer
Doesn't sound like it would be too hard to port.
Upgrades for what? Tell me again what your problem is, and why exactly you need to invest in new hardware and/or new software?
OK, this sounds like the same clueless assholes whole replaced the $250 dumb terminals at the local library with $1250 Windows PCs. (The PCs perform the exact same function as the dumb terminals: card catalog lookups. Pentium CPU, 32 meg RAM, Win95 -- and the only app they run is a terminal program to connect with the mainframe in the back room.)
Do you know about FreeDOS?
Do you know about Turbo Vision? It makes nifty DOS or Linux apps that look and act like Windows but run in text mode.
For some reason this sticks out in my mind. I remember reading somewhere that DOS itself will boot up and run on a modern computer but some apps won't run properly on anything above a pentium 90. I wish I could remember where I read that bit at. I think it was some rant about running windows 3.1/DOS on a modern computer and how fast it was compared to other operating system's GUIs but the article stated that some poorly written/designed DOS apps wouldn't run well because the computer was too fast and would sort of get ahead of itself and crash. maybe someone could coroborate that.
--
What is pirate software? Software for inventory of stolen treasure?
I can see some situations where that would be true, but it would not be the fault of DOS, other than the fact that it happened to be popular during the time when it was still practical to count clock cycles for operations. I use DOS on modern hardware regularly, with no issues, but I use a very narrow range of applications, some of which are even still maintained. Maybe there could be some problems with out of order execution, but I thought that OOO capable CPUs were supposed to be able to handle that gracefully.
Under capitalism man exploits man. Under communism it's the other way around.
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.
allot cheaper to buy new hardware running bsd, GNU/linux then it would to buy windows licenceses.. I can pick up a P200 64meg 2gig for under 90quid here, around 70 if bought in bulk...
moo
You, as system supplier, have some sort of maintainance issue with the current set-up, the nature of which is not described in detail, unfortunately, but I can understand that identifying the particular application on /. may not be the best way of endearing yourself to the rest of your company and its current client, especially if, as it sounds, it's a custom implementation for that client. Meanwhile, the client is saying that if the setup is going to have to be be changed anyway, then they want to take the opportunity to upgrade the application and make it... what? Just prettier for the sake of it, or a more common PC-like look and feel so that there is less sniping from their customers about it being primitive and out-of-date? Or do they want added functionality as well? Are the existing central servers sacrosanct, or can that part of the app be adjusted, too?
I've got no concrete suggestions, but as this response indicates, I'd personally be inclined to sit down with the client and explore what they want and their reasons for it, and then, and only then, evaluate the approaches you collect.
It sounds like your setup would be a prime candidate for a *nix/*BSD (or anything that comes without an expensive license)... But if the hardware isn't old-enough, you'll be looking at quite a few winmodems in that pool of 4000 clients or was this considered when buying the client-h/w in the firstplace?
Comment removed based on user account deletion
Mr. Bustos,
.es domain is not) that a decent PC with warranty can be had for less than a MS Windows XP license from Walmart.com. These new PCs will include Linux preloaded. (I recommend the Mandrake Linux loaded PC.)
With an environment that is this old, I would recommend, for both your sake as well as the client's, to look at a full Linux migration. This migration should be looked at from many angles in order to save money.
First, are any of these remote PCs in a common location? If so, a single faster internet connection should be looked at. You could set up a small connection sharing/DSL network at the remote site(s). If enough connection consolidation can be done some money can be saved on a monthly basis. It will also cut down on the number of modems/phone lines to maintain. Even if you switch to a secure VPN over the Internet for each modem, the central computer only needs a single high-speed (DSL, cable modem, T1, etc.) network connection. This alone should save tens or hundreds of thousands of dollars per month on phone lines!
Second, port the application to Linux. Linux is a robust platform that will be supported for many years. DOS is not. NT is not. Microsoft is barely even supporting NT at this point. If it is written in C/C++, all the better. It will be a quick conversion. If not, it's worth the effort.
Third, If the client buys into the idea, look at replacing the PCs with newer hardware. I know that in the US (I'm assuming that the
If he likes the idea, buy just a few PCs at first. Get the programming glitches worked out and the communications tested.
Once the program/new environment is good to go, set up the new server and let some users try it beside their old setup for a week or two. Setup some basic training materials (maybe even a basic training class). Get the users trained on it while the PCs ship out but before rollout. THEN do the cutover.
Your client should be pleased with both the switch as well as the future ability to use the platform for other things. Whether used in text mode or GUI mode, Linux is a powerhouse that is a good investment.
Good luck.
If you need some help, shoot me an email or post it here.
Randy
PS: If you're company is not yet adept at a Linux conversion/rollout. This kind of contract would be great to get your feet wet and grow that side of the business.
--==-- I've found Karma to be a relative thing... Ya know, the kind you invite to Christmas...
Uh...sorry if this is redundant, but what exactly are you doing with this, exactly? What sort of company? What software? Why do you need to upgrade? It sounds like you just are upgrading for the sake of upgrading (or because somebody wants to for the sake of upgrading). My suggestion: overhaul everything. New software, new servers, everything. And then have some cake.
and I'm glad too. However, I'm saying its entirely possible that all the functionality you want is there.
As to having IPX available to existing code within a dos emulator, probably not. Sorry. But if you can recreate the client in native code, you can talk to the server using the aforementioned guide.
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON