| | |
Hmmm...how is the first compiler for a platform made?
![]() |
•
•
Join Date: Aug 2004
Posts: 212
Reputation:
Solved Threads: 2
Now here's a interesting question I've been pondering but haven't quite been able to solve...how is the first compiler for a platform made (e.g. new OS, processor, etc)?
The Digital Freeway, professional paid hosting starting at just $10 a month, 5GB disk space and 15GB bandwidth, we have free hosting too and all accounts are instantly activated
•
•
Join Date: Aug 2004
Posts: 212
Reputation:
Solved Threads: 2
huh? how is it possible to compile something for say, PPC on a Intel platform?
The Digital Freeway, professional paid hosting starting at just $10 a month, 5GB disk space and 15GB bandwidth, we have free hosting too and all accounts are instantly activated
•
•
Join Date: Aug 2004
Posts: 212
Reputation:
Solved Threads: 2
That's true but last I checked the machine code for Intel and PPC platforms are different, as an example, one can't run linux apps compiled on a Intel computer and one can't run a linux app compiled on a PPC computer (a mac), as far as I know in order for a application to work on a certain processor it has to be compiled on that processor...of course there's obviously something you guys are trying to tell me that I'm just missing...hmmm...
The Digital Freeway, professional paid hosting starting at just $10 a month, 5GB disk space and 15GB bandwidth, we have free hosting too and all accounts are instantly activated
I think you've got your terminology mixed up. There's compiled on and compiled for. I can have code that's compiled on an AMD64 machine, but it's for a PPC machine.
Like I was mentioning earlier, it's just a matter of knowing how to translate the source code into the machine code that the target processor can read. The translation is a task that any machine can do, because it's just processing one form of input into another form of output. That's what computers do by nature.
Case in point: I've got an old Sparcstation with a 60mhz processor. If I need to compile something for it, rather than wait an hour for something to finish, I can compile it on my Athlon XP system in a fraction of the time. That's because I have appropriate cross-compilers for that platform.
Without getting into the specifics of machine-specific instruction code, the important thing to keep in mind is that one machine can compile code for another system quite easily, because all it compiling is, essentially, is taking one type of input (source code) and outputting it in another form (machine-specific code). There's logic applied to optimize the machine code, but even still, all we're doing is taking an input and translating it to a desired output format.
Like I was mentioning earlier, it's just a matter of knowing how to translate the source code into the machine code that the target processor can read. The translation is a task that any machine can do, because it's just processing one form of input into another form of output. That's what computers do by nature.
Case in point: I've got an old Sparcstation with a 60mhz processor. If I need to compile something for it, rather than wait an hour for something to finish, I can compile it on my Athlon XP system in a fraction of the time. That's because I have appropriate cross-compilers for that platform.
Without getting into the specifics of machine-specific instruction code, the important thing to keep in mind is that one machine can compile code for another system quite easily, because all it compiling is, essentially, is taking one type of input (source code) and outputting it in another form (machine-specific code). There's logic applied to optimize the machine code, but even still, all we're doing is taking an input and translating it to a desired output format.
Alex Cavnar, aka alc6379
•
•
Join Date: Aug 2004
Posts: 212
Reputation:
Solved Threads: 2
Ah yeah that's true I suppose, just haven't come by any programs that do that as far as I know, thanks for your replies
The Digital Freeway, professional paid hosting starting at just $10 a month, 5GB disk space and 15GB bandwidth, we have free hosting too and all accounts are instantly activated
•
•
•
•
Originally Posted by hexstar
Ah yeah that's true I suppose, just haven't come by any programs that do that as far as I know, thanks for your replies
Alex Cavnar, aka alc6379
![]() |
Similar Threads
Other Threads in the IT Professionals' Lounge Forum
- Previous Thread: Cryptography jobs?
- Next Thread: cs in college for me?
| Thread Tools | Search this Thread |
1gbit advertising advice amazon answers archive british broadband business businessprocesses career carrier censorship cern china cio collectiveintelligence connectivity consumer consumers corporateearnings datatransfer debtcollectors dictionary digg digital ebay ecommerce email employment environment facebook food government grid high-definition hottub infodelivery infotech intel internet interview ipod isp japan kindle lhc library malware marketing mit moonfruit news onlineshopping piracy piratebay pope porn program questions r&d religion remoteworking research retail security sex shopping simple skype smallbusiness smb sms socialmedia socialnetworking software softwareengineer spam speed spending startrek statistics stocks study stumbleupon survey tabletpc technology touch-screen touchscreen twitter uk videoinprint voips web webdeveloper windows words






