Python Written in C?
Larry Bates
larry.bates at websafe.com`
Mon Jul 21 23:59:15 EDT 2008
Grant Edwards wrote:
> On 2008-07-22, Larry Bates <larry.bates at websafe.com`> wrote:
>
>> You talk about "writing it in assembly language for each MPU
>> chip". Actually it is even better than that. We now have
>> these modern inventions, called compilers that do that type of
>> work for us. They translate high level instructions, not
>> into assembler but into machine language.
>
> Actually, all of the compilers I'm familiar with (gcc and a
> handful of cross compilers for various microprocessors)
> translate from high-level languages (e.g. C, C++) into
> assembly, which is then assembled into relocatable object
> files, which are then linked/loaded to produce machine
> language.
>
I just learned something I did not know. I was under the impression that they
translated directly to machine code without ever actually generating Assembler
text files. Seems like a waste to generate the text and turn around run that
through the assembler, but what do I know. I guess that way the compiler can
have pluggable assembler back-ends.
-Larry
More information about the Python-list
mailing list