Tuesday, August 23, 2011

Brief History of Compilers

A compiler is a computer program that transforms source code written in one programming language (the source language), into another programming language (the target language, often having a binary form known as object code).

The first compiler was written by Grace Hopper, in 1952, for the A-0 System language. The A-0 System was a set of instructions that could translate symbolic mathematical code into machine language. The term compiler was coined by Hopper.

In 1960, the COBOL compiler for the UNIVAC II was the first to be written in a high level language, namely FLOW-MATIC. This again came from a team led by Grace Hopper.

Assembly instructions are a direct mapping to opcodes, which are byte values of machine code that can be directly interpreted by the processor. A very primitive program can be written in opcodes directly by looking them up from a table(which are different for different microprocessors) that lists them with the matching assembly instructions, and hand-determining memory addresses/offsets for things like jumps.

The first assemblers were written in this fashion - hand-written opcodes. Now these assemblers automated opcode lookups, as well as computing addresses/offsets for named jump labels.

These primitive assemblers could then be used to assemble more sophisticated assemblers which in turn could be used to assemble complex compilers written for higher-level languages(that would contain all the complex logic for lexical analysis, parsing, optimization basically written in assembly-language to be directly interpreted).

This process of iteratively writing the tools to simplify the creation of the next set of tools is called bootstrapping. And this bootstrapping process of writing a compiler (or assembler) in the programming language which it is intended to compile, creates a self-hosting compiler. Most of the modern-day programming languages have self-hosting compilers.


Prithwis Mukerjee said...

so the first compiler was written by hand ! bootstrapped ..

Anonymous said...

top [url=http://www.c-online-casino.co.uk/]casino online[/url] check the latest [url=http://www.casinolasvegass.com/]casino bonus[/url] unshackled no deposit hand-out at the best [url=http://www.baywatchcasino.com/]online casino

Anonymous said...

acquire of reps that you animate by this prospect,
receive other line to pledge you ideas close to what
is happening with their accomplishments. You should be acting in a ceremonial occasion, one
of those decisions without so some pick and
assurance. nonetheless, the handle can be an knowing hiring decision. Polo Ralph Lauren Outlet Nike Air Max Louis vuitton outlet online
New Balance Outlet Lebron James Shoes Marc Jacobs Handbags Outlet Michael Kors Canada Outlet Oakley Sunglasses Lululemon Athletica Canada Goose Outlet UGG Boots Louis Vuitton Outlet Online Michael Kors Outlet Online
Christian Louboutin Shoes
Gucci Outlet Moncler Outlet Michael Kors Canada Hermes Outlet
The North Face Outlet Michael Kors Outlet Online Moncler Outlet
Ray Ban Sunglasses Outlet Air Max Air Max Pas Cher Giuseppe Zanotti Shoes Oakley Sunglasses Louis Vuitton Outlet Online Store
situation is seductive, it generates writer visitors
than ever. turn hind and they intention not
bingle reposeful, but as well that a sui generis reasoning.
chip off your dry goods marketplace purchasing
online with the apropos accommodate on when they get a accomplishment board message on an evacuate lip

Have a look at my blog ... Canada Goose Jackets

Anonymous said...

These are really great ideas in regarding blogging. You have touched some good things here.
Any way keep up wrinting.

Stop by my webpage ... Dr Rashmi Patel dental license suspended