Page 1 of 1

How was the first compiler created?

Posted: Wed Sep 01, 2010 5:30 pm
by acerookie1
i cant even try to guess.

what came first, the assembler or the OS?

Re: How was the first compiler created?

Posted: Wed Sep 01, 2010 5:34 pm
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

Re: How was the first compiler created?

Posted: Wed Sep 01, 2010 5:53 pm
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.

Re: How was the first compiler created?

Posted: Thu Sep 02, 2010 1:26 pm
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

Re: How was the first compiler created?

Posted: Thu Sep 02, 2010 3:42 pm
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.

Re: How was the first compiler created?

Posted: Thu Sep 02, 2010 6:17 pm
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

Re: How was the first compiler created?

Posted: Thu Sep 02, 2010 8:13 pm
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?

Re: How was the first compiler created?

Posted: Thu Sep 02, 2010 9:00 pm
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

Re: How was the first compiler created?

Posted: Fri Sep 03, 2010 2:53 pm
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.

Re: How was the first compiler created?

Posted: Fri Sep 03, 2010 10:42 pm
by eatcomics
indeed they did use to use punch cards

Re: How was the first compiler created?

Posted: Sat Sep 04, 2010 12:17 am
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. ;)

Re: How was the first compiler created?

Posted: Mon Sep 06, 2010 3:49 pm
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:

Re: How was the first compiler created?

Posted: Mon Sep 06, 2010 11:29 pm
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: