What compiler(s) are used to generate OpenVMS binaries from its source files?
If it's gcc, that would be helpful. The gcc compiler already has a backend which can generate z/Architecture binaries with reasonably good (and always improving) optimization. And gcc supports cross-compiling on most systems. For example, it is technically possible to run gcc on Linux on a PC to compile source code and generate z/Architecture binaries. More realistically (since it's more out-of-the-box, and since you're going to want to test anyway) you'd have gcc running on Linux under z/VM. You could also use IBM's C/C++ compiler under z/VM directly, although OpenVMS has never been compiled with that particular compiler one presumes, so you'll be a pioneer. You may only need to get enough of OpenVMS compiled and running under z/VM to then run enough of its own compiler (with backend modifications) to get the rest going. You might even have several layers to this "bootstrapping," with progressively more function as you get more parts of the operating system working. If you'd like to experiment with building an operating system "from scratch" (from source code) under z/VM, just to get your feet wet, then you can try Gentoo Linux. For some more challenge (since no one has done it yet, as far as I know) you could try FreeBSD, OpenBSD, and/or NetBSD. OpenVMS would be an interesting project. If you do have to create a compiler backend, that's some work. But one thing you could try, at least for bootstrap purposes, is to keep an existing backend but do something like a "double compile." For example, if the OpenVMS compiler generates Alpha code (and you can output some sort of assembler source format, which is likely), theoretically you could write a translator that takes the Alpha code and converts it to z/Architecture, which you then compile. This probably works best for RISC architectures since z/Architecture is most likely to provide a perfect or near-perfect superset of a RISC instruction set with a relatively straightforward mapping. But you can look through the choices available for the processor output from existing compilers and then decide which one is the "closest match." Yet another way to do this bootstrapping is to get enough of the operating system running under something like QEMU. QEMU is an on-the-fly machine code interpreter, and it is available for Linux (including Linux on z) and some other operating systems. QEMU has some decent support for the Alpha instruction set. Here's a very brief summary of the Alpha instruction set: http://www.cs.arizona.edu/projects/alto/Doc/local/alpha.instruction.html Another option is SIMH, which emulates the DEC VAX instruction set. You could probably compile SIMH to run on Linux on System z without much difficulty: http://simh.trailing-edge.com More information here: http://www.wherry.com/gadgets/retrocomputing/vax-simh.html On-the-fly processor emulation should allow you to run OpenVMS in relatively straightforward fashion, but it won't be terribly efficient. You might have to "fence" with z/VM so that SIMH doesn't hog the CPU. (The SIMH Web site alludes to this problem. Apparently the emulator doesn't idle the host processor very well.) For a more traditional port, the tricky bits are generally in the I/O areas, but using z/VM is a very good idea as a target (to keep things simpler), and you would just slog through the most important I/O devices first. Basic TCP/IP (VT Telnet access in the case of OpenVMS) and disk support should be enough to get rolling. Bear in mind that almost anyone can get free access to IBM's Linux Community Development System. Details here: http://www.ibm.com/systems/z/os/linux/support/lcds/ This service is expressly intended for helping you to compile and test open source software, such as SIMH, so that you can release it for System z and share it with the world. The site to obtain OpenVMS is here: http://www.openvmshobbyist.com But it appears that HP's license is very restrictive, and it looks like HP may forbid compiling OpenVMS for other processor architectures (including even X86). So read all that very carefully. The license does seem to allow running OpenVMS (for non-commercial purposes) under SIMH under Linux on System z (for example). So perhaps your best bet is just to share SIMH z/Architecture binaries with the rest of the world. Sounds fun. Good luck! I expect to see pictures on the Web before the end of the year. :-) - - - - - Timothy Sipples IBM Consulting Enterprise Software Architect Based in Tokyo, Serving IBM Japan / Asia-Pacific E-Mail: [EMAIL PROTECTED] ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

