12.8 C
New York
Wednesday, December 7, 2022

Retrotechtacular: Programming By Card – Hackaday

The recent Supercon 6 badge, if you haven’t seen it, was an old-fashioned type computer with a blinky light front panel. It was reminiscent of an Altair 8800, a PDP-11, or DG Nova. However, even back in the day, only a few people really programmed a computer with switches. Typically, you might use the switches to toggle in a first-level bootloader that would then load a better bootloader from some kind of storage like magnetic or paper tape. Most people didn’t really use the switches.
What most people did do, however, was punch cards.  Technically, Hollerith cards, although we mostly just called them cards, punched cards, or IBM cards. There were a lot of different machines you could use to punch cards, but none were as popular, I would guess, as the IBM 029. Certainly, the models in the series were overwhelmingly what people used to punch cards.
For the uninitiated, a card was about the size of an old-fashioned dollar bill — the ones in style when Herman Hollerith invented them. The card was made of material not quite as thick as a standard file folder and was divided into 80 columns and 12 rows. Later cards had more columns, but those never really caught on to the same scale as the classic 80-column card.
To punch a number on the card, a machine made a hole in one of the bottom 10 columns. So a hole in the “1” row was a 1 and a hole in the “4” row was a 4. The original cards used round holes and 45 columns, but an IBM inventor named Lake realized that narrow square holes could pack in extra data back in 1928. The 11th and 12th row, and sometimes the “0” row, were used to denote special characters or, sometimes, the signs of numbers.
Honestly, you could interpret a card however you liked, but in practice, there were a few common schemes. However, it wasn’t unknown to have cards punched in binary where each hole was a 1 or a 0 and each column make up a binary number. On top of character encoding, there were other format conventions, such as having checksums or line numbers in certain columns of the card. Line numbers, in particular, were good because it allowed you to sort a deck after it was dropped and the order scrambled. Another common trick was to draw a diagonal marker line across the edge of a deck of cards so you could quickly spot if one or more were out of order.
Blank cards were often used as a “sentinel” or what we would call today an “end of file” marker. However, some programs would look for an impossible value like -9999999, for example.
A card reader was relatively simple. Most readers used a series of wire brushes that the card moved under. Where there was a hole, the brush could contact a metal plate under the card and complete a circuit. If this sounds not super reliable, that’s because it wasn’t.
The old admonition “do not fold, spindle, or mutilate” was a request for users not to make the cards jam the machines or make new holes in them. A spindle, if you don’t remember, was a probably non-OSHA-compliant spike on your desk that you pushed papers on to hold them in place. Not a great strategy for a punched card.
In fact, a common prank was to punch every column in a card so it would become flimsy and jam the reader, which the operator, of course, was sure not to appreciate. These were sometimes called “lace” cards because they were delicate like lacework.
So how do you punch a card? Although there were some schemes for manually punching precut cards, those were mostly used for niche applications like voting, small schools with no equipment, or inventory control. For serious use, you used a keypunch. You can see an instructional University of Michigan video from 1967 on the operation of the 029 below.

There were three stations in the 029: The rightmost held a card waiting to be punched. The center slot was the card you were currently punching. The leftmost was the card you had just punched (usually). Because the machine had the left card where it could be read, you could duplicate columns from it to the card you were working on. This was important for making corrections. You could copy the previous card up to the point of the error, correct it, and then copy the remaining punches.
The 029 could do a lot of tricks, including punch a card that would set special options for the machine itself. You’d take the card and wrap it around a drum that would control the operation of the machine. For example, you could define fields or set the machine to automatically skip or duplicate columns. Another common operation was to automatically set the letter or figures shift for certain fields.
If you didn’t get enough in the first video, part two shows advanced usage. For an electromechanical device made in the 1960s, this was a sophisticated piece of hardware.

Modern keypunches would print text along the top edge so you could look at it and read it. If you had cards that were not interpreted, you could put it through a machine to do the printing. For example, most card output from a program didn’t have interpretation prints on it.
To help you read a card, many of them had guides printed on them. A basic card just had rows and columns printed. But special cards would show dedicated fields for line numbers or other data specific for programs. It was also common to see cards with company or school logos.
Want to make your own cards? Well, the best way would be to build your own hardware. The second best would be to pick up some old gear surplus and restore it — the manuals are available. But most of us will settle for trying it online. Try making a card with the virtual keypunch. Want to read it back? You can do that, too.
We do miss some of the old tech, but we don’t miss cards, really. There were many variations. The 96-column card was used with the IBM System 3. There were also 40-column hand-punched cards, 90-column UNIVAC cards, and even 130-column Powers-Samas cards. Aperture format cards were normal cards with a hole to accept a small piece of microfilm to hold things like graphics.
Even IBM computers that thought they were using cards weren’t at the end. A typical IBM computer was taking “virtual card decks” from magnetic tape or floppy before cards finally died. Can an Arduino read cards? Yes, yes it can. Punched cards famously were developed not for computers, but for looms. They were also used much later for tube testers.
Title graphic from Columbia University.
Very interesting stuff here !
I remember an uncle telling me stories about his young time when he went to Switzerland from France on a regular basis with a bunch of punch-cards with him (he was a researcher at the university).
Each time he told the border-control guard that the less weight, the more info on the cards.
Obviously the guard didn’t understand a word of it and frowned to appear very suspicious…
High School RPG II and COBOL on these cards. When I took COBOL I was the lab assistant and got to run the jobs.
High school for me, but mostly FORTRAN IV (sort of – the IBM 1130 version did not have logical IF’s and only 5 character variable names)
When the term in math class came up that covered computers, the teacher said I knew more than he did and just had me help the other students.
And if you are the robomonkey who was on another blog, you are missed there. You know how to contact me if you need to.
this robomonkey is old. Remind me of the blog and I might remember. too much going on, so I may have easily forgotten.
My first exposure to the 029 was a near disaster.
I used a Litton Monroe 1776 programmable desktop calculator to program a simple Tic-Tac-Toe game as a demo to my SciFi class about where AI would take us. The program was on 4 punch cards supplied with the Monroe and you used a hand stylus to punch holes to encode the instructions. (And scotch tape and a spare chads to add a mis-punched chad back to the card.) The Monroe cards were dark brown, darker than a paper bag.
Anyway, after my program was working, I stopped by the county school data center and asked if they could duplicate the cards for me, since the hand-punched ones tended to be fragile and I was worried about my class demo. The guy returned to me 4 IBM punch cards, the standard creamed-colored ones.
Problem was, the replacement cards would not read correctly. After some experimenting, I realized that the IBM cards light color was the problem as the Monroe optical reader needed those darker brown cards. A quick trip to the school art department and a helpful student used an airbrush and some black paint to darken the IBM cards.
The AI demo to the SciFi class went off without a hitch. This would have been 1974.
My first access to computers was during a non-credit course that I took in ’71-’72. We met 3 days a weekend and had to give up a free study period. All our programs were in Fortran 4 and put on punched cards. Then sent off site to be run when a business had time at night. Sometimes there would be as many control cards as would be for the actual program. It did get my feet wet into the computer world.
Your ref to JCL is making my eyeball twitch uncomfortably.
Still not as bad as Javascript.
Not as bad as javascript? How do you delete a file in JCL? Mention it and have dispose=delete.
Javascript makes much more sense (and I don’t like javascript!)
My dad tells stories about taking his stacks of cards down to the library at his college to have the attendant run them through the machine to compile the program. Some of the programs were big enough that it took a while for them to be processed and you had to sit there with the machine and attendant while it churned through the cards.
So, college students being the devious people they are, would put in a “coffee break” card. Which was just a duplicate card about halfway through the stack that had been soaked in water and left to dry. When they fully dried out they were slightly larger than a standard card and would jam somewhere in the machine. While the grumbling attendant dug through the machine looking for the jam to clear the card, the students stepped out for a coffee and or smoke.
Amateurs.
IIRC FORTRAN without Wat5 would let you blow the stack and crash the OS. Much better for breaks. Much more annoying to other users too.
During the mid-70s I was part of a team that developed the ARPAnet ELF nodes that were used to connect CDC 6600/7600 and Cray-1 supercomputers at a number of Air Force research labs to the network. We used a PDP-11/40 running RSX-11M to emulate a remote job entry station on the host side and connect to the IMP (interface message processor) on the network side. This allowed transferring data files from one host to another over ARPAnet as, oddly enough, virtual card decks.
One thing to remember if you’re playing with these older machines: While chad from punching paper tape makes good confetti, chad from punched cards should _not_ be thrown about. Being stiffer and having sharp corners, it could pose a risk of eye injury.
(And yes, chad was the proper term long before the infamous Hanging Chad.)
On the card punch machines in the student cluster, the chads were collected in a removable bin under the keyboard. As a joke we took one of the bins full of chads and put it in the PDP/11 terminal cluster controller cabinet. Then finding some gullible first year student, we’d ask them if they wanted to see the bit bucket where all the used bits in the computer are collected.
In high school [’62-’68, the joke for the gullable was that the chad was what was left over when computers ’rounded off’ numbers.
The proper disposal method for chads was into your friend’s car’s heater air intake (Kids: this was before cabin air filters were a thing).
Now you _have_ to use glitter, which makes friend’s SO think ‘strippers’ so is worse.
Those sharp corners also made that Chad persistent. My middle school banned all Chad and confetti after punch card Chad was used. Five years later they were still finding it stuck in the carpet.
The sys/3 96 column cards made reasonable business cards too..
The punch could be programmed to punch a lace image and could print anywhere on the card. Dad had ones with a pumpkin image for Halloween.
In UBA-Ingenieria I liked to fill the hose of a CO2 fire extinguisher with chad and open the valve aiming at the others.
The effect was fantastic.
They all muted inside the white gas cloud.
When the cloud vanished they all looked as if they had been under a snowfall.
My dad said it was really easy to take the chad waste bin, empty it into a vacuum cleaner and reverse it so it blew the chad out like a firehouse while also giving them a nice static charge making them stick to everything. Apparently this was easy to do under the 1″-2″ gap beneath someone’s office door so they would arrive to a wonderful surprise.
I used cards for my first year of college in Computer Science at the Illinois Institute of Technology and remember buying boxes of cards at the campus book store and having to carry them around.
Years later, I complained to a friend (a liberal arts University of Chicago guy) about carrying these heavy card boxes around (maybe 500-1000 cards?), he quipped: “So what are you trying to say; computer science was a jock major?”
It always cracks me up…
Ditto, but it was sophomore thru senior years for me. It wasn’t until my senior year that I found out that my careful work in placing the cards in order was completely unnecessary. Since each line/card had a line number, execution occurred in that order, not the order of the cards.
Is there an emoji that is hit-foreheadk-with-palm-of-hand? I’m an official OldGuy™ and don’t know squat about all them modern thingies… 😉
punch cards?
they got some…
https://en.wikipedia.org/wiki/Punched_card#/media/File:IBM_card_storage.NARA.jpg
>Each card held up to 80 characters, for a total of about 4.3 billion characters of data in this storage facility – *about the same as a 4GB flash drive.*
This is just insane…
In my first programming class (late 70s) I used punch cards. I consider it a rite of passage but not something I am nostalgic about. It didn’t take long for me to figure out that the video terminals in the computer cluster, being used by the upper level students, would be a superior method of entering and compiling my programs. I taught myself how to by the end of that first semester. Quite frankly I think the instructors started students out on cards because it was easy for the instructor — just three or four boilerplate job control cards at the start of the deck, one or two at the end, with your program stuffed in the middle. A lot easier to teach in a single class session then how to use the command line and a text editor. And perhaps part of the reasoning was also a way of winnowing out students who not do well in Computer Science. If you were not curious enough about learning the ‘advanced’ tools of the trade on your own, you probably didn’t have what it would take to succeed a very challenging curriculum.
My dad worked for the federal government — US Forest Service — and I recall that his paychecks, at least into the mid-1980s, were actually printed on punch cards, with the data from the check also punched into it. My understanding — which may be incorrect — was that this was so banks could more easily process the things; I don’t know how long that actually lasted, as Dad was a relatively early adopter of direct deposit, and his banking was then done at a federal employees’ credit union out of state.
He also had, by around 1980 or so, an early pay-at-the-pump gas card that was itself a punch card; it was accepted at a single unmanned gas station in our town, and by using the card, he’d get one bill for fuel at the end of the month. I’ve generally assumed that magnetic-stripe reading was either too technical or too expensive, and that the station was meant for fleet use but was available to individuals if they knew who to ask.
(That was meant as a general comment, not a reply. Bah.)
I began my engineering degree in the early 70. When I started calculations had to be undertaken manually or by calculator or computer. Being an engineering student, the calculations required were more than trivial, even for my HP45, so Fortran was the language of necessity.
The university had a ICL mainframe computer and jobs were submitted on punch cards. As lowly undergraduates the bare minimum priority for computer access was provided. You placed your bundled cards in a pigeon hole at the computer centre and after 24 hours they would reappear wrapped in a 132 column printout of your program’s results, along with a message of how many mS of “mill” time your job had consumed. Nothing was more discouraging than discovering you job had not run due to a syntax error or out of sequence card in the stack.
Cards had to be punched on a keypunch machine – a manual machine with a large dial showing all the alphanumeric character. You dialed up the character you required then punched down on the card. It then advanced a column. How we envied those who could get access to the electric machines where you could type the program lines or print out your deck to see if everything looked ok.
Fortunately, as the course progressed the university computer centre upgraded to a Digital Equipment computer and terminal access became available, if you could find an unoccupied terminal somewhere on campus, otherwise back to the cards . Finally the Engineering Department provide access to their Varian minicomputer for latter year students, almost like a “personal” computer.
Had the 12 key manual punches at school, they were fairly hrrid.
Mark-sense cards were the best. You used a 2B pencil to mark them. Meant you could go out to the tramping club hut with a box of cards, and do your programming assignments, write programs to process the results from physics labs, and just come back and run them every few days.
I just came across a few Fortran cards. I had friends who were astronomy grad students and had many boxes of used cards. Two boxes equaled one cinder block for making bookshelves.
Good memories! I grew up playing with old punch cards my parents brought home as scrap paper for toddler-me to doodle on…
Most had cobol printed on them, but every now and then I’d find one where my parents had punched out their initials.
One trick we used was making a line at an angle across a card stack with a colored felt tip just in case. One week I spent long days and nights on a programming assignment. I was so tired I didn’t mark my cards. I had only a couple of hours to get my run done before class. I handed it to a dope head student worker (70s) in the data center who walking across the room to the card reader.. dropped my stack… all over. Murder was top of the list. I managed to get the stack resorted and run 5 minutes before class. He avoided me the rest of the semester.
I was shown around various universities computer department when picking my B.Sc. course in 1981.
Birmingham – one of the largest IBM facilities – still used exclusively punched card input. I asked about terminals, and no, they didn’t have any.
So I went to Durham, with it’s PDP11’s and terminals for the computer science students. However they still had a massive IBM360 mainframe on the ground floor, for use by all the other departments. If you were a geography or maths student doing a compute job, you used that, and punched cards too! I heard later that there was one geog undergrad who submitted his FORTRAN job on a stack, only to have it returned by the operators with a syntax error. So all he used to do was shuffle the stack, semi randomly, and resubmit it! Those were the days…
You neglected to discuss alphabetic character encoding, which is pretty straightforward. Each character was done with 2 punches: a punch in one of the upper 3 rows, plus a punch in one of the lower 9 rows. So a top-row punch encodes A-I, a 2nd row punch encodes J-R, and a 3rd row punch encodes S-Z, except the lower punch is shifted down by 1, since for some reason the ‘/’ symbol is inserted into the start of that range.
As far as special characters, most of them are done with a row 8 punch plus one or two other punches. Exceptions are ‘&’ (1st row punch only) and ‘-‘ (2nd row punch only) and ‘/’ as mentioned above. (The ‘&’ is the line-continuation character in Fortran, similar to in Linux.)
If you’re wondering why the decimal point doesn’t have a simple encoding, it’s because decimal points weren’t usually encoded. Rather, the numbers were just assumed to have a decimal point in a particular position, and they were all lined up appropriately.
Reminds me that the IBM 1130 had a console typewriter. The keyboard sent card code but the printer used EBCDIC (Extended Binary Coded Decimal Interchange Code; IBM’s 8 bit text coding, not ASCII), so to echo characters, you needed to convert codes.
Punched cards stayed in use professionally even while more sophisticated methods were available.
They were still used to control the Pioneer 10 spacecraft for the 1973 encounter with Jupiter. (And that was a probe that had no computer, so every single action had to be radioed up to it.) The book “The Depths of Space” quotes science chief Richard Fimmel, “As we were going to Jupiter there was an intensive amount of work with the IPP [Imaging Photo Polarimeter]…. We coded over 10,000 commands on punchcards. I would be traveling back and forth to the University of Arizona and working with the team and grad students.” (Presumably with the cards in hand.)
Years ago, the Boston Museum of Science had a traveling exhibit of Soviet spacecraft. One of their Venus probes had for its sequencer a long paper tape that would trigger events as it moved through.
I was always fascinated by the storage density improvements in the industry. I started with paper tape recordings of programs as a kid in the 1960s and 70s, then moved on to COBOL and FORTRAN on punched cards at the university. Meanwhile in the mini/micro computer world, 80KB floppy disks had arrived, and that was a Very Big Deal because 80,000 bytes was the equivalent of a whole box containing a thousand punched cards!
Our college had a UNIVAC 1100/80 mainframe computer, which of course had to be fed with cards. By my second year they had installed a VAX front end where we could log in on a serial terminal and use a text editor to write programs, replacing the awful things. Exactly zero people missed the punched cards, except maybe a work-study student who lost his job hauling stacks of cards around the data center.
We also weren’t loving the early cold-war-era mainframe. It wasn’t long before we started writing, compiling, and running our programs directly on the VAX, and the mainframe was eventually sent to graze in a nice green dinosaur pasture, far, far away.
The UNIVAC 1100/780 is definitely not an “early cold-war-era mainframe”. It was first delivered in 1979–more than thirty years after the start of the cold-war era. It’s technology was comparable to the VAX series of computers which were delivered at about the same time. I’ve never encountered a UNIVAC 1100/780 using punched cards. All my programming of them has been with video terminals. The use of punched cards is more a reflection of the backwardness of your university than the capabilities of the machine.
Ooops! “UNIVAC 1100/780” should be “UNIVAC 1100/80”.
Worked on the IBM 029 card punch machine which could store 2 programs and then the cards data entry was verified on the IBM 059. When we went to the IBM 129 we thought we had surely been blessed. The 129 could have up to 6 programs at one time! Oh, those were the days!
Now I’m back in the late 70s punching Fortran code as a freshman in my alma mater at 2AM, fog rolling outside the computer lab we peasants were allowed to use by our sysadmin overlords. Hair in my head and not a worry in the world besides choosing a not-too-chilly place in the floor to sleep an hour or two.
I don’t want to come back to 2022!
Thanks Al, Nice write-up
Thanks all, for the memories
When I started as a mainframe operator in 1985 we had one punch machine “just in case” and one reader attached to the mainframe. We had to run a card through at IPL time. The were boxes and boxes of new cards stored in the basement for years.
Many card readers did not use spring contacts, but had photocells. Much faster.
And if anyone needs to unjam or change the ribbon in an 029, I still remember how. (But for unjamming, please have a card saw)
As for the “sorting stripe”, when I was in college, someone had a program that took up most, if not all, of a box of cards. The student operators copied the program, then, when they went to hand the original back, “tripped”, throwing the box to have all the cards fall out. The person whose deck it was jumped over the counter to catch it, but failed. Then they brought out the copy.
Ah, the days of, as a CS professor said, “Wooden computers and iron programmers”.
Nowadays, I have watches more powerful than the IBM 1130.
I suggest a topic about card sorters next. Lots of movies back in the day featured them, as they were impressive beasts.
When I started at IBM Mohansic in 1968, all of our programs were written in Assembler or PL/1, key punched onto cards, and entered into our System 360 Mod 40 through a card reader. It was a BIG deal when the 2741, 2260, and 3270 displays were developed for data entry!
I’m surprised nobody has mentioned the left-thumb and right-thumb techniques, useful for inserting or deleting columns when copying a card on the 029 and 026 keypunches.
Also, cards were sometimes used for micro-programming. Some of the lower-end IBM 360 machines used plastic 80-column cards as microprogram storage.
Plastic cards? That was a good idea. We had binary boot decks for the PDP-8 cluster controllers. With a boot deck each column represents a binary code (number), not a character encoding, so the cards were more like a flimsy piece of lace given all the holes. Boot decks did not have a very long life if not handled very carefully.
The “cold start” cards for the IBM 1130 were binary; there was a mode that loaded the 12-bit card code into the 16-bit word in a way that was sufficient for a boot loader. (Couldn’t use index registers, if I remember correctly). Delicate cards. Possible to duplicate on an 029, but you had to dup a few columns, let it recover, dup a few more, or the dies would get jammed punching the card.
I also used Data General Nova computers that had a binary paper tape boot loader, punched on Mylar tape so it wouldn’t wear out from the ASR 33 teletype readers.
I’m just digging all the anecdotes from people even older than I.
I have said I should retire to the Living Computer History museum as an exhibit.
The sound of the IBM 029 card punch still echoes in my brain: Chop-chop-chop…chop chop chop (punch by typing) click (begin card eject) swiiiisssh kurchunck swish click (ready to punch new card). Imagine a whole room filled with dozens of 029 punches all repeating the same sequence.
Not many modern machines make such satisfying sounds while operating. In fact there are very few modern mechanical marvels like the 029. If you used them enough you could tell by sounds if something was wrong or close to going bad.
My father used to repair IBM sorting and adding machines for a government office and when they didn’t have the money to pay the salaries they, government employees, would doctor a card, punch it manually, to simulate a failure in the multiplying machine. My father who didn’t understand how the multiplying machine worked, had to call someone from the capital to make the repair, they knew what was going on and at some point told him how to look for the manually punched card, sadly after he was laid off. There where other methods to avoid paying salaries, destroying the head of printer used to print the bills was one of them. This was in Argentina.
Punch card programming has been around a lot longer than you think. Chained together punch cards ran looms in the 1800’s and then later on they ran the music in a Nickelodeon Orchestrations.
The Jacquard looms. Babbage used the system as inspiration for the cards in his Analytical Engine.
Dont forget collectors and sorters that were programmed with a box of patch cords.
Surprisingly recently, in my freshman year at University, I had a professor for my first computer science class who maintained a vintage IBM machine room. He made all of his students use this hardware with punch cards for the first three projects. He insisted that it developed careful thinking and discipline while writing code because of the painstaking and time consuming process involved with typing up all the cards and submitting and reviewing the results in print outs. He was right, though we all backslid some when allowed to progress to keyboards and screens! I value the experience along with the sounds and smells of that old hardware, which we were expected to help maintain. It was actually a privilege.
Bob Newhart did a humorous skit where he played a patent clerk taking a telephone call from Herman Hollerith.
https://youtu.be/2eJb3Ee8Xmc
First program was in high school learning Fortran with punch cards. All the cards were stacked with blue cards separating the programs of each student. The stack was send to the School Board office and send back two days later. We only complained if the latency was greater than 4 days. lol
In 1978 my high school had a BASIC programming class, but we had to use Punch Cards. It got worse – the teacher would take our cards to the local community college once a week to have them run (or not). Talk about long compile times!
The last bug
“But you’re out of your mind,” they said with a shrug.
“The customer’s happy; what’s one little bug?”
But he was determined. The others went home.
He spread out the program, deserted, alone.
The cleaning men came. The whole room was cluttered
With memory-dumps, punch cards. “I’m close,” he muttered.
The mumbling got louder, simple deduction,
“I’ve got it, it’s right, just change one instruction.”
It still wasn’t perfect, as year followed year,
And strangers would comment, “Is that guy still here?”
He died at the console, of hunger and thirst.
Next day he was buried, face down, nine-edge first.
And the last bug in sight, an ant passing by,
Saluted his tombstone, and whispered, “Nice try.”
Face down, 9 edge first. Copied from https://www.gnu.org/fun/jokes/last.bug.en.html
I think it was “Is that nut still here?” when it was published in Decuscope back in the early 1970’s
Lovely photo, it even has the mandatory piece of sticky tape on the desk 🙂
I worked with punch cards in the 70’s. Anyone who has gone to the computer room at 3am to avoid power surges, tried to load five 30 inch trays of compiled binary code, only to see the card reader chew up the next to last card, will hate the dawn things as much as I do.
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.
By using our website and services, you expressly agree to the placement of our performance, functionality and advertising cookies. Learn more

source

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles