First languages: Rich Alderson

I was introduced to computers in the form of “Computer Math”, a high school class in programming in FORTRAN IV on the IBM 1401. My first exposure was as a guest of friends from the chess club, who were taking CM in the autumn of 1968; I was sorry that I had not known about the 1-semester class when I was signing up for my senior classes the previous spring.

This was the second year the class was taught, and demand was so high that the school district decided to offer it again in the spring. I rearranged my schedule, with the aid of the faculty adviser of the chess club (chair of the English department), and so began my life with computers.

The FORTRAN class was the usual, with lots of math oriented assignments as one might expect, since the teacher was the chair of the Math department. We learned to calculate areas of triangles, parallelograms, and so on, and how to make the printer and card punch do tricks. Exciting stuff (NOT).

Fortunately for me, my friends from the chess club were offered the opporunity to do a second semester of programming, taking classes in COBOL and PL/1 on Saturdays at the Illinois Institute of Technology. They used programmed instruction texts (read a paragraph or two, answer a question, see the answer on the next page, lather, rinse, repeat to end of book). I borrowed the two texts, read them cover to cover over the weekend, and proceeded to do all my assignments in 3 different languages.

I quickly fell in love with PL/1, which combined the mathematical capabilities of FORTRAN IV with the commercial processing capabilities of COBOL, and threw in marvelous string handling. Since I was interested in human languages already, this was a wonder and delight to me, to be able to string characters together on the fly instead of laboriously building a FORMAT statement to print a single line of text over and over.

For our final project in Computer Math, we were allowed to choose from several possibilities, such as “compute pi or e to 1000 places”. One possibility was to calculate the payroll for a mythical company; this is what I chose. I even used the 1968 tax tables, which included formulae for each bracket, to calculate deductions from people’s checks.

When it came time to turn in our projects, I showed the teacher all three versions of my program. He was dumbfounded. I got an A.

That began my lifelong interest in programming languages. Over the years, I have learned a couple of dozen, and have written compilers or interpreters for a few. I was always more interested in what I could do with a computer than in the physical details of how the computer worked, for years and years. That lasted until I went to work for a company building a new generation of one of the systems on which I made a living for decades.

But that’s a topic for another day.

First computers: Rich Alderson

I first learned to program on a 1401, a commercial computer from IBM. The particular system on which I learned FORTRAN IV had 12K characters in memory, a 1402 card reader/punch, a 1403 printer, and two 1311 disk drives with a whopping 400K character capacity. The character encoding was Binary Coded Decimal (BCD).

Note that I said “character” rather than “byte”. The 1401 came out in 1960, before the term byte came into broad use; originally, “byte” referred to portions of a longer memory word and did not refer to a specific size.

Characters are addressable in the 1401, and consist of 6 data bits, a parity bit, and a word mark bit which is used to define larger areas (“fields”) in memory. We’ll come back to the word mark in a moment.

The data bits in a character are labeled B-A-8-4-2-1. The B and A bits are called “zone bits”, and map fairly directly to zone punches on a Hollerith card to define alphabetic and special characters. The numeric bits directly encode the decimal digits 1-9 in binary; zero (“0”) is encoded specially, as 8+2, so that a space character can be represented as having no bits turned on at all. Alphabetics and special characters use a combination of numeric bits and one or both zones (e.g., “A” is B-A-1, “I” is B-A-8-1).

Data is operated on in fields, addressed by the highest numbered character in memory for each field. Processing of data begins at that location, and moves lower in memory for each step in the process: For example, addition starts with the 1’s place, then moves to the 10’s place, the 100’s place, etc. How do we know when to stop? This is the purpose of the word mark bit! The lowest numbered character in the field has the word mark turned on (set to 1), and the hardware takes notice of this and stops when that character is processed.

All of this is invisible to a FORTRAN programmer, or a user of any other high level language such as COBOL or RPG, but it is critical to anyone who needs to write in a machine language representation like an assembler program. The 1401 comes with two assemblers, the earlier, more primitive Symbolic Programming System (SPS) and the more powerful Autocoder.

The 1401 instruction set consists of individual characters, chosen to be mnemonic wherever possible: _A_ is the Add instruction, and _M_ is the Move instruction which transfers data from one field to another. SPS uses the instruction characters directly, so that a programmer has to know each one, and numeric addresses of fields. Autocoder instead uses English words such as “ADD” and “MOVE” for instructions, and allows the use of names with lengths assigned in place of numeric addresses for fields.

Finally, there are three predefined fields in memory which are used to move data between the card reader, the card punch, and the printer: Word marks are permanently set at locations 1, 101, and 201; a MOVE from location 80 reads a card from the reader and puts the new data into the destination field, a MOVE into location 180 punches a card from the source field, and a MOVE into location 333 causes a 132 character line to be printed. (The first character in a printed line does things like skip to a new page or double space).

That’s the first computer I used–even though I didn’t learn the messy internals for several years!