IBM 1401 Runs FORTRAN II Once More

The IBM 1401 is undeniably a classic computer. One of IBM’s most “affordable” mainframes, it ruled the small business computing world of the 1960’s. Unfortunately, computers aren’t often thought of as treasured heirlooms, only a handful of these machines survive today. The computer history museum has two machines. One from Germany, and the other recovered from a basement in Connecticut back in 2008. [CuriousMarc] and the rest of the team at the museum have been working diligently to restore the 1401, and they’ve hit quite a milestone — They can now compile and run FORTRAN II code.

Getting the 1401 to run FORTRAN II itself is quite an accomplishment. The hardest part was dealing with the 729 vacuum column tape drives. The team spent years building a hardware emulator which takes the place of the real drives. The emulator is driven by an old PC running windows. Tape images are stored as files, which can be loaded, rewound, and run just like a real 729.

Emulators are great, but [Mark] and his team wanted this to run on the real hardware. They first had to re-create a FORTRAN compiler tape. They ran a tape copier program on the 1401, then loaded an image of the compiler on their emulator. The computer dutifully copied the image to a real tape drive.

The team also needed a punched card deck of FORTRAN source code to compile and run. The first example in the FORTRAN manual is a Hilbert Matrix program. The team could have used a keypunch machine to punch the cards for the program, but that is a painstaking and error-prone process. One mistake, and they would have to re-punch an entire card — much like using an old typewriter with no White-Out or correction ribbon. Instead, they typed the source into a PC, then converted the file to a tape image. A small program instructed the 1401 to punch the source code out on cards for them.

At the moment of truth, shown first in the video, the 1401 reads FORTRAN II from tape, pulls in the source code from punched cards, compiles, runs, and then prints the result on its line printer. All the original hardware singing along just like it did in 1959.

If you haven’t been to the Computer History Museum yet, check it out! It’s also the site of Vintage Computing Festival West.

