PDA

View Full Version : The compilation process??


Beno
07-30-2001, 12:37 AM
Hi there every1,

I have been trying to understand a little about compilers and I know that they take the source code and translate it into object code.
I also know that a compiler has installed with it an assembler program to take the assembly language constructs and turn them into machine code.

BUT! what part of the compiler takes the source code and then turns it into the assembly code. Maybe "codehackinfool" would know this one!?
If anyone else could help me out that would be much appreciated.

Cheers

Beno

P.S "Yawningdog" I hope your Linux installation is going well, I have delayed my installation just for the moment!!

------------------
Have a nice day

iisbob
07-30-2001, 06:18 PM
Very good question Beno, as you probably know-back in the " old " days machine language was pretty much all you had to work with, punching in a bunch of 1's and 0's then " assemblers " came along and mapped these functions into a language that people could intuitively understand ( ie; ADD or MOVE, etc..). Thus was born BASIC, COBOL, etc.

If you've ever done any of the old assembly language programming, or even BASIC, you have an idea of the hair pulling frustration you can run into just for simple programs! http://www.PCGuide.com/ubb/mad.gif That's one reason progs were so small originally; you didn't have a lot of memory to use to begin with-and you didn't want to spend half your life debugging! http://www.PCGuide.com/ubb/tongue.gif

Along comes " compilers " which simply stated take two small programs and " link " them together to create a new more powerful code ( read C++, and now JAVA ). Made programming soooo much easier. http://www.PCGuide.com/ubb/biggrin.gif

You've asked a very good question, and to be honest i'm not sure if i could explain it to you properly, so instead i'll send you to this excellant site; Build your own compiler (http://www.iecc.com/compilers/crenshaw/), he pretty much covers the whole shebang here. http://www.PCGuide.com/ubb/biggrin.gif

------------------
iisbob
"Soap and education are not as sudden as a massacre, but they are more deadly in the long run."

"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." --Albert Einstein (1879-1955)

[This message has been edited by iisbob (edited 07-30-2001).]

Beno
07-31-2001, 07:35 AM
Thanks iisbob for that great website.

I appreciate that its hard to explain in a couple of lines so I will look at the web site that you gave me.

Cheers

Beno

------------------
Have a nice day