Where does assembler or compiling program reside?

yisongchina

Beta member
Messages
3
I am a new one to learn computer by myself.

I got some basic theories that the high level programs will be assembled or compiled to low level prgram for computer to execute.

My question is where the assembler or compiling program resides? Does it reside in CPU or some ROMs? And how they are called to assemble high level program? Will they be trigered when the computer powered on?

If you have any documents about this, please tell me.

Thanks for any answer from you. I think this is the biggest question in my current stage of learning.
 
Unless you're dealing with an interpreted language such as a scripting language, programs are compiled or assembled ahead of time and then stored on the disk as binary executables. When they are invoked, the OS loads them into memory and the CPU executes the instructions. They aren't compiled or assembled at power on or runtime. A separate compiler is needed. Generally speaking, most OSes don't ship with a compiler with the exception of *IX OSes which almost always ship with a C compiler.

In the case of some kind of interpreted language, a runtime interpreter must be loaded first, then it reads and interprets the instructions at runtime.
 
Dear strollin:

Thank you for your explanation.

Now I understand that different high-level language, or even assembly language, has different compiler or assembler. They come with related languages.

The C++, for instance, has VC++ or Borland, or some other compilers. The assembly language has MASM or TASM, or some other assemblers. They will be invoked only when a designed program is to run.

Is my understanding right?

My next course will be to study how CPU read the machine code interpreted by the compilers and assemblers. I am sure that will be wonderful when I understand that.
 
...
The C++, for instance, has VC++ or Borland, or some other compilers. The assembly language has MASM or TASM, or some other assemblers. They will be invoked only when a designed program is to run.

Is my understanding right? ...
Close but the compiler is used only once to compile the program into executable code, the compiler is no longer needed after that, the program can be used without the compiler being invoked again.
 
Back
Top Bottom