0

When a language is created, then i think is the interpreter or compiler written. But how are the linked at the hardware level?
How is a language understood by the machine?
can anyone see the code in which C is written?

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by Ancient Dragon
0

Compilers are just translators that turn readable source code into binary machine code that the computer understands. When a language is created, somebody writes a compiler in a different language. Writing the second compiler in the new language is usually the trial run for a new language.

> How is a language understood by the machine?
Processors have binary instructions that they recognize, and operating systems have a way of recognizing files as being executable so the instructions are sent to the processor.

> can anyone see the code in which C is written?
Open source compilers like gcc come with source code, so yes. :)

0

> can anyone see the code in which C is written?
Open source compilers like gcc come with source code, so yes. :)

And be prepared to read some very very complex code. Definitely not for beginners. One C function may call several other C functions which are probably in other *.c files. And their implementation changes from one compiler to another. How g++ implements a C function may or may not be anything at all like how Microsoft VC++ implements it or how Borland compilers implement it.

Trying to see how one compiler implements a certain C function may or may not be useful to you unless you are trying to write your own compiler.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.