PDA

View Full Version : How did they compile the first compiler?



7smurfs
07-19-2004, 08:16 PM
I was just wondering: if you need compile a program before it works: how did they compile the first compiler? MSDOS?

Govtcheez
07-19-2004, 08:48 PM
It would have been written in ASM or some language native to whatever system it was on. Compilers just make it easier for people to write programs; they're not necessary to programming.

sean
07-19-2004, 09:34 PM
Yeah. It is surprisingly easy to code directly in binary. Of course it's difficult, but it may be easier than you think. It's basically assembly. Assembly can be translated very directly into 1's and 0's/

Felix
07-20-2004, 04:21 AM
They didn't had to compile it. They just wrote directly in the computer's language, I guess.

Sang-drax
07-20-2004, 06:40 AM
What came first, the hen or the egg? A compiler must be created with another compiler.

Obviously God created the first complier.

Jeremy G
07-20-2004, 06:50 AM
What came first, the hen or the egg? A compiler must be created with another compiler.

Obviously God created the first complier.
Who compiled God?

This thread is now about religion!

DavidP
07-20-2004, 07:09 AM
you can code directly in machine code using the Debug program that comes with DOS (it also exists in the Console contained in Windows).

basically you just type "debug" at the prompt, and then you can start entering machine code directly into the computer's memory, and then run it as well.

No compiling necessary.

LuckY
07-20-2004, 08:00 AM
The very first compiler was a hardware compiler that compiled punch cards. Once there were batch processing systems (that still compiled punch cards), FORTRAN was the only guy on the scene and that was written originally with assembly and ran off a reel-to-reel tape. Just as was previously stated, the beginning was 1s and 0s (early machines required operators to enter their program by flipping a series of switches up/down to represent 1/0 then hit a "process" button to order the machine to execute the instruction present on the switches). Programming started with binary code. Assemblers were written with binary code. FORTRAN was written in assembly at first then later it could be written in FORTRAN. The first C compiler, for a later example, was first written with assembly then later iterations were written in C itself.

I wondered exactly the same thing a few years back and was sort of perplexed at the time, but it is really a simple concept when you think about it.

Salem
07-20-2004, 01:02 PM
History lesson from Mr Ritchie himself
http://cm.bell-labs.com/cm/cs/who/dmr/primevalC.html

Felix
07-20-2004, 02:54 PM
What came first, the hen or the egg? A compiler must be created with another compiler.
The egg, duh. It's obvious.
If Darwin was right...
The Lizard-with-feathers layed an egg. The egg hatched. What came out? A more evolved version of the LWF: a hen!

EvBladeRunnervE
07-20-2004, 06:34 PM
What came first, the hen or the egg?

a hen and an egg are lieing in a pool of sweat, smoking cigarettes. The egg says, " well, I guess this answers that question"

ZakkWylde969
07-20-2004, 07:52 PM
I would think they wrote a simple compiler in ASM or binary with tons of time. Then they evolved it eventually over time.