Please use the "Index" for better experience.

Saturday, October 01, 2011

Anatomy of CP/M

                        The major reason for creating CP/M was to provide users, software developers (hobbyists), and software and hardware manufacturers one  single, standard interface, as there was no standard interface at that time. To achieve this target of making CP/M a standard, CP/M was built in three different parts: BIOS, BDOS, and CCP.
                        The BIOS (Basic I/O System), is a concept pioneered by Gary Kildall, which we still use in personal computers. This BIOS in CP/M, is similar to a monitor,but with standard specified functions and interfaces. The BIOS is a set of programs, usually stored in a ROM chip which placed on the motherboard. The BIOS directly controls hardware components other than microprocessor, and memory. Each manufacturer of computer kits, who wanted to use CP/M on their computers, was supposed to adapt this BIOS. (Later, all of the manufacturers, almost all of them, adapted this concept of BIOS.) The interface to BIOS, however, is the same, no matter how the underlying devices might work.
                        Gary called the core of the CP/M operating system as the BDOS, for Basic Disk Operating System. It is what we call the kernel today. It is independent of the hardware, and performs more primitive services. That means BDOS is same for all the hardware systems (with no changes), that CP/M is to run on. (In this time, DOS / monitors had to be written differently for each kind of hardware.)  Handling different types of hardware is task of the BIOS. The BDOS implements the CP/M filesystem, and some input/output abstraction*1 on top of the BIOS.
                        After BIOS, and BDOS; third and last component of the CP/M is the user interface: CCP – Console Command Processor. It is a text based user interface. Each of these components have size around 2000 to 4000 bytes. The BIOS, and BDOS are memory resident, that is they are always present in the memory. And, in the case of CCP, it is memory resident unless the memory is required for any other program. In such case, CCP would be over-written by the program (which requires the memory), and after the program finishes the execution, the CCP would be automatically reloaded in the memory. (More on this in “Memory Management”.)

                   The BIOS portion was always adapted to the particular hardware. Adding memory to a computer, for example, meant that the CP/M system had to be reinstalled. Once installed, the operating system (BIOS, BDOS and CCP) was stored in reserved areas at the beginning of any disk which would be used to boot the system. On start-up, the bootloader (usually contained in a ROM firmware chip) would load the operating system from the disk in drive A:
The major complexity of CP/M was reduced in the BDOS, and to a lesser extent, in the CCP and transient commands. This meant that by porting the limited number of simple routines in the BIOS to a particular hardware platform, the entire OS would work. This significantly reduced the development time needed to support new machines, and was one of the main reasons for CP/M's widespread use. Today this sort of abstraction is common to most OSs (a hardware abstraction layer), but at the time of CP/M's birth, OSs were typically intended to run on only one machine platform, and multilayer designs were considered unnecessary.



*1=A standardised interface that provides general system functions but hides all the messy hardware details is called as abstraction.

Thursday, September 22, 2011

Rise of CP/M : A Brief History



        In the 70's decade, there were many companies building computer kits, and all of them were providing a monitor program of their own. (There was issue about "Portability", which I'll explain later.) These monitors were small in memory, and required very few memory space varying from a few hundred to few thousand bytes. Typically a monitor provided only a few functions ranging from 10 to 15 functions. But these programs required time and expertise to develop, debug, and build. Even worse, there was no standard monitor.Each company simply added the functions they thought that users wanted. This created a problem for application programming. Because of the different monitor programs, application programs had to be especially written for each manufacturers computer. This situation led to development of CP/M [Control Program/Monitor].
        In 1973 Gary Kildall 1973 developed the first high-level programming language for microprocessors, called PL/M. While working for intel, in the same year,Gary created CP/M as the first operating system for the new microprocessor Intel 8080. He demonstrated CP/M to Intel, but Intel had little interest in CP/M and chose to market PL/M instead.
        Later, Gary and his wife Dorothy established a company, originally called "Intergalactic Digital Research" (later renamed as Digital Research, Inc), to market CP/M. Digital Research licensed CP/M for the IMSAI 8080, a popular clone of the Altair 8800. As more manufacturers licensed CP/M, it became a standard and CP/M had to support an increasing number of hardware variations. In response, Gary pioneered the concept of a BIOS, a set of simple programs stored in the computer hardware which enabled CP/M to run on different systems without modification.
        CP/M's quick success took Gary by surprise, and he was slow to update it for high density floppy disks and hard disks. After hardware manufacturers talked about creating a rival operating system, Gary started a rush project to develop CP/M 2. By 1981, at the peak of its popularity, CP/M ran on 3,000 different computer models and DRI had $5.4 million in yearly revenues.

Sources:

Study of Computers and History of Computers since last almost 12 years.

http://www.digitalresearch.biz/CPM.HTM (Official Home Page of CP/M)
http://en.wikipedia.org/wiki/CP/M
http://en.wikipedia.org/wiki/History_of_operating_systems

See Also :

http://en.wikipedia.org/wiki/Intel_8080 (The Intel 8080 Microprocessor)
http://en.wikipedia.org/wiki/Intel_4004  (World's first Microprocessor, an entire Central Processing Unit on one single chip)

Regards,
Kiran :)

End of Line <

Monitors: The Ancestors of Operating Systems

Note: This article is about the system monitors for early microchip based desktop computers. This is part of series of articles about CP/M, the operating system.
       Around 1974, when personal computing was very new, single chip microprocessors made it possible to build small, comparatively inexpensive computers. This lead to birth of several small start-up companies, which sold kits for home hobbyists who wanted to build their own computer. These kits typically contained a circuit board, a  microprocessor, some memory chips,(this means, these kits "typically" did not contain video monitors), and some additional device controller chips. These additional chips were for controlling various input and output devices like paper tape, cassette tape, and floppy disk drives.
        In early days, these computer systems had one to four kilobytes of memory, or sometimes even less. Application programs were written in machine language and/or assembly language.
        Because of this lack of memory, there was typically no operating system. But, there was a small "monitor program" usually stored in a ROM (Read Only Memory), that would allow an application to do simple common tasks, such as:
- get character from keyboard device
- output character to a device such as teleprinter or printer
- save the contents to a cassette tape or a floppy disk
- restore contents from tape or floppy

The monitors did only such basic tasks, that is all about them.

Sources :

http://en.wikipedia.org/wiki/History_of_personal_computers
http://en.wikipedia.org/wiki/History_of_operating_systems
http://en.wikipedia.org/wiki/Mark-8 

Regards,
Kiran :)

End of Line <