Friday, August 17, 2007

The Contributions of CP/M

Gary Kildall’s CP/M was the first general-purpose operating system (OS) for 8-bit computers. It demonstrated that it was possible to pare down the giant operating systems of mainframes and minicomputers into an OS that provided the essential functionality of a general-purpose Application Program Interface, while leaving enough memory left for applications to run. This was a radical idea.

Beyond this technical achievement is the success CP/M had in the marketplace. It stands alone as the catalyst that launched the microcomputer industry as a successful business. Without those signs of success, companies like IBM wouldn’t have been tempted to enter the business and fuel its growth.

The Significance of the BIOS Interface

The concept of a software interface between separate programs or program components has been around for a long, long time. The most obvious example is the Application Program Interface (API) that all operating systems provide to application programs.

But interfaces can exist at other levels, not just between the OS and applications. Interfaces are used whenever two components must interact, but the components are developed independently or may need to be changed independently.

Much has been made of the layers of interfaces used by CP/M. (John Wharton: “Gary’s most profound contribution”; Harold Evans: “truly revolutionary”, “a phenomenal advance”; Tom Rolander: “supreme accomplishment”, “originator of that layering of the software”.) The core of CP/M was the Basic Disk Operating System (BDOS). On one side of the BDOS was the API exposed to application programs; on the other side was the Basic Input/Output System (BIOS) that connected the BDOS to specific computer hardware.

Certainly the idea of these layers of interfaces was not new to the computer industry. For example, UNIX (like all operating systems) provided an API for application programs, and connected to the hardware with an interface to low-level device driver software. These are equivalent layers to the CP/M’s BDOS and BIOS, but much more sophisticated. So I am a bit mystified as to what is so revolutionary about CP/M’s design.

Of course, being the first microcomputer OS, CP/M was the first to put these layers on a microcomputer. So I guess in distilling down the essence of an OS so it would fit on a microcomputer, we can give Kildall credit for not distilling out too much and leaving out the interface layers. Except that he actually did, originally. As described in his memoirs, quoted by Evans, in early versions of CP/M he had to rewrite the parts that manage the hardware “so many times that the tips of my fingers were wearing thin, so I designed a general interface, which I called the BIOS.” I read somewhere that the BIOS interface was first added to version 1.3 of CP/M. It may well be that Kildall had not seen a device driver or BIOS-level interface before. But the advantages that became obvious to him had been just as visible to his predecessors.

I equipped my first computer, an IMSAI 8080, with the North Star floppy disk system. It came with North Star DOS, which was the first OS that I personally used. It, of course, had a low-level interface so it could be tailored to work with any hardware. This is where my experience with interface layers began. I had not seen CP/M at the time.

CP/M & the DOS Connection

I can think of no specific technical innovations demonstrated by CP/M. The new idea was simply that you could do it – you could actually put a general-purpose operating system on a microcomputer. It worked and the market loved it.

DOS was built on top of this general groundwork. Kildall distilled the OS to a minimal, useful set of capabilities that would fit on a microcomputer. This simplified my task in setting the functionality of DOS. It was a matter of adding or subtracting to an existing & working set rather than developing the list from scratch.

DOS has been accused of being a “rip-off” or “knockoff” of the CP/M “design” or “architecture”. I guess this may refer to the fact that DOS has the same interface layers. Or it may refer to the similar function set. In that sense, since Kildall picked an appropriate set of functions, any subsequent microcomputer OS would have the same ones and would be some sort of “knockoff”.

4 comments:

gopesh said...

Hello Tim,

I am looking for contact details of yours and Mr Rod Brock ( owner of seatle computers). I will be thankful if you could provide me the same. I have recently seen a history channel episode on the QDOS, DOS and microsoft deal with seatle computers.
I have certain quesions which i thought that it would good to ask to you both directly.

regards
gopesh goyal

CG Paterson said...

I notice that you are from Issaquah.

Are you related to the late Alexander Paterson, also of Issaquah?

If so, we are related as I am the Great grandson of his brother Peter Paterson

Thanks

Colven Gibson
Newcastle
England

CG Paterson said...

I notice that you are from Issaquah.

Are you related to the late Alexander Paterson, also of Issaquah?

If so, we are related as I am the Great grandson of his brother Peter Paterson

Thanks

Colven Gibson
Newcastle
England

74eb6954-aa6e-11e0-b5cc-000bcdcb8a73 said...

Tim:

You fail to mention here that Gary Kildall drew heavily upon another source -- DEC's RT-11 disk operating system -- for his design. Not only were most of the user level commands the same in CP/M; the APIs were also similar. Given that RT-11 was designed to be a minimal disk operating system for machines that were running "real time" applications (hence the "RT"), it was already very lean and hence a good model for CP/M.