Similar to this question, but generalized to any mainframe computer from before the microprocessor era, does there exist an emulator and OS for a vintage mainframe computer that will run the output from a working FORTRAN compiler, from FORTRAN source code written on a contemporary system.

The goal is for a student to be able to write code in an early programming language version on a student's laptop (or Pi, etc., without the need for an actual noisy card punch); but then check that the resulting code might actually have run on an old mainframe by using a reasonably accurate emulator (prefer cycle accurate, but not absolutely necessary) and seeing the (emulated line printer or whatever) output.

  • 2
    What do you mean by "run the output from a working FORTRAN compiler from FORTRAN source code written on a contemporary system"? Are you asking for a mainframe emulator for a vintage mainframe that can run modern code? Or do you have a modern compiler that can target the instruction sets of the older mainframe? Or are you just asking for source-code compatibility between your modern compiler and whatever runs on the emulator? Please clarify. Commented Jun 23, 2017 at 18:45
  • 1
    For example, write vintage FORTRAN code on a student's 2017 MacBook, but run that code on a (for example) 1965 IBM 360. Modern code is not acceptable, vintage FORTRAN that would run if I actually had a working card punch and computer history museum mainframe is what I want to code in. I don't care where the compiler runs, as long as there is a working clean path from source code to running on the vintage CPU.
    – hotpaw2
    Commented Jun 23, 2017 at 19:07
  • 1
    If the said student isn't afraid of foreign mainframes printing occasional Cyrillic characters, an emulator and a programming environment for a vintage mainframe computer does indeed exist, with 3 different FORTRAN compilers.
    – Leo B.
    Commented Jun 23, 2017 at 20:15
  • 2
    Cycle accurate emulators of vintage mainframes are relatively rare because they would be substantially slower, and there is no specific need for accurate timing of instructions, unlike personal computers where it would be substantial for video, sound, or game experience. Having a cycle accurate BESM-6 emulator to find out if the claimed performance of 1 MIPS on 1 CPU at 9 MHz was achievable, is my dream.
    – Leo B.
    Commented Jun 23, 2017 at 23:15
  • 2
    Just to clarify, you want an emulator for an old mainframe system and a Fortran cross compiler for that system that runs on modern hardware. I think your best hope is PDP11.
    – JeremyP
    Commented Jun 26, 2017 at 10:48

7 Answers 7


One possibility to look at might be the Hercules emulator, which emulates the IBM S/370, ESA/390, and z/Arch systems. This is emulating the 'bare iron', and does not include the operating system or utilities, but there are sources for OS images and compilers listed on that page.


These aren't mainframes by any manner of means, but I've successfully compiled and run Fortran programs on an emulated:

  1. DEC PDP-11 running RSX11
  2. DEC PDP-8 running OS 8.

Both of these ran under SimH on a Raspberry Pi Zero. The PDP-8, being a small machine, typically ran from paper tape rather than cards.

I have reason to believe that another early educational computer, the IBM 1130 will run under SimH, or under the IBM1130.org simulator. IBM1130.org has a download package that includes a Fortran compiler. From correspondence with the author of A FORTRAN Coloring Book, it seems that the book was targeted to students submitting code on an 1130. I'm not sure if it's possible to run IBM FORTRAN H — the version that introduced COMPLEX — on an 1130, though.

It's possible to compile Fortran-77 and older using gfortran -std=legacy …. What will really get you with old code, though, are the machine-specific assumptions. For example, the Coloring Book is peppered with // FOR, // JOB and // XEQ batch control cards with little explanation of what they do. It would have been assumed common knowledge for all users at the time.

The Fortran character set is a simple subset of ASCII, but if you want to really emulate punch cards, you should look at Douglas W. Jones's punched card index. It has tools to convert ASCII ↔ EBCDIC for compiling card decks, and the format is used by SiMH.

  • Also, @hotpaw2, we should talk. I've been considering a system similar to yours for some time.
    – scruss
    Commented Jun 24, 2017 at 15:13

Does it have to be a mainframe, or PDP-11 or VAX would be good enough? If the latter, then there is SIMH, and there is Bitsavers' Software Archive. There was a FORTRAN compiler on BSD UNIX for sure.

Better yet, there is no need to simulate the whole system. For convenience, one can use a user space PDP-11 emulator. Binaries can be taken from here, 2.11 BSD preferred.

  • The VAX is a post-micro-processor-era minicomputer. I was hoping for something that pre-dated the 8080 or even 4004 uP timeframe.
    – hotpaw2
    Commented Jun 23, 2017 at 19:56
  • @hotpaw2 PDP-11 (1970) it is, then. Pre-dating 4004 (1971).
    – Leo B.
    Commented Jun 23, 2017 at 20:00
  • But is there a FORTRAN compiler that runs on the simh pdp11?
    – hotpaw2
    Commented Jun 23, 2017 at 20:22
  • Better yet, simh seems to include a 1401 emulator. Is there a working FORTRAN IV compiler image for the 1401 emulator? If so, how does one feed it with new source code?
    – hotpaw2
    Commented Jun 23, 2017 at 20:31
  • @hotpaw2 The BSD installation tape should have it. Re IBM 1401, unfortunately, the bitsavers directory only has pictures.
    – Leo B.
    Commented Jun 23, 2017 at 20:45

