Saturday, May 22, 2010

Which language was used to develop first c compiler?

It was probably assembly language. This was a system to write programs in machine code using variable names for instructions, stored items and memory locations. The assembler would convert it to machine code.





CPY loc1,loc2 could be an instruction to generate the copy command which might be 6AF9 in hex followed by the 2 addresses in hex. Hex was used to display the binary since the conversion was very simple.

Which language was used to develop first c compiler?
The first C compilers were written in the native or machine language of the computer.





Machine code was normally generated by an assembler, but was sometimes hand coded. Yikes!
Reply:I really dont know . But my guess is it should be assembly language. Because most of the compilers has an inbuilt assembler.





And assembly language should be developed in machine language





Its all my guess. It can be wrong also
Reply:It is difficult to define what is meant by "the first C compiler" because the language evolved from various embryonic versions of C which evolved from NB which itself evolved from B which evolved from BCPL. Nevertheless, you could say that the first C compiler was written in C. This may sound like a chicken-and-egg situation, but it was in fact quite common to write a new language compiler in itself. All you need to do is hand-translate the first compiler into assembly language to create the first executable, and then it becomes self-sustaining. Though it seems that in the case of C each version in its evolution was compiled by a compiler written in a less-evolved version of itself. See the references below.


No comments:

Post a Comment