Previous in Forum: Terrain Recognition Software   Next in Forum: Compiler for a MATLAB Program
Close
Close
Close
5 comments
Participant

Join Date: Oct 2008
Posts: 2

compilers

01/11/2009 1:17 PM

what is the difference between compiler,assembler and interpreter?

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be Good Answers:

These comments received enough positive ratings to make them "good answers".

Comments rated to be "almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, rate them!
2
Guru
Panama - Member - New Member Hobbies - CNC - New Member Engineering Fields - Marine Engineering - New Member Engineering Fields - Retired Engineers / Mentors - New Member

Join Date: Dec 2006
Location: Panama
Posts: 4274
Good Answers: 213
#1

Re: compilers

01/11/2009 1:45 PM

In a nutshell, a compiler converts a computer program into machine code. An assembler essentially calls in components from other packages (i.e., linked libraries, headers, etc.) before compiling such that the finished application is complete. An interpreter converts a single line of code at a time into machine code before executing it.

Register to Reply Good Answer (Score 2)
Guru
Popular Science - Biology - New Member Hobbies - Musician - New Member APIX Pilot Plant Design Project - Member - New Member Hobbies - CNC - New Member Fans of Old Computers - ZX-81 - New Member

Join Date: Jan 2007
Location: Centurion, South Africa
Posts: 3921
Good Answers: 97
#2

Re: compilers

01/11/2009 2:11 PM

Assembler - convert low level commands (like MOV etc) into executable commands for a CPU.

Linker - links assembler modules to other code to form an application.

Compiler - Compiles and link high level commands (C, Pascal, Delphi etc) into executable units. Most of the languages can do assembler, link in DLL's or call and execute other programs.

Interpreter - Like Rocky Mountain Basic take the code in programs or from the screen, parses it and execute it line by line. Interpreters are slower but more flexible.

__________________
Never do today what you can put of until tomorrow - Student motto
Register to Reply
Active Contributor

Join Date: Oct 2008
Posts: 20
#3

Re: compilers

01/13/2009 2:34 PM

Why don't you look for it on the net?Secondly, its available in basic programming books like Working with C by Yashwant Kanethkar or "Let us C" by the same author.

Register to Reply
Guru

Join Date: Feb 2007
Location: Israel
Posts: 2923
Good Answers: 24
#4
In reply to #3

Re: compilers

01/27/2009 6:47 AM

Although both first answers are good answers, looking for it on the net, or elsewhere for that matter, could prove frustrating, because these terms are not highly definitive or clear-cut, and their exact meaning is mostly context-sensitive.

A few examples to illustrate this:

1. Most assemblers are also compilers, because even in Assembly you cannot directly write a routine or a program in binary machine-code - this is mentally impossible.

2. Most modern interpreters contain direct-mnemonics (assembly) provisions in their syntax - aimed to provide for high-speed and compact routines, weaved within the usual, cumbersome, high-level written, code.

3. Some development kits are simply a mix of an "Assembler-Interpreter-Compiler". A case in mind, is "Forth", which allows for the creation of high-level commands to be incorporated within the boundaries of the language - by compiling a low-level assembly routine, and naming the compiled routine to be called later - as a command, for further compilation of another program.

Such descriptive names are more of a generality than a definition, and should be treated as such. This is actually at the heart of computer and programming literature, when so often, a description of a mechanism is used more as a metaphor than a definition, and failing to understand a mechanism is due to relating to a metaphor, as if it was a definition.

This is about a "Soft", "Fuzzy" description - where it's better to understand the overall context, rather than memorising some absolute definitions.

It is a "Soft" realm, because every computerised program or routine creates a monster-number of possible "machine-states", which in turn is:

A. Why it is so hard to envision all the possible consequences of a sub-routine within the whole program

B. Why it is so hard to completely debug programs after the fact

Register to Reply Score 1 for Good Answer
Guru
Hobbies - CNC - New Member Hobbies - DIY Welding - New Member Engineering Fields - Electromechanical Engineering - New Member

Join Date: Aug 2007
Posts: 22712
Good Answers: 411
#5
In reply to #4

Re: compilers

01/29/2009 5:44 PM

ga

__________________
“ When people get what they want, they are often surprised when they get what they deserve " - James Wood
Register to Reply
Register to Reply 5 comments
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be Good Answers:

These comments received enough positive ratings to make them "good answers".

Comments rated to be "almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, rate them!
Copy to Clipboard

Users who posted comments:

ajay2121988 (1); cwarner7_11 (1); Hendrik (1); phoenix911 (1); Yuval (1)

Previous in Forum: Terrain Recognition Software   Next in Forum: Compiler for a MATLAB Program

Advertisement