One of the best things to do with a Linux box is to run programs for other operating systems on it. It can simplify your life considerably.
Companies spend millions on "server consolidation" in hopes of reducing maintenance, administration, and even heat burdens. They're usually just moving between different flavors of UNIX, though.
What they often don't realize, however, is that the range and quality of Linux-hosted OS emulations -- some of them rather old, like CP/M, RSX, OpenVMS, and DOS -- are quite high. Moreover, companies don't always understand just how much this software can enhance the convenience of server-room operations.
That's part of the mission of Server clinic, of course. Over the last year, this column has focused on a variety of automations that work perfectly well under Linux, although they're not widely applied: Fortran applications, PDF generation, Word document management, construction of Windows executables, and more. This month, it's time to see how much help Linux can be for those working with "minor" legacy OSes.
Suppose, for example, you need to run a few CP/M programs. How could you "need" to run an OS that was obsolete twenty years ago? If you develop for embedded systems, such a need might be quite real for you. In contrast to information technology, where products are updated at least annually, many embedded systems are supposed to run quietly on their own for decades at a time.
This presents at least a couple of development problems, which system consulting engineer Rene Tschaggelar summarizes: "Considering that embedded systems run for 10 to 20 years, perhaps even longer, one has to be able to support them that long." Someone does indeed need to maintain them, and that has generally meant keeping legacy equipment and programs in a back room somewhere to handle occasional emergencies.
That's expensive and often unpleasant. Parts for old CP/M-ready S-100 boxes are hard to come by. It's hard telling customers that you can't meet a commitment because someone accidentally threw out what you'd archived on eight-inch diskettes (those really were floppy). A serious alternative is to create a virtual CP/M host inside one of your Linux machines. Notice this doesn't just give you a more manageable or affordable virtual CPU; by working from your installed file systems and hardware, you also unify your maintenance practice with all the infrastructure you already have in place, including facilities for version control, archiving, remote access, and more.
The hazard of emulation for this situation is that the emulator won't reproduce the behavior of the original hardware with the fidelity you require. Plenty of users, however, do report satisfaction with existing emulators. As open source software, moreover, there's a good chance you or a specialist working for you can make any corrections you need.
What's it take to make virtual CP/M work, then? Not much. Dozens of distinct emulators are available. My current favorite is Andreas Gerlich's YAZE 2.0. It installs and launches easily, yet it also includes a great deal of flexibility to accommodate unusual hardware or other requirements. To use it, simply download it (see the link in Resources), unpack it, generate it with:
make -f Makefile_linux
and begin executing:
./yaze.bin
You'll soon see a display such as:
A>dir
A: CCP COM : CPM3 COM : CPM3-OK COM
A: 3ERASE COM : 3SETDEF COM : CMP COM
A: COMP COM : CRC COM : DED COM
A: DIFF COM : E COM : I COM
A: II COM : L80 COM : LC COM
A: MAKE COM : MERA COM : MMUPRINT COM
A: MOUNT COM : PAUSE COM : PIP COM
A: PMARC COM : PMEXT COM : S COM
A: SENDUUE COM : SUB COM : SUBMIT COM
A: SYS COM : TABS6 COM : TOUCH COM
A: UNARC COM : UNLOAD COM : Z80ASM COM
A: ZEXALL COM : ZEXDOC COM : ZSID COM
A: 0-README 1ST : CRCKLIST CRC : DISKS TXT
A: MAKE DOC : MOUNT Z80 : PROFILE SUB
A: SYS Z80 : TABS6 DOC : TEST SUB
A: TOUCH DOC : UNIXMAKE MAN : WWW TXT
A: YAZERC TXT : Z80ASM DOC
The default YAZE configuration locates one on a (virtual) A: drive, on which Gerlich has the most essential commands: E.COM, HELP.COM, and dir. Note that execution of E.COM is the standard way to leave an emulation session.
So, if you have a long-standing intent to re-compile an old device driver, or if you need to run an ancient embedded system development kit to wrap up a commitment to a particular customer, there's no reason to delay. You don't have to repair your old hardware. Just install YAZE on any handy Linux host, copy your work into its virtual machine, and finish your project.
Emulation is also available for plenty of other computers of the same vintage, including the C64, MP/M, and CP/M-86 computers, Sinclairs, Apple IIs, and many more.
OpenVMS makes for an interesting contrast. Roughly the same age as such microcomputer OSes as CP/M, OpenVMS is entirely different in its licensing and technology. OpenVMS is still available for sale, and it remains a potent, serious product; OpenVMS has long offered distributed file systems, cross-language interoperability, and clustering, for example, that were ahead of other commercial OSes.
OpenVMS hardware is expensive, though, and likely to remain so. It's hard for organizations to justify annual maintenance costs of tens of thousands of US dollars or more if they only have a few OpenVMS applications that are "mission-critical."
Linux comes to the rescue again. A properly outfitted Linux server can emulate the hardware for a licensed copy of OpenVMS, at a far more modest cost than the one to keep a legacy host humming for just a few useful hours a year. This alternative is important enough that there's even a commercial product, Charon-VAX, dedicated to such emulations.
The SIMH project aims to do much the same for an entire range of dozens of older systems, including the 1130, Eclipse, Altair, Interdata 16b, and more.
The emulation universe has a few gaps. MPE/iX, like OpenVMS, is a "midrange" OS with a vibrant, active user community and a great deal of interest in Linux emulation. While an emulator is likely for MPE/iX, it's not likely to appear until 2004 or 2005, after certain licensing details have been resolved.
Another reality of working with emulators is that they're not documented in a comprehensive way. Many of the pertinent links on the Web at large have grown stale. Moreover, quite a few of the authors of emulators have outgrown their need for them, so they no longer support their creations.
Still, the advantages of emulator hosting are enormous for many operations. With Linux, you don't have to let a lack of hardware get in the way of running the software you want.
- Participate in the discussion forum.
- Check out the other installments of Server clinic.
- Cameron is collecting references to material pertinent to this installment of Server clinic in a page of personal notes on emulators.
- The best-maintained "jump page" for emulation of Z80 is part of Thomas Scherrer's Z80-Family Official Support Page.
- YAZE is a particularly accurate Z80 emulator that makes essentially all of CP/M 3.0 available under Linux.
- Michael Haardt, original author of YAZE, also has written cpmtools, which accesses CP/M file systems.
- If you depend on VGA, the floppies, or EMS of an original 8086-class personal computer, David Hedley's open source pcemu project, as updated by David Given and Michael Hope, might interest you.
- As OpenVMS was a mark pioneered by the Digital Equipment Corporation (DEC) before its acquisition; the DEC Emulation Web site is the place to start researching OpenVMS emulation for Linux.
- CHARON-VAX is a family of products that emulates the VAX architecture on which OpenVMS first appeared.
- VAX for Linux is an open source project hosted at SourceForge.
- The Computer History Simulation Project, commonly abbreviated as SIMH, covers an enormous range of architectures.
- "JOYCE emulates the Amstrad PCW on Unix or Windows," according to the JOYCE home page.
- Several previous Server clinic installments explain how to do jobs on Linux that many programmers believe must be hosted elsewhere, including "RTF on the server" and "PDF for the server". Cameron also discusses another legacy problem that Linux is well suited to solve, in "Fortran, at home on Linux".
- Those who want to pursue "retro-computing" emulation to its limit should know about the C-ONE Reconfigurable Computer, which emulates other computers by reconfiguration of its field-programmable gate arrays (FGPA) hardware.
- This column focuses on emulation, but there are other ways to access legacy applications, of course, including the "portlet" solution explained in "Bring legacy applications to the Web with a portal solution" (developerWorks, March 2003) on CICS, VT, and related host legacy applications.
- Not only is Linux good for hosting other OSes, it can also be hosted, in particular on z/VM, where it's possible to run multiple independent Linux instances on a single mainframe. This Redbook gives an overview of Linux on the S/390, and you can find an extensive listing of additional resources at the Linux on zSeries library. A listing of free downloads is available at the Linux on zSeries download page.
- Find more resources for Linux developers in the developerWorks Linux zone.
Comments (Undergoing maintenance)





