Home   Ramblings Top   Music   Bottom Index   Prev   Next

My Life With Computers

My Junior Year at MSU


My Model A Coupe My junior year was a very eventful one in my computer career.

Fall quarter, there was a course being offered by the fledgling Computer Science department on programming in Metasymbol, which was one of two assemblers provided for the Sigma 7 computer. I had no idea what Metasymbol was (I didn't figure it'd be much different from Fortran), but it was a programming class so I wanted to take it.

There was a slight hitch getting into this class. It was only offered at 1:00. And I was required to take the Electronics class. This was also only offered at 1:00. What was a guy to do?

MSU had not yet gone to computerized registration. At the beginning of each quarter, there was a day-long registration gala. Each department had a booth set up in the fieldhouse and all of the students (somewhere around 10,000 of us) had to wander around to each department for which we wanted to sign up for a class and wait in line for our authorization. It generally took several hours to get through all the lines and be registered. Of course, the classes you wanted were always full and they'd try to stuff you into another section or not let you in at all.

This time I decided to be sneaky about getting the classes I wanted when I wanted. I filled out all my paperwork in pencil rather than pen (a no-no), and I first got registered for the Metasymbol class. Then I erased the time and put in a different time and got into the Electronics class. Then for the various classes that were offered at multiple times, I erased the times for classes I had already registered in and put in the times for which I didn't want to go to the other classes. As I went to each of the other departments they'd try to put me in other sections but they'd find that I already had classes scheduled there and they squeezed me into the sections I wanted. I got exactly the classes I wanted when I wanted - even the two classes that were both at 1:00.

My Model A Coupe Fortunately for me, the professor for the Electronics class was one of those less-than-ambitious profs that basically stand up in front of the class and read the book to you. Most days, I attended the Metasymbol class and just went to Electronics on test days. The prof either never noticed or didn't care.

Metasymbol proved to be quite different from what I expected, and I was pretty much lost at first. The first few class assignments were just some little true-or-false or multiple-choice questionaires, and I always seemed to need to be at Electronics the days they were due. I didn't turn in the first few. I didn't figure it would matter much - our grades would surely depend on how we did in actual programming assignments and finals.

Metasymbol was designed in part to allow you to easily implement assemblers for other computers than the one it ran on, and our final project involved writing an assembler for a made-up computer's machine language. I was the only one in the class to fully complete the final project.

I was pretty surprised when, home in Missoula during the Christmas vacation, I received my grades for the quarter. I aced the Electronics class. I got a D in Metasymbol. When I confronted the professor, it was because I didn't turn in all the assignments! That was my first D (but as it turned out, not my last).

I generally got pretty good grades at the university. My first freshman quarter, I got a 3.54. The second quarter, I got a 3.92 (a B in volleyball), giving me an average of about 3.75. But every quarter from then until graduation my average went down a smidgen. I graduated with a 3.26 average, just enough to graduate with honors (which required a 3.25). Another quarter or two and I probably wouldn't have made it.

My Model A Coupe Spring quarter rolled around and I signed up for a course in algorithms. The textbook for the class was Knuth's Fundamental Algorithms. This book had a peculiar method for teaching algorithms: it used a very odd made-up language for presenting the algorithms so that the presentations wouldn't be tied to any specific language. MIX was designed so that it could apply to any computer. It didn't matter whether the computer was a binary computer (like all of today's computer), a decimal computer (like the IBM 1620), or anything else (a ternary computer, anyone?). A "byte" was defined as a field large enough to hold at least 64 distinct values but no more than 100. A "word" consisted of five bytes plus a sign (either plus or minus). An "instruction" was also a five-byte-plus-sign that had an op-code, an address, and an index register. Don't worry about it if all this means nothing to you.

An enterprising graduate student had written a MIX compiler for the Sigma 7, and we were able to write MIX programs and run them using his compiler.

As our final project, each of us had to choose a project from a list given to us by the prof, who happened to be the head of the Computer Science department. I chose the most difficult one, and was the only student to do so (not that I wanted to work all that hard, it's just that it was the only project listed that seemed halfway interesting). I had to modify the MIX compiler to allow indirect addressing. After the modification, the address in the instruction could point to another address instead of to the actual data to be worked on. Furthermore, that address could point to another address, which could point to another address, etc, with no limit. At any point in the indirect addressing structure, index registers could be called in to offset the address either before or after moving on to the next address. And of course the compiler would have to recognize at run time any attempt to have a circular loop in the list of addresses, and abort the instruction.

If you don't understand all that, don't worry about it. But believe me, it can be a little hairy. And I had never seen the code for the MIX compiler so I really had no way to know how I'd be able to code this.

We signed up for our projects about mid-quarter. I had to contact "Joe" to get the code for his MIX compiler. Somehow I just kept putting that off and putting it off. Situation normal for me, in other words. Besides, I had better things to do.

===> A diversion: Hitch-hiking to Denver.

Well, the beginning of finals week rolled around and I decided I'd better get working on this. On Tuesday, I got the prof to introduce me to "Joe" (notice how I've changed his name to protect the guilty, also because I don't remember his name) who gave me his listing for the compiler. All 10 inches of it. Written about half and half in Fortran and assembler.

So I took the 10-inch stack back to my unfurnished apartment (not completely unfurnished, I did have an army cot I slept on). I sat on the floor and began leafing through the listing. It was surprisingly well written - my programming style still includes a lot of influence from that listing. I honed in on the section of code I'd need to modify within an hour or so. Of course, that section was written in assembler.

My Model A Coupe Within a few hours, I had crafted about four pages of code that I thought would do the trick and headed up to the basement of the library where the Sigma 7 resided. This was where I'd live for a couple of days, as it turned out. (Fortunately, due to somebody's snafu somewhere along the way, the key I'd been given to a basement room in Ryan Lab for an engineering project fit the lock to the computer center instead of the room it was supposed to fit and I was able to get in even during the dead of night. And since I had a key, everyone there assumed I had the proper authorization to be there.)

The operator was very understanding, and when I'd bring my latest deck of cards up he'd run it through very quickly for me, so I'd get a number of turnarounds during the night (couldn't get it through anywhere nearly as quickly during the day). By Thursday I actually had it working.

Then a flash of inspiration hit me. I realized that the compiler was even better written than I realized, and because of "Joe's" fantastic design the whole problem could be done with about eight lines of code. So I took out all the stuff I had put in and put in my new code. A few turnarounds later, I had a very elegant solution to the problem.

Friday morning I walked into the prof's office with my 10-inch listing and a bunch of sample outputs to prove that it all worked. I could see by the look on his face that he was just waiting for me to come in and say "sorry, I didn't get it done." I'll never forget the look of astonishment on his face when I plopped the working version in front of him. Which grew to even greater astonishment when I showed him the code.

It certainly didn't seem like a big deal to me at the time. But it seems that this prof liked to talk about his clever student, and when I returned to school in the fall I found I had a bit of a reputation around campus. Which led to some nice opportunities.


Home   Ramblings Top   Music   Bottom Index   Prev   Next


Home   Ramblings Top   Music   Bottom Index   Prev   Next