The IBM 1401 compiles and runs FORTRAN II

The IBM 1401 compiles and runs FORTRAN II


Hello folks, welcome back to our IBM 1401 exhibit. Our dinosaur computer from the 1960s. This is Mike Alba, and we are with our 1401 exhibit. You’re using the, uhh, the machine we call the Connecticut, and we’re going to attempt to compile a Fortran program? Right. This is the first example in the manual, and, uh, We figured that was as good as any point. Alright. You know let me dig it from another angle here, so we see the cards. I’m missing a card, wait. Oh! We need to load the tape. And we have been laboring for… A month? (Laughter) A few hours a day. A few hours a day. The tough part was to remake the tape of the Fortran, but we think we have made a good one We don’t know. We can hope. Can you hold? So, we’re afraid the beginning of tape marker fell off the tape, or is yet to. Which in that case the tape will rewind and Go off the reel. There you go! Oh! It was there. Alrighty! Right. Wow! It read… it read a few records, and then I saw the tape move a little. Okay, I got a reader check. Oh! That’s good news. It means it wants to read something. It’s not reading the other cards. It’s not reading them. It wanted to print something, then it stopped. That’s working. That’s chooching over there. It compiled? That’s just the listing. It lists it as it reads it into memory. I’m surprised we have even gotten there. So what’s the next step? The usual last card restart. I should have put a blank after that. Whoa, man! Lots of red. Oh, whoa, we have a whole bunch of red lights here. Yeah. Houston, we have a process error, a reader error, a storage error. And we have an A register parity problem. Well this is as far as I’ve ever gotten, Michael. This is just amazing! And this is the instruction it was trying to run, and it got a a three. It’s an “L”, it was doing a load. It was doing a load, Which could be a tape read, but yeah. What the heck is that? We have a little character cheat sheet on that one. What … what is “B, A, 8, 2, 1?” So the character we have down here is a “B, A, 8, 2, 1”, Which is a dot Which Michael who speaks fluently 1401 assembly says It’s a Halt We have “B, A, 8, 2, 1”, So why do we have a parity error? It should have this bit on. It’s, uh, well, anything in the memory should be odd parity. And then we have, so this bit which is the parity bit should be on, and it’s not, and then it went “ugh” that’s not a good number, and we’ve got the process error, and the storage error. Everything went haywire. We can do this time-honored thing that customer support always tells you to do: try it again! It’s an op code one which means read, but… Here we go Oh there we go. How come it didn’t read the tape program? Oh, it did! We’ve a reader check for the last card Oh, hey, it’s compiling! It is compiling. It’s doing something. All right. Reader, stop. It stopped. Finished. I think, if I press start, it will run. Yeah, it finished compiling, went to a halt It’s doing something. *Printer noises* It did it. You got it! Hey! Pretty numbers. What is it supposed to do by the way? I forget at this point. It’s been a couple of months since I typed that in. And it’s in deep trance here… it’s calculating hard. It’s a very very slow machine at doing scientific calculations. Fortran is really a stretch for the 1401 I mean, it’s totally amazing that they were able to put it in there. *Printing noises* It’s calculating a table of something. Is it halted? Michael I think you did it. Why don’t we look at the output? Oh, I don’t know about this. Start of Fortran compilation. Okay. Starts with the parameters. Machine size specified is 8,000 meaning characters of storage. Actual machine size is 16,000, so we are maxed out at sixteen thousand characters Yes, the biggest meanest machine around. And that’s the listing of the program. And you still don’t remember what it does? It says matrix arithmetic. Okay, and then the result of the compilation it says, I believe, 800 input characters, so the whole program Modulus is 5, that’s the size of integer variables, mantissa is 15, the size command for floating point variables Then where the variables are stored in memory Assignments, blah blah And that’s the end of compilation Press start to go! Oh wow, there’s a user interface to it. Oh, it’s a Hilbert matrix. It takes the matrix, does inverse, multiplies it, and inverts it a second time. Oh-ho! Pretty cool. And – It takes a little longer than your iPhone would if your iPhone had Fortran. Oh, it does? Wow! That’s it! Congratulations! I didn’t think it would go that far. That’s pretty cool. What program did you get? Did you compile something? Yeah. You’re kidding me? No! My goodness! These are examples one and two from the manual the first comments from page C24 dash whatever” So- so- how many decades did it take to run? No, it goes pretty quick actually! Not bad considering that it’s a 90 kilohertz machine. I can’t believe this. Look at this. Floating point numbers. Floating point! Did you ever imagine floating point format out of the 1401? I’m not only imagining it, I did it. It wasn’t an IEEE format, wasn’t it? Actually IEEE format didn’t exist then! Alright. So how did you get the big records? Oh, that’s complicated. So one of the most difficult steps we had… to go through to revive the Fortran compiler was to create a tape of it. In order to understand how we did that, I have to show you a little trick that we use. So if you go to the back of our tapes here, you will see that, one of the connectors – this is a regular one – but this one, looks like it has a suspiciously modern cable attached to it. It goes to a black box here, and this is our tape emulator So here – pay no attention to that evil computer. It just allows us to send commands to the tape emulator. So this guy is the other side of the box. I can open it up. And… You have serious hardware in it. Designed by a few of the restorers and so this hardware pretends to be six vintage tapes to the 1401, and you can see the interface here on the computer. Right now I have three open, and you can do as you would expect in a real tape. You can load it, you can change density, you can start it and basically, what it reproduces is the same array of buttons that we have over here, on a real tape. To give you an idea of what’s in the file that’s executable mounted on tape one. Merge program right here. Start. This is the original tape formatted in a way that the tape emulator understands it. So I’ll rewind, start. All right, both are at 0. So, we’re trying to recreate a new Fortran tape. A real tape from an emulated tape Step one is to load it. And you have to wind it past the Beginning Of Tape marker. There it is this guy, that’s the Beginning Of Tape marker. So if I’m past that the controller rewinds and finds the point where it gets on the reflective marker All right, load rewind. There you go. Loaded. And then we make it tape number 3, so this is going to be real tape number 3. There we go! Now it’s working It’s writing on our tape. Printing it. And then we should see it advancing on the emulator Yes, at record 1093. 1122. So it’s executing this program, taking the data from this emulated tape, writing it to this real tape, and printing what it’s writing. Which we really don’t want to happen, but it does not hurt. That’s not bad. So that’s the Fortran tape. It’s a pretty darn complex program. It’s listing it as it’s writing. So now that we have recreated the Fortran tape, we are not done because we need to recreate the source deck, and we didn’t feel like punching it by hand. So here it is, the source And you can tell it’s a short Fortran program with a little auto-punch program at the beginning of it. So we’ll get the 1401 to punch it for us, and that’s the self-executing tape that will punch the card blanks. Back to the real machine. Two ends the 1402. That’s the reading end, and that’s the punching end. All right, so… Now we’re going to punch a set of cards. Yeah, so it’s 12 edge on this side, and 9 edge on the other. Yeah, because they’re supposed to be able to mix in one pocket if they want to be facing right. So now we are going to do similar thing Load the emulated tape program and have the 1401 punch a Fortran source card deck. Recreate one. We’re punching! Blank cards go here. It’s already done? And the fresh deck is over here. These have holes in it? There are holes in it. I’m checking whether the card says “end” And it seems to. It’s the end card of the Fortran. Okay. Yes, so the 1401 punches real fast, but doesn’t print what it has on top of it. Let’s let’s go duplicate some cards to see what’s on them. So the first card should be parameters? Yeah, like the options for the compiler. Right, so what Michael is going to do, he is going to duplicate the cards on the 026 and the 026 has a printer on it. So it’s going to reveal what it actually has. And it says: So yes the first card just showed a duplicate. So now we can see what’s on it. It says param I 990 0515 Can we get a Fortran statement? So basically it’s one Fortran statement line per card. Might be another comment. It does look like another comment. And it says… Matrix arithmetic. We should be getting into actual code soon. It’s probably a “dimensions” or something like that. Yeah, so that’s declaring our arrays. Finally, we have a Fortran statement here. Dimension A 77 vector 7 B 7 7. All right! cool. So the whole deck is like this and then the last one is an end card? That’s the end card. So, one parameter card, then the whole Fortran thing line by line, and then an end card, and that’s the source code, that’s your file. Now we can go try to compile it. Source code is in I have to make tape – this tape one, right? Yeah So this now is the real thing, tape one, which we have to rewind. Okay, so, we rewind our compiler, a freshly made compiler. I have to unhook the emulated one. So now we’re back into a historically correct state. I don’t need the emulator anymore. Unload. No. Gone. So this guy, all that modern, ugly stuff; that’s not counting anymore. We are going to do the real thing. All right! Do we have the printer ready? It’s all good. All right. Com-pile. Is it waiting for the reader? Yeah, it’s waiting for the reader. Reading the cards. You get the last couple cards. Okay. And now it’s compiling. Machine is working pretty hard. So it does it one pass at a time, and so it’s reading the passes right here. Sixty-three passes. It just read another pass. And it’s rewinding, it’s done! Alright, so now we’re going to run the program by pressing start. It is calculating. Here you go. That’s it! Did it. So, it took a Hilbert matrix, inverted it, and that took a while, then it’s multiply both and got identity, so ones on the diagonal, and zero otherwise. Mostly. And then it inverted it another time. And that was the end of the Fortran scientific demo.

