Sunday, September 16, 2012

I Did That!

I started working at IBM in copier final test. This was the IBM Series III Copier, their first plain paper copier. (IBM’s two previous copiers used treated paper, sort of like what some adding machines use.) IBM was forced to develop new technology to get around all the patents for copiers that Xerox held. So IBM attempted to developed xerography (from the Greek for “dry printing”) that was different technically from what Xerox owned the rights to. Amazingly, IBM did it. They developed a whole new type of photoconductor that worked with the opposite charge than what Xerox had patented. In fact, it was so successful that, ultimately, Xerox and IBM cross patented each other.

(What cross patent means is that IBM built up such a good portfolio of independent copier technology that Xerox actually wanted access to our patents. In cases like that, corporations sign agreements that each company can use the other company’s patents free of charge.)

The Series III copiers were fast for their time and could do a lot of things like duplex and automatic document feed. It also had optical reduction so you could scan large documents like blueprints and schematics and reproduce them on normal sized paper. These were also very expensive copiers costing in the neighborhood of $20,000 in the seventies. That was back when Chevy’s cost less than $5,000 and $20,000 would buy a Mercedes Benz.

IBM was also working on something that today we would call a MFD or Multi-Function Device. This was called the 6670 and it looked like a copier, but it could also fax and print. In order to print and receive faxes, the 6670 used a laser to expose the drum rather than light reflected off a document. So it was one of the first laser printers. Again, the price was such you wouldn’t buy one for your home — assuming you had a computer in your home in the 70’s. Plus these copiers and printers were as big as two washing machines welded together. “Honey, do we have room in your laundry room for a printer?”

These were pretty sophisticated machines with lots of digital and analog circuits, but testing them mostly involved running paper through them, and I was an electronics engineer, not a mechanical engineer. I did learn a lot about spring clutches and paper “wifflers,” but it was not really what I was into.

I was soon promoted and transferred to disk drive and magnetic recording head manufacturing. Now that is more like it, lots of computers, digital circuits, and microprocessors. This was what I was really interested in. Now you may know that IBM invented most of the computer hardware that we take for granted today. IBM invented the disk drive, the floppy disk, and about a million computer architecture concepts such as instruction pipelining, virtual memory, and the list goes on and on.

Of course, as soon as IBM invented something, and produced the usual “Sherman Tank” based and gold plated design, someone else would build one smaller and cheaper and — although not as reliable or maintainable as IBM’s — as good as was needed. I think it was Microsoft that coined the phrase “good enough software” to describe programs that had not had over three years of testing and guaranteed performance. To this day, if you want truly reliable, six-nines (99.9999%) reliability, you don’t buy Windows, you don’t buy Apple, and you don’t even buy UNIX. No, you get an IBM mainframe. Just ask someone like Wal-Mart or American Express or the IRS whose computers they run all their systems on.

At that time IBM’s diskette drives all used eight-inch floppies. A former IBMer by the name of Alan Shugart had gone into business for himself and developed a 5.25 inch diskette drive, and that is what most personal computers of that era used. Steve Wozniak, the co-founder of Apple with Steve Jobs, had looked at an IBM diskette drive and the software that supported it. He famously stated,”I can do this with one-quarter of the components and about half the cost.”  And he did. Remember the early Apple II computers with the nice disk drives (those that could afford disk drives). They were in little metal boxes and it worked real well to put two disk drives on top of the Apple II and then put your monitor on top of the drives.

Meanwhile, other manufactures were making the drives even smaller. In Boulder we were working on IBM’s answer, code named “Foxtail.” It was a four inch drive with a hard plastic shell and we envisioned using them in electric typewriters. They were given the cute marketing name of "DemiDiskette." When IBM Boca Raton started developing the IBM PC, we pitched the Foxtail to them. They were concerned that our product had not finished development and they were on a very tight schedule, at least for IBM, and didn’t want to take the risk of using our unproven technology. They said the same thing to Sony when Sony offered their new 3.5 inch drive. That is why the IBM PC came out with 5.25 drives. They wanted to use the most common drive then on the market. It wasn’t until the PS/2 models that IBM went to 3.5 inch drives, and today you will have to really look to find a PC with a diskette drive at all.