41 thoughts on “IBM 1401 Runs FORTRAN II Once More

  1. That is so cool!
    I’m glad two of these pretty beasts got to retire and relax in a museum.
    Kudos to those who got FORTRAN running.
    I still have some old punch cards in my basement from my dad that ran on some old IBM like this.
    I should transcribe them.

  2. “Unfortunately, computers aren’t often thought of as treasured heirlooms, only a handful of these machines survive today.”

    Considering who bought them, as well as what it took to run them, I can certainly see why.

    1. In those days many of IBM’s machines were leased rather than purchased outright. When upgrading to a newer system I think it’s fair to assume a lot of that returned replaced gear was scrapped.

      1. We had a lot of stuff that the owner did not want back. After the lease was up they were happy to not have to come and pick it up and cart it away. We got some more use out of some of it. I gutted a lot of stuff for anything interesting and a lot of stuff got turned into pizza via the scrap yard. One neat piece that I never did get, and could not have used even if I wanted to was the power protection system. It was a huge 3 phase motor with a big flywheel that drove an alternator. The alternator powered everything in the server room. The mechanical mass of the flywheel crushed any little spikes or dips in the incoming power, and the flywheel was supposed to spin for long enough for the diesel backup power unit to come on line.

          1. And flywheel-based uninterruptible power supplies is an actual thing as well. Generally rather cheap compared to batteries, and also instant switch over time for some strange reason…

            Downside is that they require some space, and typically have higher loss when they aren’t giving you power. This is to what I have gathered, were thinking of building a flywheel UPS at one time, but scrapped the idea since rotating a large mass at high speed in a vacuum on a magnetic bearings is apparently expensive…

  3. “The team could have used a keypunch machine to punch the cards for the program, but that is a painstaking and error-prone process. One mistake, and they would have to re-punch an entire card — much like using an old typewriter with no White-Out or correction ribbon.”

    Aww, bless. Youngsters!
    How do you think everybody input the software in the first place?
    And what do you think happened when (not if) the big box of punch cards was dropped and they spilled over the floor?
    And then how do you debug such a program?

    Hint: people took care to get it right first time. Read comp.risks at to see what happens when people don’t.

    1. You’d make sure to punch index numbers so that if the cards got dropped they could just be picked up and aligned the correct way around, then run through a sorter to restack them.

      1. Our Uni didn’t spring for the sorter :( Maybe they did and it broke the first week and was relegated to some closet or some Stat prof pilfered it to enter food prize sweepstakes. Either way, had to help students re-sort cards a couple of times. Wish we had one of those or much larger surfaces on which to precariously leave boxes of cards waiting to be ran lol.

    2. > One mistake, and they would have to re-punch an entire card

      You used the DUP key. Put the incorrect card in a reader/punch, press and hold the DUP key to copy the card keystroke by keystroke to the new blank, let go when you get to the incorrect character and type in the corrections.

      1. And you could “insert” by holding the original card in place (so it wouldn’t advance) and then punch the new code onto the new card. Finish the card with DUP. Worked if everything still fit in the 80 columns

    3. Yeah, OMG – repunching an entire card! That’s what an 026 (at that time, 029 later) keypunch machine was for, we didn’t have to do it by hand. And an index number in the last 6 (8?) columns really helped when you dropped the deck — run them through a 082 sorter (a very popular visual in early sci-fi movies) to get them back in order.

      1. Re: Index numbers
        I never saw anyone use them. Unless they incremented by something more than one, how would you insert a card if you had to change the code? I suspect they might have been used once debug was complete — perhaps there were “index number punching” utilities available? Diagonal lines were what I saw.

    4. Using punch cards made you write compact, efficient code.

      Cafeteria systems meant that the multi-pass compiler would run a quick pass to make sure that your program was syntactically correct before committing a lot of CPU resource to trying to actually compile. When the turn-around time for jobs was several hours, it meant you really, really thought about your software before trying to run it.

      I was an electronics student when computers were restricted to the Maths department; we were given 15 seconds of CPU time a week so we could learn to program these new-fangled things. I switched from BASIC to Algol very quickly so I could write a decent-ish sized program, and I could run the programs in batch overnight.

  4. I don’t understand any of the mechanics involved in getting this thing going, makes me wonder how alien our current tech will look in ~60 years.

    But I do have to say that’s a beautiful looking machine. Especially that display/control panel.

      1. The first one I “programmed” had jumpers and switches (ca. 1972). It was in high school electronics shop and would add two numbers with AND gates in binary and simple things like that. On of the other shop teachers came in and said “what’s it do?” and I beamed at him and said “it adds two large numbers in a thousandth of a second!” … he wasn’t impressed.

        Later we were able to use a punch card machine with the help of a forward looking math teacher (she’d gotten a degree in engineering in 1968 and nobody would hire her because she was female so she taught us nerds instead). We’d punch the cards, and she’d schlep them over to the school board’s computer somewhere across town to run overnight. Of course we (at ~14) discovered the joy of dropping a do-loop into someone else’s stack so they’d time out and not run, among other hijinks.

        Most of all, where do you get punch cards these days?

  5. Thanks to everyone for the hard work in getting these machines running and for shooting the video.

    Some suggestions on how to make the video easier to watch – Use a tripod and record the whole sequence three times. Do one take with the camera on the front panel, once on the printer, and once on the card reader. Don’t move the camera during these shots. Edit it all back together into one flow and use voiceovers for the comments rather than cutting away to title cards. Sprinkle in some wide shots of the whole room and the volunteer and you’ve got yourself a great video!

  6. We sometimes took a chip (the punched out piece from a hole on the card), spit on it and put it in the hole to “undo” a single punched hole.
    The 1401 coupled with a Ramac (the first IBM disk for the 1401) was used in Ohio to collect unpaid traffic tickets.
    The memory for the 1401 was “core memory” giving rise to the use of the term “core” for memory in general.
    We input a dump program using the switches on the console (there was no keyboard) to debug programs.
    I think I may still have the 1401 manual. Everything there was to know in a manual 3/8 in thick.

  7. “The team could have used a keypunch machine to punch the cards for the program, but that is a painstaking and error-prone process. One mistake, and they would have to re-punch an entire card…”

    Oh, poor baby! Why, when I were a lad….

    One of the better days in my college career, was when I realised that I could avoid handing in a deck of cards at the window and, instead, key the card images into a text file (one card per line) on one of the timesharing Teletypes, and submit the text file into the job queue.

    Remember, kiddies:
    Face Down, 9 Edge First!

  8. I have fond memories of the 1401; I ran two of them at one of my assignments in the Army in 1965. I was doing cryptology and data transfer. One system had 4K core and the other had 8K core. No tape drives…all punch cards. Programming was done in an assembly language called AUTOCODER. Data was sent to various STRATCOM nodes over a phone-cup-receptacle (60 characters per second) modem using a variation of the WATS line used exclusively by the military called the AUTODIN. (This was a precursor to the ARPANET.)

    One of the best things about this arrangement was that I had comprehensive manuals on everything. Since the DTU (which looked like a big punch card reader) was attached to cyphony gear, it was many times up o me to make repairs when we couldn’t find an IBM CE with the necessary clearance. It took an hour to transmit a hopper full of cards and I had plenty of time to study during data transfers. Many of the IBM courses were in “programmed instruction” format and easy to learn from. I also managed to acquire over 100 college credits from places like the University of Wisconsin at Madison, Loyola University, and Army extension courses from Ft. Belvoir and Ft. Monmouth.

    I miss those manuals. I finally learned FORTRAN by hiring in my off-duty hours for a local business service bureau that was running 1401’s and 1440’s.

    I think it is funny that 52 years later I’m still doing what the Army said I was suited for.

  9. My first experience with a computer was with a 1401 in High School in 1971. Ours had a console/table with a typewriter-like printer (instead of a 1403). We wrote everything in Fortran II. There were 4 “sense switches” on the console that you could test from your program, so we wrote some early games. Basically, the program was in an infinite “for” loop that was broken by changing the position of the sense switch. Crude, but really amazing for the time.

  10. I used to run a 1401, fun to mount the tapes, pull the processing modules down to see what was in them. I still have several modules from the processor bank. I have some black and white photos of the system including a fairly good shot of the processing panel.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.