Go Back   Computer Forums > General Computing > Software and Operating Systems
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 08-27-2011, 02:09 PM   #1
Beta Member
 
Join Date: Aug 2011
Posts: 3
Question Where does assembler or compiling program reside?

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.
__________________

yisongchina is offline   Reply With Quote
Old 08-27-2011, 06:51 PM   #2
Fully Optimized
 
strollin's Avatar
 
Join Date: Mar 2011
Location: USA
Posts: 1,937
Default Re: Where does assembler or compiling program reside?

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.
__________________

strollin is offline   Reply With Quote
Old 08-28-2011, 12:38 AM   #3
Beta Member
 
Join Date: Aug 2011
Posts: 3
Default Re: Where does assembler or compiling program reside?

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.
yisongchina is offline   Reply With Quote
Old 08-28-2011, 01:14 AM   #4
Fully Optimized
 
strollin's Avatar
 
Join Date: Mar 2011
Location: USA
Posts: 1,937
Default Re: Where does assembler or compiling program reside?

Quote:
Originally Posted by yisongchina View Post
...
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.
strollin is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 09:49 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0