My First Computer Program




My First Computer Program



by David Barth
January 18, 2001



Around late 1961, in my final lab class in navigation center computer school at Dam Neck, Virginia, two chief petty officers mentioned to me that the NAVDAC (Navigation Data Computer) had sufficient memory to run small programs that could be written by onboard technicians, like myself. At the time, I didn't know what kind of computer program might be needed since the Sperry NAVDAC had prewritten software used to integrate and control navigation information.

The NAVDAC had a drum for primary data storage, and it also had a small core memory, which was actually made of small ferrous donuts that had wires running through them. The drum was about two feet high with a diameter of about six inches. The read/write heads were positioned next to the surface of the drum by the use of a feeler gauge, similar to the way the gap is set in spark plugs, and screwed in place. The NAVDAC computer technology predated the use of floating heads that ride on the thin boundary layer of air next to the surface of a disk drive. When the bearings on each end of the drum wore, it began to wobble slightly, causing the read/write heads to cut into the surface of the drum like little lathes, destroying the data.

After I was assigned to the USS Lafayette, SSB(N) 616, in 1962, during the time when the boat was being constructed, and during the subsequent sea trials, I still didn't observe any computer program needs that had not been met by the Sperry programmers. However, on the initial deployment when we transited the Atlantic and entered the Mediterranean for our first patrol, we found that the need to print a navigation fix every fifteen minutes tended to interrupt other activities. We found that it was necessary to assign a person to sit at the console to print fixes. Since this was a tedious job, I decided to see if I could program the NAVDAC to take the fixes automatically.

The first 60-day patrol was spent learning the operational aspects of running the nav center and keeping the equipment humming along nicely. By the second patrol, I began to have a little free time, and I began working on the problem of writing a program to print a fix every fifteen minutes. Like most documentation created for the government, the NACDAC documentation was very thorough, and I found the documentation for writing a program to be easy to understand.

Since the Sperry programs were stored on the drum, I decided that I didn't want to upset their functionality by putting my program on the drum with them. I decided to use the core memory to store my program.

First, I wrote a small program to determine what areas in core memory were not being used to store data. I ran several applications on the NAVDAC, just to get it to use core for calculations, then I ran my little program to determine where I could store my program. As it turned out, the Sperry programs used only a small portion of the core memory as a "scratch pad" for calculations, so I had plenty of space to put the automatic fix program that I planned to write.

The NAVDAC was an octal machine, using eight-bit instructions, which were entered into the computer by pressing buttons on the front panel. After I had determined where I could load my program into core memory, I wrote a program that would check the internal computer clock, determine when a fix should be printed, and then print it on the console printer, automatically. I also added functions that would allow the program to be turned on and off from the main nav center console.

After a few days of testing the program, it was ready, and we began to use it exclusively. It freed up a person who would otherwise have to sit at the console, watch the clock, and manually print a fix every fifteen minutes. With the program, every half-hour or so, a person could tear off the fix information from the console printer and update the plot.

Word spread to other boats in Rota, Spain, and requests for my program began to come in. I punched out many copies of the program on paper tape and passed it on to guys on other submarines. I imagine they made copies of it and, eventually, it spread throughout the fleet.

This experience got me interested in programming, and when I got out of the Navy in 1966, I began my programming career. Although computers have changed quite a bit since the early 1960s, the concepts remain the same, and computers still provide job satisfaction (as well as frustration from time to time).