When IBM released the PC, they also released a lot of software. They knew that success of this computer depended on available software, having learned that lesson from Radio Shack and Apple. IBM developed a very fine package. It was about eight inches high and contained a small three ring binder book in a box. The boxes were attractive pastel colors and the color indicated the family. For example, operating systems and utilities were pink, application programs like word processors and spreadsheets were green, and technical stuff was purple. The idea behind the three ring binders was so that documentation updates could be sent out and added to the manuals by the users. Additional technical information could be included with a peripheral, and put neatly into the appropriate three ring binder. At that time, all IBM technical documentation was in three ring binder format, although the smaller size and the nice box was a new idea. IBM had a lot of designers in those days, and projects would have hundreds of subprojects all leading to the announcement of a new product with all the nice additions ready for market.

Among the technical stuff was the IBM PC Technical Reference Manual. This was an information filled book that explained things like disassembling the computer, adding memory or disk drives, etc. This followed the model from Apple of allowing users and customers to upgrade their computer after purchase.

What is really amazing is that the Technical Reference included a complete, commented listing of the BIOS source code! Now, let me explain. Source code is the original computer program written in English. It is made up of computer commands (in this case in assembler language) and the comments are the human readable stuff that explained what the computer commands were intended to do. You would feed the source program into another program called an assembler (or compiler). Out of the assembler would come object code. Object code can be executed by the computer. When you buy a program on a disk or download, it is in object code. That is what the computer can understand.

Now source code is a closely guarded company secret. Source is the crown jewels of a software company. It is like the secret recipe to Kentucky Fried Chicken or the formula for Coke. You don’t give that away. So why did IBM provide the source listing for the BIOS?

Let’s talk about what a BIOS is. BIOS stands for “Basic Input and Output System.” It is the lowest level software in your computer and basically lets your computer “talk” and “listen.” Think about how computers work. You know that, after you turn them on, they have to “boot.” “Boot” is short for “boot strap,” as in, “to pick yourself up by your own bootstraps.” Now that is quite a trick. You can’t really reach down, grab those straps on the back of your shoes, lift up, and get yourself into the air. Someone else could lift you that way, but you can’t really lift yourself. It is an idiomatic expression meaning you made it on your own.

But what is a computer to do? Computers run programs. One of the programs is the program that loads programs. So how does the program that loads programs get loaded? It is a paradox equal to who shaves the barber in the town where the barber shaves everyone who does not shave themselves?  (Think about that for a while. Then I’ll tell you about Gödel!)

Anyway, the way out of this seeming infinite loop is that processors are designed to automatically load a program at a given, hard coded, address. So computer builders put a small hardware memory device called a ROM (Read Only Memory) that contains a bootstrap loader. The ROM contains enough code to set up the keyboard, the display, and the disk drive to be able to read in additional programs. Then the rest of the operating system is read off of disk. In those days the disk was typically a floppy disk.

The BIOS Source Listing was a printout of all these basic programs. So why advertise it to the world? Because IBM wanted to encourage other enterprises to both write programs for the PC and to develop devices like printers, scanners, and who knew what all. (Think digital cameras, iPods, and all the other devices we now routinely attach to our home computers.) By giving the source to the BIOS, IBM was sort of showing the way to interface to the PC. That very important information spawned a great industry of software and hardware suppliers. Think about Norton looking at the disk drive interface and saying, “I can create some neat utilities to expand the usefulness of the PC.” And so was born the Norton Utilities.

At the time, companies didn't give out technical details of their products. By breaking form, IBM essentially opened the door for third parties to build programs, develop add-on hardware and even sell their own PCs. The idea behind the Lotus Notes software, for instance, came partly out of the manual, said creator Ray Ozzie.

"We wanted the software and hardware industry to participate," said David Bradley, one of the original 12 designers on the IBM PC and currently a senior technical staff member at IBM. "We told all of the PC secrets. It came in a purple binder," he said, referring to the color of the PC's technical manual.

