How was the first compiler created?

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
acerookie1
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 48
Joined: Fri Feb 12, 2010 12:46 pm
Favorite Gaming Platforms: PC, Wii, SNES, GameCube
Programming Language of Choice: C++

How was the first compiler created?

Post by acerookie1 »

i cant even try to guess.

what came first, the assembler or the OS?
Image
User avatar
hurstshifter
ES Beta Backer
ES Beta Backer
Posts: 713
Joined: Mon Jun 08, 2009 8:33 pm
Favorite Gaming Platforms: SNES
Programming Language of Choice: C/++
Location: Boston, MA
Contact:

Re: How was the first compiler created?

Post by hurstshifter »

http://en.wikipedia.org/wiki/Compiler#C ... _education

"The first compiler was written by Grace Hopper, in 1952, for the A-0 programming language. The FORTRAN team led by John Backus at IBM is generally credited as having introduced the first complete compiler in 1957. COBOL was an early language to be compiled on multiple architectures, in 1960."

wikipedia ftw
"Time is an illusion. Lunchtime, doubly so."
http://www.thenerdnight.com
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: How was the first compiler created?

Post by Falco Girgis »

acerookie1 wrote:i cant even try to guess.

what came first, the assembler or the OS?
The assembler HAD to come first.
User avatar
ismetteren
Chaos Rift Junior
Chaos Rift Junior
Posts: 276
Joined: Mon Jul 21, 2008 4:13 pm

Re: How was the first compiler created?

Post by ismetteren »

acerookie1 wrote:i cant even try to guess.

what came first, the assembler or the OS?
On the first computers, you would have a control panel, with some switches you could choose memory adress with, and some switches you could set data with. Lats say 8 of each(8 bit computer). In the beginning you diden't use an OS. A CPU have a register for storing at what address it should find the next instruction to execute. So if the initial point for that pointer was memory adress 0 you would set all the address switches to zero, and set the data keys to some instruction, and then press a key to load that instruction into that point in memory, then you would set the address switches to 1, set the data at 1 and so on.
At some point people started writing assembly code down paper, and then hand assemble it the way i described, to get a better view of the code, you had to debug it in your head!.
If you screw up once, you where screwed. And it would take ages to do even the simplest things. So at some point, somebody decided to write an assembler(probably in this very tedious way, but maybe it would be possible to hardwire a circuit to do the input for you?? i really have no idea, just guessing here).

Now i'm not the one going to college here, but i would imagine a simple OS being written before the assembler, that could handle IO, i mean, if the assembler had to be written into memory manually each time you had to use it and only could output programs to the ram, there woulden't really be much point in it would there?

Image
Here is a picture of the Altair 8800 it was the first PC, and it worked by these switches
Image ImageImage Image
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: How was the first compiler created?

Post by Ginto8 »

GyroVorbis wrote:
acerookie1 wrote:i cant even try to guess.

what came first, the assembler or the OS?
The assembler HAD to come first.
I think he was trying to figure out how the assembler was written without an assembler already existing. The answer is straight machine code.
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: How was the first compiler created?

Post by eatcomics »

at the 8800 thing, it also had to be assembled I do believe xD that would be fun you get to put it together then you can watch things blink.... actually... that does sound like fun
Image
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: How was the first compiler created?

Post by Ginto8 »

eatcomics wrote:at the 8800 thing, it also had to be assembled I do believe xD that would be fun you get to put it together then you can watch things blink.... actually... that does sound like fun
You don't program it in assembly. What's so hard to understand about that? You give it straight machine code, and it executes it exactly as it is. Is that really such a difficult concept?
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: How was the first compiler created?

Post by eatcomics »

Ginto8 wrote:
eatcomics wrote:at the 8800 thing, it also had to be assembled I do believe xD that would be fun you get to put it together then you can watch things blink.... actually... that does sound like fun
You don't program it in assembly. What's so hard to understand about that? You give it straight machine code, and it executes it exactly as it is. Is that really such a difficult concept?
Oh jesus my bad, I didn't choose very good words there, by assembly I meant put it together lol, that was totally my bad.... So yeah... there is nothing hard to understand about that, seeing as how it has a few switches... I mean... assembly (this time the language) kinda goes out the door
Image
User avatar
MrDeathNote
ES Beta Backer
ES Beta Backer
Posts: 594
Joined: Sun Oct 11, 2009 9:57 am
Current Project: cocos2d-x project
Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
Programming Language of Choice: C/++
Location: Belfast, Ireland
Contact:

Re: How was the first compiler created?

Post by MrDeathNote »

One of my computer science lecturers told us that when he started to program you had to have your program made out on a punch cardwhich was then read into a computer the size of a small room i.e it manipulated memory addresses based on the holes in the card. I suppose this kind of computer is, in itself an assember.
http://www.youtube.com/user/MrDeathNote1988

Image
Image

"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: How was the first compiler created?

Post by eatcomics »

indeed they did use to use punch cards
Image
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: How was the first compiler created?

Post by Ginto8 »

MrDeathNote wrote:One of my computer science lecturers told us that when he started to program you had to have your program made out on a punch cardwhich was then read into a computer the size of a small room i.e it manipulated memory addresses based on the holes in the card. I suppose this kind of computer is, in itself an assember.
I believe how it worked was that it had a set number of "lines" on the punch card. Each line was a byte, and on that line would be (punched in some way) the binary code for that byte. IIRC if you wrote a program in FORTRAN, you would punch its byte sequence in on cards, feed it into the compiler, then the compiler would punch more cards that would run the program (unless FORTRAN was interpreted, in which case it ran then and there). Of course, I could just be talking out of my ass, so feel free to correct me. ;)
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
acerookie1
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 48
Joined: Fri Feb 12, 2010 12:46 pm
Favorite Gaming Platforms: PC, Wii, SNES, GameCube
Programming Language of Choice: C++

Re: How was the first compiler created?

Post by acerookie1 »

Ginto8 wrote: I think he was trying to figure out how the assembler was written without an assembler already existing. The answer is straight machine code.
yeah. thanx every one! :mrgreen:
Image
User avatar
davidthefat
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 529
Joined: Mon Nov 10, 2008 3:51 pm
Current Project: Fully Autonomous Robot
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: California
Contact:

Re: How was the first compiler created?

Post by davidthefat »

LOL When I first sawa punch card, I was like 4, I thought it was a thing for games. Like literally a score board or something :lol:
Post Reply