Who Compiles Software That Compiles Software?

Pages: 1, 2
free web hosting
Open Discussion > CONTRIBUTE > Computers

Who Compiles Software That Compiles Software?

Hooligan
If you need a C compiler to compile a program in C for example, who made the C compiling program, and how? Does it work from an older programming language, or is there some neat programming trick that I'm missing here? It's a bit puzzling to me.

Reply

no9t9
compiler software is written in the most basic programming language. All your C/C++, Visual Basic, etc. are called HIGH LEVEL programming languages. The most basic programming language is a LOW LEVEL programming language called Assembly. This language is as close to machine language as it gets. The compiler basically translates high level programming languages into machine language.

I've written some programs using assembly to program a processor to perform automated and controlled tasks. It's not that difficult but you have to control every aspect of the processor.

Reply

s243a
I doubt people still right compilers in assembler. I had a professor who wrote an asselber in Perl for a microprocessor that was unique to the engineering department. Perl was a could choice for righting a complier in because it excels at manipulating text. An assembler is nothing more then a look up table. C is such a primitive language that the mapping between c code and assembly is pretty obvious. Aside from the need to parse expressions a c compiler need not be much more then a look up table. The basic compiler is also probably pretty intuitive. The translation from some languages such as JAVA, lisp and prolog to assembly may not be so obvious. Lisp and prolog are considered AI languages and in JAVA the code is first translated into beta code which represents instructions on a virtual machine. The virtual machine does not match PC assembly but may match closely to some sun systems. I herd the spark systems assembly is based on the JAVA beta code.

Reply

dexter
QUOTE(no9t9 @ Jan 21 2005, 11:21 PM)
compiler software is written in the most basic programming language.  All your C/C++, Visual Basic, etc. are called HIGH LEVEL programming languages.  The most basic programming language is a LOW LEVEL programming language called Assembly.  This language is as close to machine language as it gets.  The compiler basically translates high level programming languages into machine language.

I've written some programs using assembly to program a processor to perform automated and controlled tasks.  It's not that difficult but you have to control every aspect of the processor.
*




Right... but not really the answer...

Actually, today's compilers are written in high-level languages. The orginal compilers, though, that was another matter. Before our first high-level languages, and before assembly... there was machine code.

Machine code was used originally for programming, and it was all done via 0110101010... etc. Assembly language was then thought of, and using machine code, our first assemblers were written (an assembly translates assembly into machine code).

Eventually, after using assembly for some time, a work on a new language, FORTRAN, began. And a compiler for this language was written in assembly (this took an incredible amount of time... several man-years of work, if I recall correctly).

And as I understand, that compiler was used to write other, better compilers, and so on and so forth. So, even though this C compiler was not written in machine or assembly code, it still relies on the original compilers and assemblers for it's existance.

That's the basic idea behind how it all works and came about.

 

 

 


Reply

no9t9
I believe I answered his question the way I had interpreted it.

I'm assuming the guy was talking about the "chicken and egg" phenomenon regarding compilers. Just saying that they were made in assembly. Obviously today there are many more options.

Reply

dexter
Ah, I see what you were getting at... it was just the use of present tense in relation to writing compilers in assembly that bothered me... tongue.gif

Reply

alperuzi
QUOTE(no9t9 @ Jan 21 2005, 08:21 AM)
compiler software is written in the most basic programming language.
*



That sentence throws you off.

as no9t9 noted, compilers can be written in any language, no assembler is required.

If you go to computer engineering in university, in 3rd or 4th year you take a course on how to specify software mathematically, and you can take a course on how to design and write compilers. They usually use Java or more often C for this purpose.

Reply

cse-icons
nowadays compilers are also written in Java or C and compiled. But earlier the compilers were written in assembly language. i.e, critical portions of compiler relating to parsing and converting to binary code would be written in assembly language as a basic functionality and then this would be used to develop the rest.

