How did they compile the first compiler?

This is a discussion on How did they compile the first compiler? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I was just wondering: if you need compile a program before it works: how did they compile the first compiler? ...

  1. #1
    C(++)(#)
    Join Date
    Jul 2004
    Posts
    309

    How did they compile the first compiler?

    I was just wondering: if you need compile a program before it works: how did they compile the first compiler? MSDOS?

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    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.

  3. #3
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    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/

  4. #4
    Registered User
    Join Date
    Nov 2003
    Posts
    168
    They didn't had to compile it. They just wrote directly in the computer's language, I guess.
    -Felix
    Rots Soft
    If the facts don't fit the theory, change the facts.
    Albert Einstein (1879 - 1955)

  5. #5
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    What came first, the hen or the egg? A compiler must be created with another compiler.

    Obviously God created the first complier.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  6. #6
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    Quote Originally Posted by Sang-drax
    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!
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  7. #7
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    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.
    My Website

    "Circular logic is good because it is."

  8. #8
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    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.

  9. #9
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,484
    History lesson from Mr Ritchie himself
    http://cm.bell-labs.com/cm/cs/who/dmr/primevalC.html
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  10. #10
    Registered User
    Join Date
    Nov 2003
    Posts
    168
    Quote Originally Posted by Sang-drax
    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!
    -Felix
    Rots Soft
    If the facts don't fit the theory, change the facts.
    Albert Einstein (1879 - 1955)

  11. #11
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    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"
    there used to be something here, but not anymore

  12. #12
    ___
    Join Date
    Jun 2003
    Posts
    806
    I would think they wrote a simple compiler in ASM or binary with tons of time. Then they evolved it eventually over time.
    "When I die I want to pass peacefully in my sleep like my grandfather did, not screaming and yelling like the passengers in his car."

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using DXUT with Borland 5.5 free compiler
    By Jedi Nescioquis in forum Game Programming
    Replies: 7
    Last Post: 02-11-2009, 11:04 AM
  2. Compile crashes certain windows
    By Loduwijk in forum C++ Programming
    Replies: 5
    Last Post: 03-26-2006, 08:05 PM
  3. Can't compile on the other compiler
    By AProg in forum C Programming
    Replies: 8
    Last Post: 05-25-2003, 07:55 AM
  4. My Dev compiler won't compile
    By Unregistered in forum C++ Programming
    Replies: 22
    Last Post: 05-04-2002, 06:37 PM
  5. Special Compiler for win app's
    By Unregistered in forum Windows Programming
    Replies: 19
    Last Post: 04-26-2002, 03:52 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21