Monday, 18 November 2013

History Of C Language

Like many other inventions in history, C language also came from a need. C language evolution is closely related to the UNIX operating system.
History before C:
      In early days computers were used by individually. Bell Laboratories try to provide a operating system for a large computer, on which multiple users can work. For that they began a project called Multics, in which Dennis M. Ritchie and Ken Thompson work together with some other people at 1960s. But Bell Laboratories stop that project in 1969, because this project doesn't provide any economically solution. So that team move onto another project.

Ken Thompson started to work on developing UNIX kernel for PDP-7 machine. He also used B language in parts for implementing UNIX kernel, but most of that is done by the assembly language. By testing their UNIX operating system on PDP-7, Thompson team expects that they can acquire new DEC PDP-11 machine. The processor was among the first of its line delivered by DEC. Thompson recorded Unix kernel and some basic commands for PDP-11 machine. They port that Unix kernel to the DEC machine in 1970. But in 1971, they need to port the Unix kernel to B language. But they faced some problems with B language to implement this.

Issues with B language:
1) B takes word as the only data type, means addressing and declarations are done in machine words. But in PDP-11 machine character handling mechanism(inherited from BCPL ) was clumsy when using B language.
2)PDP-11 also doesn't support floating point arithmetic. But we have implementation of  these floating point arithmetic in B language, but it requires one Word to done that. But this was not true in case of 16 bit PDP-11
3)Finally B language implied overhead in implementing pointer arithmetic, beacuase we need to represent pointers also in words which is not working for 16 bit PDP-11 machine.

Evolution of C:
                   So in 1971, they began to extend the B language by adding new features which are required to compete with assembly language. The language was named as C, as most of the features are derived from B language. The C language had a powerful mix of high-level functionality and the detailed features required to program an operating system. So Unix components are rewritten later with C language.

Ken Thompson and Dennis Ritchie
                    In 1978, Brian Kernighan and Dennis Ritchie published the first edition of The C Programming Language. This book, known to C programmers as "K&R", served for many years as an informal spec of the language. The version of C that it describes is commonly referred to as K&R C. After the publication of the K&R description many  features of C impressed computer professionals. By the mind of 1980 the popularity of C had become widespread. Numerous C compilers and interpreters had been written for different Operating systems.Most of the commercial implementations of C were some what different from K & T version of C. This created some minor incompatibilities among different implementations of the language.

              Therefore, the ANSI (American National Standard Institute) worked on a standard version of C language.In 1988 they delivered the final standard definition ANSI C.Later on, the ANSI C standard was adopted by the International Standards Organization (ISO). The correct term should there fore be ISO C, but everybody still calls it ANSI C.

            Next revision was published in 1999 that introduced new futures like advanced data types and other changes. This is called C-99 Standard.

           C11 standard adds new features to C and library like type generic macros, anonymous structures, improved Unicode support, atomic operations, multi-threading, and bounds-checked functions. It also makes some portions of the existing C99 library optional, and improves compatibility with C++.

           Embedded C includes features not available in normal C like fixed-point arithmetic, named address spaces, and basic I/O hardware addressing
 

No comments:

Post a Comment