I know the compiler's job is to translates High Level Language code into code that machine can runs directly. But according to some book, the C compiler includes:
- check the syntax correctness;
- convert into machine code;
But some other says it first translate into assembly code, then let the assembler to assemble it. Which is true? If it's conpile directly into machine code, is it mean that the compiler writer must be expert in machine language in order to write it?
If it's compile first in assembly code, then let turn to assembler, then inline assembly must be available for that environment, right? As I know, somw free compiler doesn't come together with inline assembly feature, such as free Borland C++ Compiler.
Someone says, once the complete C compiler was written, it can be use to create another C Compiler. But what's the low-level tasks? Is it mean no need to touch assembly code or machine code? Of course, some special case the use of assembly or machine code is necessary.
- check the syntax correctness;
- convert into machine code;
But some other says it first translate into assembly code, then let the assembler to assemble it. Which is true? If it's conpile directly into machine code, is it mean that the compiler writer must be expert in machine language in order to write it?
If it's compile first in assembly code, then let turn to assembler, then inline assembly must be available for that environment, right? As I know, somw free compiler doesn't come together with inline assembly feature, such as free Borland C++ Compiler.
Someone says, once the complete C compiler was written, it can be use to create another C Compiler. But what's the low-level tasks? Is it mean no need to touch assembly code or machine code? Of course, some special case the use of assembly or machine code is necessary.