Now, meanwhile, in Boulder, Mickey Cheatham and another disk drive engineer, Wayne Overby, were busy reading the BIOS and figuring out how to attach our disk drives to the PC. Our team even designed a diskette drive card that was much better than the one in the original PC, and pitched it to Boca. They again turned us down since they said the current card worked fine. Now do you see why so many exIBMers start their own companies and are so successful? Lots of good ideas are ignored by large corporations.

As the PC grew in sales and success, IBM Boulder quickly decided they wanted to make 5.25 inch disk drives. And away Mickey and Wayne went. I remember the feeling of success when we first ran our code that actually turned on the red light on the disk drive. That was a major accomplishment for us, and we felt we had found the keys to the kingdom and had succeeded in opening the lock. We went on to develop a lot of hardware and software to support IBM manufacturing in Boulder as we rolled out our line of 5.25 inch drives, all built by robots down in building 22. Things were really rolling and I had plenty to do designing hardware for manufacturing including new bar code reading devices, testing these new drives, as well as doing statistical failure and reliability analysis. I was a busy guy, but I still had some time to play around with ideas.

As I studied the BIOS, I found several things very interesting. For example, in the typical IBM conservative manner, they had built 16 millisecond delays in the head movement algorithm to allow the head to settle after movement. This affected “seek time.” The access time of a disk is the time taken to retrieve the data. This access time is made up primarily of two factors, one factor is the rotational latency and the other is the seek time. Rotational latency is the time taken for the desired sector to pass under the recording head. The seek time is the time taken to move the heads to the desired track and this tends to vary from drive to drive but an average seek time of 10 milliseconds is not uncommon.

Once again, let me explain. Phonograph records, as you may know, have a long spiral starting at the outside and the needle follows the groove to the end of the song on the innermost loop. Disk drives, on the other hand, have a large number of concentric circles, and the head jumps from track to track. Now, when the head jumps under the force of an electromagnet called a solenoid, it oscillates a little after reaching the new track. It takes a few milliseconds for the head to stop “ringing” after a move. But, at the same time, the head is reading the track underneath and looking for the start of the track. In the old eight inch diskette drives, the start point was indicated by a hole punched in the diskette that a photocell would monitor. In 5.25 inch drives (Shugart’s brilliant simplification) the start of the track was indicated by data on the track.

So for the IBM BIOS to move the head and then wait 16 milliseconds before it started reading was very wasteful. You see, the software automatically tried to read for several milliseconds, and if it failed to read, it would try again, and again. Only after failing to read three times would it reset the head to track zero and start over. I quickly proved in the lab that, if you eliminated the 16 ms delay, the drive would almost always get the data on the first read (remember it had to wait for the disk to spin around to the start point in any case — latency — and these disks did not spin very fast), and if it did fail on the first read, there were still two more retries. So I removed the delay.

Now the delay was written in the ROM or hardware memory of the computer. But the IBM engineers were smart, they allowed the first few bytes read from the diskette to replace the hardcoded BIOS. That made it easy to repair defects in the BIOS program by simply creating a disk with improved code. To this day, computers work that way. So I modified the data on the operating system diskette and put my high speed code in there to replace the IBM hardware BIOS. The effect was amazing.

You can listen to an old IBM PC reading in the operating system from diskette and you can hear the disk drive move from track to track: click … click … click … click … and so on. With my update read in about the third track, it went click … click … click … clickclickclickclik… Quite an improvement. IBM liked what I had done and added it to the first update of the PC DOS operating system called version 1.1. I used to tell people to listen for the clicks and then say, “I did that!”

(IBM never patented that idea, although I did receive a nice reward for my accomplishment. IBM did not think it was an original idea. I think it might have been, but I didn’t have the horsepower back then to request a patent search. Patent searches are very expensive, so all patent applications are reviewed by a technical committee and only those deemed truly original and also of business value are forwarded. Ironically, I am now on the committee that makes that decision. At that time, the committee was certain of the business value, but they were not certain that it wasn’t an idea that had already been patented or was not even patentable due to the simple nature of the concept.  Dag nabit. I wanted that patent!)

Originally Written on Feb. 10, 2011.

No comments:

Post a Comment