As alperuzi said, the compiler design course in computer science relates to this and is very interesting. You can find material on this course online too. Go thru it, not that u would/would not understand it at the first go... but a little effort would make it worthwhile.

Reply

BoSZ
QUOTE(Hooligan @ Jan 21 2005, 01:37 PM)
If you need a C compiler to compile a program in C for example, who made the C compiling program, and how? Does it work from an older programming language, or is there some neat programming trick that I'm missing here? It's a bit puzzling to me.
*





assembler
take a toor of google with this query and you will get the answer

Reply

8bit
Delphi > Game Maker > Program Creator > program...

So technically somone compiled a program in a program compiled in a compiler in a compiler...dude...that's just stupid

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Pages: 1, 2
Similar Topics

Keywords : compiles software compiles software

  1. Looking For Software Packages In Linux Check This - (2)
    I have seen so many newbies confused with the linux that where they can search for the linux
    equivalent of program?.How to find the free application that can run on OS X. Most of the windows
    famous application have alternatives.Though it is pretty obvious that Linux project is not enough
    mature .so you can't expect that these applications are muchproductive.There is alternative to
    Adobe Photoshop called as GIMP (Gnu image manipulation program).but trust me it is not as good as
    Photoshop.Also there is no alternative for Macromedia's Flash.You know that this progra...
  2. Software That Can Record From Television - (17)
  3. Seamonkey 1.0 Released - one of the most powerful secure internet software packages available (3)
    The seamonkey 1.0 was released last month and is available as an open source application which can
    be downloaded from its mozill.org-hosted website,it is one of the most complete, powerful and secure
    internet software packages available today.Seamonkey features a state-of-the-art web browser and a
    very powerful email client also a WYSIWYG web page composer and a IRC chat client which is rich in
    many features. Even though seamonkey has the look and feel familiar to users of its predecessors it
    comes with a lot of new features that improves security and stability along wit...
  4. Usb Cable Problem - Software wont install (6)
    I just bought a USB cable to connect my cell phone to my computer. But I'm having problems
    installing the software. When I go on my computer there is this thing called "USB Driver" that I
    need to install, but when I click on it to install, nothing happens. Does anyone know what the
    problem is?...
  5. Rmvb Conversion Software? - (4)
    Heya! I'm looking for software to convert RMVB files to either MPEG or VCD format.
    Preferably freeware, but any functional shareware would do. I've already found a couple (such as
    Boilsoft's RM converter), but they can't seem to get the job done. Using Boilsoft's
    converter, for example, there's audio but no video after conversion. I'd really appreciate
    any help or info you could give. Thanks! =^^= Oh, and Happy New Year! =^^=...
  6. Macromedia Studio 8 Full - Download - The best web-design software (1)
    Studio 8 is the essential software suite used to design, develop and maintain interactive online
    experiences. WAREZ MATERIAL LINKS REMOVED... If you need help email me marin87@gmail.com
    No links to illegal/warez material ...
  7. What Is Your Favorite Software ? - (2)
    I know we've talked about specific applications but what about if you had to only take 3 pieces
    what would they be and why. ill start by saying ill go with opera because i love its speed and
    compliance with w3 standards. trillian because i can use all the chats in one although miranda is
    looking better each day but not there yet for me. bitfender because its such a small yet extensive
    program that also works for linux your turn now /biggrin.gif' border='0'
    style='vertical-align:middle' alt='biggrin.gif' /> ...
  8. Recovery +backup Software - (5)
    I need Backup+file recovery software,Can you suggest any good software. Platform:>win 98
    SE/WIN2K/WinXP Besides File recovery if that software allows Hard disk image making then pls let me
    know. Currently i got my hands dirty with only xxcopy software.anyway i have one more question where
    can i find the good XP tips and tricks.? Free software suggestion welcome....



Looking for compiles, software, compiles, software

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for compiles, software, compiles, software

*MORE FROM TRAP17.COM*
advertisement



Who Compiles Software That Compiles Software?



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE