Retrotechtacular: Programming By Card | Hackaday

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.

Retrotechtacular: Programming By Card | Hackaday
A deck with a “sorting stripe” by ArnoldReinhold, CC-BY-SA-3.0

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.

Reading

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.

Writing

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.

An 029 program drum

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.

Interpreting

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.

Your Own Cards

Custom card image from the virtual keypunch

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.

The Camp Lejeune Contamination Lawsuit: Can You Sue? Previous post The Camp Lejeune Contamination Lawsuit: Can You Sue?
How to Perform Seamless Time Tracking Through Facial Recognition Next post How to Perform Seamless Time Tracking Through Facial Recognition