100 thoughts to “The IBM 1401 compiles and runs FORTRAN II”

  1. I think that the program generated a Hilbert matrix (a notoriously ill-conditioned creature), inverted it, multiplied the inverse with the initial matrix. It's a good test for determining computational accuracy.

  2. The amazing thing is that even today the Von Neumann machine x86, ARM, MIPS, etc emulate is extremely similar to that one in 5:40 (and in fact they are compatible with designs from that era). Same ALU, registers, flags, MMU structure, even using the same letters. And at the microcode level, the stack being simulated by a special purpose register (as opposed to old FORTH hardware machines). Things could be done very differently but we just carry that culture that just works and there is no good reason to abandon.

  3. I started my IT career as an operator of a "small" IBM 360/25. We loaded a 1401 emulator into the 360 and ran old business applications. This video brings back old memories; card readers, punches, sorters and line printers. Thanks!

  4. Kinda cool looking at the assembly. Sort of reminds me of programming in old Motorola assembly code. Also amazing they got it to run. I remember my dad telling me all the problems he had using those old punch cards to program.

  5. Watching this video was really, really fun.
    Reminds me of my FORTRAN course at the university of Aachen in the 1980ies. We still had to punch the code on cards. Two fellow students and myself developed the code on paper, cut the listing into thirds, each student typed in a third of the code, we merged the three decks and triplicated it as each student had to pass in his/her own deck of cards. It happened quite often that one of the programs returned with a syntax error due to an incorrectly punched hole when we checked the results the next day.

  6. This brings back memory. After working on a 1401 for a while, I went over to a System 3 and did sysyop and tape librarian on RPG runs.

  7. I'm an engineer and wrote fortran and compiled it on main frames in college. Recall IBM 360. This was mid late 80's. We were getting IBM DOS PC'a with wordstar and lotus. It was ok for reports but not enginnering. Someone showed us an early apple. We asked did it compile Fortran. Answer was no. We all walked away. Ahaa Memories. .

  8. the tape readers with the flat screen in the background is somehow stuck in my mind. If they had any idea back then what this would lead to….

  9. The first real computer I used, (my first personal being the IMSAI 8080), was the IBM 360,
    it was sweet, but in the world of nuclear engineering, the PDP 8's reigned supreme.

  10. Retour vers le futur ! Excellent, cela me rappelle mes jeunes années.
    I'm looking for job, if you need someone (I'm good in Fortran) ….

  11. Сейчас никто и не знает что такое Фортран и транслятор …

  12. I am old enough to have actually worked with one of these systems running FORTRAN using the WAT IV/ V Compiler. A truly awesome machine.

  13. In 1971, I was lucky enough in becoming a computer operator using an IBM 1401 doing payrolls, it was later replaced with an IBM 360-30 which was later replaced with an IBM 370-145. After 5 years I became a computer programmer writing assembly language.

  14. Wow, what a retro computer! Just imagine how much progress we made since then.

    By the way, I just recently interviewed a man who worked in 1980s as a FORTRAN programmer. It may be interesting to read:
    https://blog.topolyan.com/interview-with-rob-vugteveen-an-old-school-fortran-programmer/

    The interview doesn't have any ads.

  15. Im not a computer man myself but your clip is realy interesting along with the Babbage engine. Thank you for posting

  16. What would happen if the deck was accidentally dropped on the floor and the cards were mixed? Assuming the end card was put in place.

  17. Brings back memories.  In the late 60's a 1401 was donated to my high school by Lockheed.  In those days IBM leased its computers and they refused to allow Lockheed to donate any parts that would allow usable output.  So, it was pretty and much smaller than the Burroughs 205 (all vacuum tubes and a big drum memory- that is big size but small in memory) we were using at that time in the computer lab.  I wonder what landfill it was sent to.

  18. My college in mid 80's had IBM 360. I started on cards. As a mechsnical enginnering student I started on FORTRAN if course. The flat screen TV on wall had more computational power than the 1402…

  19. Omg just omg. I'm not even a "computer nerd" but this is just the best porn I love the mechanics on these machines.

  20. A little bit older than the machine I started on. In late 1974 I learned COBOL by using IBM’s programmed instruction texts and by letting the compiler on our System 3/10 slap me around. We were a bit odd in that we used COBOL on the S3 instead of RPG-II. It had 24K of magnetic core memory, the built-in 96 column reader/punch, a Selectric console, one single platter removable 5 meg hard disk with a single fixed platter on the same spindle, a huge 20 meg removable multi-platter hard disk in a cabinet as big as a refrigerator, two tape drives, and a 1403-N1 printer just like yours. About a year later we converted to a Honeywell Level-62 with four 29 meg removable hard drives, a card reader, and a drum printer comparable to the 1403. Then in late 1977, I went to work for Honeywell as a systems analyst supporting the L-62.

  21. Now people carry more powerful computers in their purses or pockets to watch their facebook feed, what a waste of computing power!

  22. I want a USB punchcard reader with a fully-decked 1401 recreated in an FPGA. Somebody please make it happen.

  23. This whole thing is for novelty purposes only. I learned FORTRAN IV in college many years ago and loved it!

  24. Pretty amazing that in only a few decades we would go from this to desktop PC's where we really are still to this day.

  25. While watching this video, my phone probably ran more CPU cycles than the computer on the video in its entire existence.

  26. Do you want to create Colossus? Because that's how you create Colossus! (Reference: Colossus: The Forbin Project)

  27. This sort of thing is amazing to see.
    Its all well and good to have one of these old beasts sitting in a museum somewhere for people to look at. But to actually have one in full working order and running actual code is another thing entirely.

  28. This is amazing, it's so funny when agencies such as nasa say things like 'we don't have the old technology and need to rebuild it again '. Or similar when asked about where all the data went from the moon missions. One of our most important human achievements and yet no data from it!
    Hell I have back up's from my first hp pc from '97.
    My question is which agencies or companies run older systems? I can't recall the name but a filter company still use a IBM 402 linked to a 514 punch.
    Not as old but the modem within the McLaren F1 can only connect to a mid 90s Compaq laptop.
    I know military and intelligence agencies and a few hospitals rely on systems installed decades ago. It's slightly scarey when the conditions of staff in charge of nuclear missiles is looked into.

  29. I appreciate and applaud the preservation of these computers. There is still a ton of data that's configured to these systems that would be lost without them. Besides I like the clickity clack, and the smell of oil and ozone.

  30. when i was a kid my Da was used to bring me at saturday with him "at work" and i was passing the time lloading those punched card. Couse they had moved to a sort of HD…. so while i was loading and taking back the cards my dad was loading the Disc…. bigger than a pizza, 1 plate. around some kilograms. that was 1 disk- plate- the reader unit was bigger than me. approx 35 years ago.
    now in my pocket i have a mobile phone waymore faster.
    i can't image what my nephews will have in their brains next 40 years…

  31. Nobody uses fortran or cobol anymore. Fortran's applications are now replaced by Matlab and Python while Cobol is replaced by EJB

  32. Thanks god we have successfully moved from this huge and noisy monsters to microprocessors. It is hard to realize how to watch youtube using this machine

  33. As a an IT for 10+ years I find it fascinating that this IBM 1401 manages to output Fortran efficiently. Fortran is still one of the fastest languages in terms of calculations in many scientific disciplines.

  34. If that emulated fortran emulated software where to be put out on the web could people use it in a enviroment that would do what we all saw in this video ?.

    or is the emulation only meant for the proper machine's ?

Leave a Reply

Your email address will not be published. Required fields are marked *