Do you consider the PDP-10 a mainframe? Here is a TOPS-10 distribution with Fortran included: http://www.steubentech.com/~talon/pdp10/

  • And there are several PDP-10 emulators avaiable, just google "PDP-10 emulator". Commented Aug 31, 2017 at 7:35

There are emulators for the historically significant systems produced by Control Data Corp. and Cray .

  • DtCYBER, which can be run on Windows and Linux and is available as source code under GPL 3.0 terms. DtCYBER does not include operating systems, compilers, etc., which the user must provide for themselves--a tall order, but probably not impossible.
  • http://www.cray-cyber.org operates Internet-accessible CDC, Cray, and other historic mainframe and supercomputer-class systems, running their historic operating systems. These include an actual working instance of DtCYBER running CDC's NOS V2.8.7 operating system as well as its Fortran compiler FTN5.
  • Living Computers operates a freely accessible CDC 6500 running NOS V1.3, in addition to Digital Equipment Corp.s mainframe DECSYSTEM-2065 (running v7.04) and the desktop-sized Toad-2 "mainframe", a 1990's era system built around a single-chip, radically enhanced implementation of the processor architecture, running V7.1. I haven't checked, but I imagine they all have FORTRAN.

CDC's products included a number of the systems most deserving of the label based on historic usage of that term. These were physically large systems that took up a lot of real estate (see photo below of a CDC 7600), required (some of them) special power like 400 Hz AC and chilled water cooling, and could cost as much as $10 million in 1960's-era dollars. (That's mid to high tens of millions in 2017 dollars, perhaps over $100 million for whatever the most expensive would have been.)

The these old systems use (e.g. NOS, NOS/BE, SCOPE, etc., for the CDC systems) are extremely obscure these days. I have been able to find some documentation on various websites for the compilers and operating systems. (Cray-cyber.org hosts some documentation themselves.)

Photo purported to be of a CDC 7600 supercomputer

CDC 7600

  • If you ever find an actual image of a Cyber OS, I'd be extremely interested. Also, last time I looked, cray-cyber.org didn't provide new accounts. If you got one recently, and it's still in operation, I'd also be very interested.
    – dirkt
    Commented Aug 31, 2017 at 4:37
  • @dirkt they are still quite occupied with moving into a new building and seting up an exhibition. you my have to ask for the actual state. try mail at cray-cyber.org
    – Raffzahn
    Commented Aug 31, 2017 at 10:33
  • @dirkt I can't even find my cray-cyber login information, so it was probably a very long time ago that I received it. I haven't tried again in recent memory to get one.
    – g1l1t1
    Commented Aug 31, 2017 at 18:29

The emulator B7094 come with Fortran 2 and Fortran 4.

It's relatively easy to use (much easier than hercules, of course) : https://www.majorgeeks.com/files/details/b7094_ibm_7094_emulator.html

Fortran 4 is very similar to the "still in use" Fortran 77 and any incompatibility can be easily patched. I don't remember if it's shipped with the emulator, but Fortran 2 & 4 manuals for the IBM 7094 can be easily found in pdf.

You'll have emulated punch card and printer as well as a bunch of tape drive. Last but not least, it have a "blinkenlights" panel.

Thing of beauty and joy forever.

Side note if you're an educator :

  • this is sersiously hardcore oldschool Mainframe (you asked for it :D)
  • No interactive shell, well... no shell at all actually.
  • You powerup, load the fortran compiler, load the source code (punch card), compile the source code, get compiled code (punch card), load the compiled code (punch card), load the data punch card (if the code is waiting for data), get the result (printer/punch card).
  • most (if not all) can be automated using some kind of batch file which is purely specific to the emulator.
  • You get some kind of interactive shell but it's purely the emulator being nice to you to automate the button pushing and punch card manipulation.

Good luck, it's very fun.


Beside the already mentiond Hercules emulation, why not using a real mainframe?

The Gesellschaft für historische Rechenanlagen (Society for Historic Computing Machinery) in Munich does offer a free remote login to a (rather modern, 1988) Cray Y-MP. The Y-MP runs usually 24/7. On selected days, a CDC Cyber 960, the last iteration of the CDC6600 design, can be accessed. Both machines are equipped with stock FORTRAN compilers. So all you need is to upload your programms, compile and run it in a classic (well, 1980s) environment on a real machine. If needed, older OS Environments might also available (on the 960), but I'm not sure if they can be accessed over the internet.

Number crunching in FORTRAN on a CDC is about as classic as it ever can get.

I can imagine that they will also support you in using these machines for a reasonable sized course (donations are welcome as all of this is paid out of their personal pockets).

Now, with some pretty please, it's even possible to show up with a bundle of punch cards and have them run to get an output as punch cards and printouts on a classic line printer on green and white forms.

Caveat: They are moving between different buildings, so I'm not sure about actual location and if conectivity is abailable at all. Just write a mail ( mail at cray-cyber.org ) to check whats possible.

  • Both links are broken right now, seems they restructured the web site. I cannot find anything about a free remote login, do they still allow this?
    – dirkt
    Commented Oct 7, 2020 at 5:37
  • @dirkt There have been some .. lets say 'administrative' ... issues. A new cooperation has been founded. They are in the process of setting up operations again- AFAIK.
    – Raffzahn
    Commented Oct 7, 2020 at 8:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .